summaryrefslogtreecommitdiffstats
path: root/block/cmdline-parser.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2020-08-12 03:35:10 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-12 19:58:00 +0200
commit65b64b3bec3fa74937fdc18e5ccf10a48ee3a7d3 (patch)
treed8bd5e1d115ef717703f0c8334bb009431af5be7 /block/cmdline-parser.c
parentcheckpatch: add test for possible misuse of IS_ENABLED() without CONFIG_ (diff)
downloadlinux-65b64b3bec3fa74937fdc18e5ccf10a48ee3a7d3.tar.xz
linux-65b64b3bec3fa74937fdc18e5ccf10a48ee3a7d3.zip
checkpatch: add --fix option for ASSIGN_IN_IF
Add a --fix option for 2 types of single-line assignment in if statements if ((foo = bar(...)) < BAZ) { expands to: foo = bar(..); if (foo < BAZ) { and if ((foo = bar(...)) { expands to: foo = bar(...); if (foo) { if statements with assignments spanning multiple lines are not converted with the --fix option. if statements with additional logic are also not converted. e.g.: if ((foo = bar(...)) & BAZ == BAZ) { Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Julia Lawall <julia.lawall@lip6.fr> Link: http://lkml.kernel.org/r/9bc7c782516f37948f202deba511bc95ed279bbd.camel@perches.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block/cmdline-parser.c')
0 files changed, 0 insertions, 0 deletions