* [PATCH 1/1 linux-next] scripts/checkpatch.pl: fix k[mz]alloc with multiplies check
@ 2014-10-13 20:06 Fabian Frederick
2014-10-13 20:25 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-10-13 20:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Joe Perches, Andrew Morton
checkpatch doesn't seem to detect any case since
Commit e367455a9f25
("checkpatch: emit fewer kmalloc_array/kcalloc conversion warnings")
Cc: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 374abf4..e18afcd 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4875,8 +4875,8 @@ sub process {
$r1 = $a2;
$r2 = $a1;
}
- if ($r1 !~ /^sizeof\b/ && $r2 =~ /^sizeof\s*\S/ &&
- !($r1 =~ /^$Constant$/ || $r1 =~ /^[A-Z_][A-Z0-9_]*$/)) {
+ if ($r1 !~ /^sizeof\b/ && !($r2 =~ /^sizeof\s*\S/ &&
+ ($r1 =~ /^$Constant$/ || $r1 =~ /^[A-Z_][A-Z0-9_]*$/))) {
if (WARN("ALLOC_WITH_MULTIPLY",
"Prefer $newfunc over $oldfunc with multiply\n" . $herecurr) &&
$fix) {
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-13 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 20:06 [PATCH 1/1 linux-next] scripts/checkpatch.pl: fix k[mz]alloc with multiplies check Fabian Frederick
2014-10-13 20:25 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®