The patch titled Subject: checkpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL> has been added to the -mm tree. Its filename is checkpatch-prefer-dev_level-to-dev_printkkern_level.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: prefer dev_<level>( to dev_printk(KERN_<LEVEL> Add YA check to printk style. dev_<level> uses are functions and generate smaller object code than dev_printk(KERN_<LEVEL>. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff -puN scripts/checkpatch.pl~checkpatch-prefer-dev_level-to-dev_printkkern_level scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-prefer-dev_level-to-dev_printkkern_level +++ a/scripts/checkpatch.pl @@ -2430,6 +2430,16 @@ sub process { "Prefer pr_warn(... to pr_warning(...\n" . $herecurr); } + if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) { + my $orig = $1; + my $level = lc($orig); + $level = "warn" if ($level eq "warning"); + my $level2 = $level; + $level2 = "dbg" if ($level eq "debug"); + WARN("PREFER_DEV_LEVEL", + "Prefer dev_$level2(... to dev_printk(KERN_$orig, ...\n" . $herecurr); + } + # function brace can't be on same line, except for #defines of do while, # or if closed on same line if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are linux-next.patch compiler-gcc4h-reorder-macros-based-upon-gcc-ver.patch compiler-gcch-add-gcc-recommended-gcc_version-macro.patch compiler-gcc34h-use-gcc_version-macro.patch compiler-gcc4h-bugh-remove-duplicate-macros.patch bugh-fix-build_bug_on-macro-in-__checker__.patch bugh-prevent-double-evaulation-of-in-build_bug_on.patch bugh-make-build_bug_on-generate-compile-time-error.patch compilerh-bugh-prevent-double-error-messages-with-build_bug_on.patch bugh-compilerh-introduce-compiletime_assert-build_bug_on_msg.patch printk-fix-incorrect-length-from-print_time-when-seconds-99999.patch get_maintainerpl-find-maintainers-for-removed-files.patch checkpatch-prefer-dev_level-to-dev_printkkern_level.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