Skip to content
Commit e367455a authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: emit fewer kmalloc_array/kcalloc conversion warnings



Avoid matching allocs that appear to be known small multiplications of a
sizeof with a constant because gcc as of 4.8 cannot optimize the code in
a calloc() exactly the same way as an alloc().

Look for numeric constants or what appear to be upper case only macro
#defines.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarTheodore Ts'o <tytso@mit.edu>
Original-patch-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f27c95db
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment