[lkml]   [2013]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] checkpatch: Allow spaces before the ':' of a bitfield
On Mon, 2013-10-14 at 10:32 -0700, Josh Triplett wrote:
> checkpatch warns about spaces both before and after the ':' separating a
> bitfield name from its width. However, many drivers do put space before
> the : to line up the widths, which makes the definition significantly
> more readable; checkpatch should not warn about that. Remove the
> warning for space before the ':' of a bitfield.

There are a _bunch_ of different styles used for
alignment of bitfields.

$ grep -rPh --include=*.[ch] \
'(?:unsigned\s+|signed\s+|)(char|short|long|long\s+long|\w+_t|(?:__|)(?:u|s)(?:8|16|32|64))\s+\w+\s*:\s*\d+\s*(?:,|;)' *

spaces before colon
spaces after colon
aligned on bitfield size

I'd just as soon make it a --strict check.

 \ /
  Last update: 2013-10-14 20:01    [W:0.062 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site