Linux-GPIO Archive on
 help / color / Atom feed
From: Geert Uytterhoeven <>
To: Arnd Bergmann <>, Linus Walleij <>
	Geert Uytterhoeven <>
Subject: [PATCH] pinctrl: renesas: checker: Restrict checks to Renesas platforms
Date: Mon, 11 Jan 2021 15:06:33 +0100
Message-ID: <> (raw)

When DEBUG is defined (e.g. if CONFIG_DEBUG_PINCTRL=y), the Renesas pin
control driver runs sanity checks against the pin control tables.  This
may cause lots of output on the console, and can be annoying in ARM
multi-platform kernels.  Fix this by only running the checks when
running on SuperH, or on a DT platform supported by the Renesas pin
controller driver.

Suggested-by: Arnd Bergmann <>
Signed-off-by: Geert Uytterhoeven <>
To be queued in renesas-pinctrl-for-v5.12.

 drivers/pinctrl/renesas/core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c
index b9f80833f532e7b7..56cb8e1d8384b39c 100644
--- a/drivers/pinctrl/renesas/core.c
+++ b/drivers/pinctrl/renesas/core.c
@@ -1146,6 +1146,11 @@ static void __init sh_pfc_check_driver(const struct platform_driver *pdrv)
 	unsigned int i;
+	if (!of_find_matching_node(NULL, pdrv->driver.of_match_table))
+		return;
 	sh_pfc_regs = kcalloc(SH_PFC_MAX_REGS, sizeof(*sh_pfc_regs),
 	if (!sh_pfc_regs)

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 14:06 Geert Uytterhoeven [this message]
2021-01-11 14:36 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-GPIO Archive on

Archives are clonable:
	git clone --mirror linux-gpio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-gpio linux-gpio/ \
	public-inbox-index linux-gpio

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone