]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: improve CONSTANT_COMPARISON test for structure members
authorJoe Perches <joe@perches.com>
Sat, 21 May 2016 00:04:02 +0000 (17:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
commit30685b77438c8c3b83795d5d7bee077062eed86d
treea3ed1a88fa0d29022c876037258ecb5827a2fea2
parentfd9bd7bf37a9a7e9a5d2bd9b473bd54059f701d5
checkpatch: improve CONSTANT_COMPARISON test for structure members

A "." dereference to an all uppercase structure member can be
incorrectly reported as a CONSTANT_COMPARISON.

ie: "if (table[i].PANELID == tempdx)"

Fix it by checking for "." before the constant test.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl