checkpatch: don't warn about complex macros in i.MX pin header
PATCH 1/1 checkpatch: don't warn about complex macros in i.MX pin header
From: Peng Fan <[email protected]>
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.
--- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+)
scripts/checkpatch.pl +1 -0
@@ -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,
Signature · 1 line
Peng Fan <[email protected]>
Joe Perches
maintainerQuoted 6 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
The pin function ID in i.MX pin headers is a tuple of <
mux_regconf_reginput_regmux_modeinput_val>, as below:
"#defineIMX95_PAD_DAP_TDI__JTAG_MUX_TDI0x00000x02040x06100x000x00" 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.