mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-26 19:44:21 +08:00
checkpatch: don't warn on bitfield spaces around :
This test prevents code from being aligned around the : for easy visual counting of bitfield lengths. ie: int foo : 1, int bar : 2, int foobar :29; should be acceptable so remove the test. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
91cb5195ff
commit
b00e48148e
@ -3138,10 +3138,13 @@ sub process {
|
|||||||
# // is a comment
|
# // is a comment
|
||||||
} elsif ($op eq '//') {
|
} elsif ($op eq '//') {
|
||||||
|
|
||||||
|
# : when part of a bitfield
|
||||||
|
} elsif ($opv eq ':B') {
|
||||||
|
# skip the bitfield test for now
|
||||||
|
|
||||||
# No spaces for:
|
# No spaces for:
|
||||||
# ->
|
# ->
|
||||||
# : when part of a bitfield
|
} elsif ($op eq '->') {
|
||||||
} elsif ($op eq '->' || $opv eq ':B') {
|
|
||||||
if ($ctx =~ /Wx.|.xW/) {
|
if ($ctx =~ /Wx.|.xW/) {
|
||||||
if (ERROR("SPACING",
|
if (ERROR("SPACING",
|
||||||
"spaces prohibited around that '$op' $at\n" . $hereptr)) {
|
"spaces prohibited around that '$op' $at\n" . $hereptr)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user