aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJoe Perches <[email protected]>2020-08-11 18:35:10 -0700
committerLinus Torvalds <[email protected]>2020-08-12 10:58:00 -0700
commit65b64b3bec3fa74937fdc18e5ccf10a48ee3a7d3 (patch)
treed8bd5e1d115ef717703f0c8334bb009431af5be7 /tools/perf/scripts/python
parent50161266973bcc662e969e63d68fc7bff71de21b (diff)
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Julia Lawall <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions