diff options
author | Joe Perches <joe@perches.com> | 2020-08-12 04:35:10 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-12 20:58:00 +0300 |
commit | 65b64b3bec3fa74937fdc18e5ccf10a48ee3a7d3 (patch) | |
tree | d8bd5e1d115ef717703f0c8334bb009431af5be7 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 50161266973bcc662e969e63d68fc7bff71de21b (diff) | |
download | linux-65b64b3bec3fa74937fdc18e5ccf10a48ee3a7d3.tar.xz |
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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions