Skip to content

Commit

Permalink
checkpatch: format strings should not have brackets in macros
Browse files Browse the repository at this point in the history
We should not recommend braces for the following:

    #define pr_fmt(fmt)    "%s: " fmt, __func__

allow things with double quotes round them to avoid this check.

Signed-off-by: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andy Whitcroft authored and torvalds committed Sep 22, 2009
1 parent 77f5b10 commit ea71a0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2288,7 +2288,8 @@ sub process {
DECLARE_PER_CPU|
DEFINE_PER_CPU|
__typeof__\(|
\.$Ident\s*=\s*
\.$Ident\s*=\s*|
^\"|\"$
}x;
#print "REST<$rest> dstat<$dstat>\n";
if ($rest ne '') {
Expand Down

0 comments on commit ea71a0a

Please sign in to comment.