mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
kernel.h/checkpatch: mark strict_strto<foo> and simple_strto<foo> as obsolete
Mark obsolete/deprecated strict_strto<foo> and simple_strto<foo> functions and macros as obsolete. Update checkpatch to warn about their use. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fc23af34b0
commit
67d0a07544
2 changed files with 7 additions and 3 deletions
|
|
@ -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*\(/) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue