]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: add --strict preference for p = kmalloc(sizeof(*p)...
authorJoe Perches <joe@perches.com>
Wed, 19 Jun 2013 00:07:18 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:05 +0000 (17:27 +1000)
commitada116e8020ed938f729188002dd612eb5d5c55d
tree1f660d382b24e32bc94ac7194a82fef033efaae2
parent7d07305335a50463c6a2c9c9b211b99c7594b81b
checkpatch: add --strict preference for p = kmalloc(sizeof(*p)...

Add another test for memory allocation style to follow
Documentation/CodingStyle:

Chapter 14: Allocating memory

The preferred form for passing a size of a struct is the following:

p = kmalloc(sizeof(*p), ...);

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl