Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

checkpatch: don't warn about colon termination in linker scripts

This check erroneously flags cases like the one in my recent printk
enumeration patch[0], where the spaces are syntactic, and `section:' vs.
`section :' is syntactically important:

ERROR: space prohibited before that ':' (ctx:WxW)
#258: FILE: include/asm-generic/vmlinux.lds.h:314:
+ .printk_fmts : AT(ADDR(.printk_fmts) - LOAD_OFFSET) {

0: https://lore.kernel.org/patchwork/patch/1375749/

Link: https://lkml.kernel.org/r/YBwhqsc2TIVeid3t@chrisdown.name
Link: https://lkml.kernel.org/r/YB6UsjCOy1qrrlSD@chrisdown.name
Signed-off-by: Chris Down <chris@chrisdown.name>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Chris Down and committed by
Linus Torvalds
263afd39 58f02267

+1 -1
+1 -1
scripts/checkpatch.pl
··· 5044 5044 # A colon needs no spaces before when it is 5045 5045 # terminating a case value or a label. 5046 5046 } elsif ($opv eq ':C' || $opv eq ':L') { 5047 - if ($ctx =~ /Wx./) { 5047 + if ($ctx =~ /Wx./ and $realfile !~ m@.*\.lds\.h$@) { 5048 5048 if (ERROR("SPACING", 5049 5049 "space prohibited before that '$op' $at\n" . $hereptr)) { 5050 5050 $good = rtrim($fix_elements[$n]) . trim($fix_elements[$n + 1]);