Thread (2 messages) 2 messages, 2 authors, 2021-01-11

Re: [PATCH] pinctrl: renesas: checker: Restrict checks to Renesas platforms

From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-01-11 14:37:35
Also in: linux-gpio, linux-renesas-soc, linux-sh

On Mon, Jan 11, 2021 at 3:06 PM Geert Uytterhoeven
[off-list ref] wrote:
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 <arnd@arndb.de>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thank you for addressing it,

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
quoted hunk ↗ jump to hunk
---
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;

+#ifndef CONFIG_SUPERH
+       if (!of_find_matching_node(NULL, pdrv->driver.of_match_table))
+               return;
+#endif
I usually prefer writing this as

       if (!IS_ENABLED(CONFIG_SUPERH) &&
           !of_find_matching_node(NULL, pdrv->driver.of_match_table))

but I don't care enough to ask you to resend ;-)

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help