From 67d0a0754455f89ef3946946159d8ec9e45ce33a Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 31 Oct 2011 17:13:10 -0700 Subject: kernel.h/checkpatch: mark strict_strto and simple_strto as obsolete Mark obsolete/deprecated strict_strto and simple_strto functions and macros as obsolete. Update checkpatch to warn about their use. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0b3e35c9ef0..5ba679c8cde 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3151,10 +3151,10 @@ sub process { "consider using a completion\n" . $herecurr); } -# recommend kstrto* over simple_strto* - if ($line =~ /\bsimple_(strto.*?)\s*\(/) { +# recommend kstrto* over simple_strto* and strict_strto* + if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) { WARN("CONSIDER_KSTRTO", - "consider using kstrto* in preference to simple_$1\n" . $herecurr); + "$1 is obsolete, use k$3 instead\n" . $herecurr); } # check for __initcall(), use device_initcall() explicitly please if ($line =~ /^.\s*__initcall\s*\(/) { -- cgit v1.2.3