diff --git a/[refs] b/[refs] index 6cec196e2b45..e377864aeeac 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 270c49a088ae58d4b817861bb04bfec63b0966db +refs/heads/master: 5f14d3bd87ef5f979ea64c1f0862534d71786db7 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 885e3b43d64a..e94626ca77cf 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -3114,6 +3114,12 @@ sub process { "__aligned(size) is preferred over __attribute__((aligned(size)))\n" . $herecurr); } +# Check for __attribute__ format(printf, prefer __printf + if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) { + WARN("PREFER_PRINTF", + "__printf(string-index, first-to-check) is preferred over __attribute__((format(printf, string-index, first-to-check)))\n" . $herecurr); + } + # check for sizeof(&) if ($line =~ /\bsizeof\s*\(\s*\&/) { WARN("SIZEOF_ADDRESS",