summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2016-08-02 14:04:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 19:35:12 -0400
commitc844711575086231890084390a275d06f11a623a (patch)
tree3a8fabb3a2b4a364dd03fa4d1b040f1464c23daa /scripts
parentcec3aaa56638c7aad763630b9cbe591f2e791a3b (diff)
downloadlinux-stable-c844711575086231890084390a275d06f11a623a.tar.gz
linux-stable-c844711575086231890084390a275d06f11a623a.tar.bz2
linux-stable-c844711575086231890084390a275d06f11a623a.zip
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.com Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Alan Douglas <alanjhd@gmail.com> Acked-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 77915e095022..1d5b09dd577a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3347,7 +3347,7 @@ sub process {
next if ($line =~ /^[^\+]/);
# 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 $var = $2;
$var = "" if (!defined $var);