From 5e43efb29ae877da131e6c1a4761cd7f4eec5a16 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 16 Sep 2015 18:35:09 +0200 Subject: [PATCH] checkpatch: do not recommend qemu_strtok over strtok If anything it should recommend strtok_r! Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 574334b985..b6d71eae17 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2463,8 +2463,8 @@ sub process { WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); } -# recommend qemu_strto* over strto* - if ($line =~ /\b(strto.*?)\s*\(/) { +# recommend qemu_strto* over strto* for numeric conversions + if ($line =~ /\b(strto[^k].*?)\s*\(/) { WARN("consider using qemu_$1 in preference to $1\n" . $herecurr); } # check for module_init(), use category-specific init macros explicitly please