+ checkpatch-exclude-sizeof-sub-expressions-from-macro_arg_reuse.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: checkpatch: exclude sizeof sub-expressions from MACRO_ARG_REUSE
has been added to the -mm tree.  Its filename is
     checkpatch-exclude-sizeof-sub-expressions-from-macro_arg_reuse.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-exclude-sizeof-sub-expressions-from-macro_arg_reuse.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-exclude-sizeof-sub-expressions-from-macro_arg_reuse.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Brendan Jackman <brendan.jackman@xxxxxxxxxxxxxxxxx>
Subject: checkpatch: exclude sizeof sub-expressions from MACRO_ARG_REUSE

The arguments of sizeof are not evaluated so arguments are safe to re-use
in that context.  Excluding sizeof subexpressions means macros like
ARRAY_SIZE can pass checkpatch.

Link: http://lkml.kernel.org/r/20190806070833.24423-1-brendan.jackman@xxxxxxxxxxxxxxxxx
Signed-off-by: Brendan Jackman <brendan.jackman@xxxxxxxxxxxxxxxxx>
Acked-by: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/checkpatch.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/checkpatch.pl~checkpatch-exclude-sizeof-sub-expressions-from-macro_arg_reuse
+++ a/scripts/checkpatch.pl
@@ -5219,7 +5219,7 @@ sub process {
 			        next if ($arg =~ /\.\.\./);
 			        next if ($arg =~ /^type$/i);
 				my $tmp_stmt = $define_stmt;
-				$tmp_stmt =~ s/\b(typeof|__typeof__|__builtin\w+|typecheck\s*\(\s*$Type\s*,|\#+)\s*\(*\s*$arg\s*\)*\b//g;
+				$tmp_stmt =~ s/\b(sizeof|typeof|__typeof__|__builtin\w+|typecheck\s*\(\s*$Type\s*,|\#+)\s*\(*\s*$arg\s*\)*\b//g;
 				$tmp_stmt =~ s/\#+\s*$arg\b//g;
 				$tmp_stmt =~ s/\b$arg\s*\#\#//g;
 				my $use_cnt = () = $tmp_stmt =~ /\b$arg\b/g;
_

Patches currently in -mm which might be from brendan.jackman@xxxxxxxxxxxxxxxxx are

checkpatch-exclude-sizeof-sub-expressions-from-macro_arg_reuse.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux