lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251216-checkpatch-v1-1-8d7a40a10426@nxp.com>
Date: Tue, 16 Dec 2025 16:32:24 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>, 
 Dwaipayan Ray <dwaipayanray1@...il.com>, 
 Lukas Bulwahn <lukas.bulwahn@...il.com>, 
 Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Peng Fan <peng.fan@....com>
Subject: [PATCH] checkpatch: don't warn about complex macros in i.MX pin
 header

From: Peng Fan <peng.fan@....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@....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@...linux.lds.h$@ &&
+		    $realfile !~ m@...x\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@....com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ