]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
checkpatch: add --strict test for macro argument reuse
authorJoe Perches <joe@perches.com>
Tue, 11 Oct 2016 20:52:08 +0000 (13:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Oct 2016 22:06:30 +0000 (15:06 -0700)
commitf59b64bffe163431b4ec61f3b00c1aeb846948f3
treec0eb4d7984ee48484270be672d8adbeb22097ab1
parentaf207524a49c3d70af0a9196072ab3b6d690fcf7
checkpatch: add --strict test for macro argument reuse

If a macro argument is used multiple times in the macro definition, the
macro argument may have an unexpected side-effect.

Add a test (MACRO_ARG_REUSE) for that condition which is only
emitted with command-line option --strict.

Link: http://lkml.kernel.org/r/b6d67a87cafcafd15499e91780dc63b15dec0aa0.1473744906.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl