The patch titled Subject: checkpatch: warn on unnecessary line continuations has been added to the -mm tree. Its filename is checkpatch-warn-on-unnecessary-line-continuations.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/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Joe Perches <joe@xxxxxxxxxxx> Subject: checkpatch: warn on unnecessary line continuations When the previous line is not a line continuation and the current line has a line continuation but is not a #define, emit a warning. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Cc: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> Cc: Andy Whitcroft <apw@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff -puN scripts/checkpatch.pl~checkpatch-warn-on-unnecessary-line-continuations scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-warn-on-unnecessary-line-continuations +++ a/scripts/checkpatch.pl @@ -3013,6 +3013,15 @@ sub process { "Macros with complex values should be enclosed in parenthesis\n" . "$herectx"); } } + +# check for line continuations outside of #defines + + } else { + if ($prevline !~ /^..*\\$/ && + $line =~ /^\+.*\\$/) { + WARN("LINE_CONTINUATIONS", + "Avoid unnecessary line continuations\n" . $herecurr); + } } # do {} while (0) macro tests: _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are checkpatch-improve-network-block-comment-style-checking.patch linux-next.patch checkpatch-warn-on-unnecessary-line-continuations.patch kstrto-add-documentation.patch simple_strto-annotate-function-as-obsolete.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html