Commit c8447115 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: improve 'bare use of' signed/unsigned types warning

Fix false positive warning of identifiers ending in signed with an =
assignment of WARNING: Prefer 'signed int' to bare use of 'signed'.

Link: http://lkml.kernel.org/r/6a0e24c3e9102337528ecfcbbe91a0eb5b4820ed.1469529497.git.joe@perches.comSigned-off-by: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarAlan Douglas <alanjhd@gmail.com>
Acked-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cec3aaa5
...@@ -3347,7 +3347,7 @@ sub process { ...@@ -3347,7 +3347,7 @@ sub process {
next if ($line =~ /^[^\+]/); next if ($line =~ /^[^\+]/);
# check for declarations of signed or unsigned without int # check for declarations of signed or unsigned without int
while ($line =~ m{($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) { while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
my $type = $1; my $type = $1;
my $var = $2; my $var = $2;
$var = "" if (!defined $var); $var = "" if (!defined $var);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment