* [PATCH] checkpatch: don't warn about complex macros in i.MX pin header
@ 2025-12-16 8:32 Peng Fan (OSS)
2025-12-16 10:11 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2025-12-16 8:32 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn, Andrew Morton
Cc: linux-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
The pin function ID in i.MX pin headers is a tuple of <mux_reg conf_reg
input_reg mux_mode input_val>, as below:
"#define IMX95_PAD_DAP_TDI__JTAG_MUX_TDI 0x0000 0x0204 0x0610 0x00 0x00"
The pin headers are used by device trees, not drivers.
checkpatch erroneously flags it as error:
ERROR: Macros with complex values should be enclosed in parentheses
Bypass the check for pin header files with file names imx[*]-pinfunc.h.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c0250244cf7a3cb5e289b04fa4a9f644692dc278..5e91698cb90751ae1f575b3d8094a3f6aa4ee3c6 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5937,6 +5937,7 @@ sub process {
# (0) loop. Grab the first statement and ensure its the whole macro
# if its not enclosed in a known good container
if ($realfile !~ m@/vmlinux.lds.h$@ &&
+ $realfile !~ m@/imx\d+-pinfunc\.h$@ &&
$line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
my $ln = $linenr;
my $cnt = $realcnt;
---
base-commit: 563c8dd425b59e44470e28519107b1efc99f4c7b
change-id: 20251216-checkpatch-45226f317299
Best regards,
--
Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] checkpatch: don't warn about complex macros in i.MX pin header
2025-12-16 8:32 [PATCH] checkpatch: don't warn about complex macros in i.MX pin header Peng Fan (OSS)
@ 2025-12-16 10:11 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2025-12-16 10:11 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn, Andrew Morton,
linux-kernel, Peng Fan
On 2025-12-16 15:32, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> The pin function ID in i.MX pin headers is a tuple of <mux_reg conf_reg
> input_reg mux_mode input_val>, as below:
> "#define IMX95_PAD_DAP_TDI__JTAG_MUX_TDI 0x0000 0x0204 0x0610 0x00
> 0x00"
> The pin headers are used by device trees, not drivers.
Nak. Just ignore the message instead.
There would be _far_ too many exceptions to add individually to
checkpatch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-16 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-16 8:32 [PATCH] checkpatch: don't warn about complex macros in i.MX pin header Peng Fan (OSS)
2025-12-16 10:11 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®