From: Joe Perches Date: Fri, 23 Mar 2012 22:02:20 +0000 (-0700) Subject: checkpatch: whitespace - add/remove blank lines X-Git-Tag: MMI-PSA29.97-13-9~17191^2~67 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6712d85852b348d07301c7480f7eb3312d329143;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git checkpatch: whitespace - add/remove blank lines Add blank lines between a few tests, remove an extraneous one. Signed-off-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d1fd466043ef..7a2f54a0bd35 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3348,18 +3348,20 @@ sub process { if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) { WARN("CONSIDER_COMPLETION", "consider using a completion\n" . $herecurr); - } + # recommend kstrto* over simple_strto* and strict_strto* if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) { WARN("CONSIDER_KSTRTO", "$1 is obsolete, use k$3 instead\n" . $herecurr); } + # check for __initcall(), use device_initcall() explicitly please if ($line =~ /^.\s*__initcall\s*\(/) { WARN("USE_DEVICE_INITCALL", "please use device_initcall() instead of __initcall()\n" . $herecurr); } + # check for various ops structs, ensure they are const. my $struct_ops = qr{acpi_dock_ops| address_space_operations|