Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b00e4814 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

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: default avatarJoe Perches <joe@perches.com>
Suggested-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 91cb5195
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -3138,10 +3138,13 @@ sub process {
				# // is a comment
				} elsif ($op eq '//') {

				#   :   when part of a bitfield
				} elsif ($opv eq ':B') {
					# skip the bitfield test for now

				# No spaces for:
				#   ->
				#   :   when part of a bitfield
				} elsif ($op eq '->' || $opv eq ':B') {
				} elsif ($op eq '->') {
					if ($ctx =~ /Wx.|.xW/) {
						if (ERROR("SPACING",
							  "spaces prohibited around that '$op' $at\n" . $hereptr)) {