* + checkpatch-dont-warn-about-colon-termination-in-linker-scripts.patch added to -mm tree
@ 2021-02-05 22:44 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-02-05 22:44 UTC (permalink / raw)
To: chris, joe, mm-commits
The patch titled
Subject: checkpatch: don't warn about colon termination in linker scripts
has been added to the -mm tree. Its filename is
checkpatch-dont-warn-about-colon-termination-in-linker-scripts.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/checkpatch-dont-warn-about-colon-termination-in-linker-scripts.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-dont-warn-about-colon-termination-in-linker-scripts.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Chris Down <chris@chrisdown.name>
Subject: 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
Signed-off-by: Chris Down <chris@chrisdown.name>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/scripts/checkpatch.pl~checkpatch-dont-warn-about-colon-termination-in-linker-scripts
+++ a/scripts/checkpatch.pl
@@ -5053,7 +5053,7 @@ sub process {
# A colon needs no spaces before when it is
# terminating a case value or a label.
} elsif ($opv eq ':C' || $opv eq ':L') {
- if ($ctx =~ /Wx./) {
+ if ($ctx =~ /Wx./ and $realfile !~ m@.*\.lds\.h$@) {
if (ERROR("SPACING",
"space prohibited before that '$op' $at\n" . $hereptr)) {
$good = rtrim($fix_elements[$n]) . trim($fix_elements[$n + 1]);
_
Patches currently in -mm which might be from chris@chrisdown.name are
checkpatch-dont-warn-about-colon-termination-in-linker-scripts.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-06 3:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 22:44 + checkpatch-dont-warn-about-colon-termination-in-linker-scripts.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.