From patchwork Tue Sep 26 10:39:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 726821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDC07E7D27C for ; Tue, 26 Sep 2023 10:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234398AbjIZKjw (ORCPT ); Tue, 26 Sep 2023 06:39:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234381AbjIZKjw (ORCPT ); Tue, 26 Sep 2023 06:39:52 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F55710C; Tue, 26 Sep 2023 03:39:44 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 4FF9E240009; Tue, 26 Sep 2023 10:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695724782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=94FNtphCbsWf6wCGl8UYRRa0JtnR+dm/mDW23d094II=; b=WRyxdFvXLksA6Pezj20twQfdaS+eTI02SlJ4ynpJJBSt5GJ/AEj9SwrqaPcq8Nu5dOdMuo 0gHsRIrdhFnlBX9Bzf9OAi2SGOOyMjeqkKP3MONwTOgLIH3mDbu8TjiOCwwPfy6v+owRe+ J9mWIWlv9g7qOoTI/7sIIoNQtxUwnD26w5qLEBqVCgxFXs4UdrZmmnSQLRahEMTMVaGVb0 xccXrdEfOcDETefUKbXE3888YuFjvFP4dlIDlqqs0lcnZgcw7w4Sqavlgx1LWWODQThzPT FkFBN0IjzvQr+gB9fu40G8Cdyvv/6KT0VFW7IOATuidFhbDm74aDqI6AZIz0PA== From: Luca Ceresoli To: linux-tegra@vger.kernel.org Cc: Luca Ceresoli , Linus Walleij , Thierry Reding , Jonathan Hunter , Andy Shevchenko , Prathamesh Shete , Thierry Reding , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni Subject: [PATCH] pinctrl: tegra: add OF node when logging OF parsing errors Date: Tue, 26 Sep 2023 12:39:38 +0200 Message-Id: <20230926103938.334055-1-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-GND-Sasl: luca.ceresoli@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org These errors are not quite clear without also logging they device tree node being parsed, especially when the pinmux node has lots of subnodes. Adding the node name helps a lot in finding the node that triggers the error. Signed-off-by: Luca Ceresoli --- drivers/pinctrl/tegra/pinctrl-tegra.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index 734c71ef005b..6bf8db424bec 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -120,7 +120,7 @@ static int tegra_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, /* EINVAL=missing, which is fine since it's optional */ if (ret != -EINVAL) dev_err(dev, - "could not parse property nvidia,function\n"); + "%pOF: could not parse property nvidia,function\n", np); function = NULL; } @@ -134,8 +134,8 @@ static int tegra_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, goto exit; /* EINVAL=missing, which is fine since it's optional */ } else if (ret != -EINVAL) { - dev_err(dev, "could not parse property %s\n", - cfg_params[i].property); + dev_err(dev, "%pOF: could not parse property %s\n", + np, cfg_params[i].property); } } @@ -146,7 +146,7 @@ static int tegra_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, reserve++; ret = of_property_count_strings(np, "nvidia,pins"); if (ret < 0) { - dev_err(dev, "could not parse property nvidia,pins\n"); + dev_err(dev, "%pOF: could not parse property nvidia,pins\n", np); goto exit; } reserve *= ret;