]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: add --strict preference for p = kmalloc(sizeof(*p)...
authorJoe Perches <joe@perches.com>
Fri, 7 Jun 2013 00:08:44 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:42:44 +0000 (15:42 +1000)
commitba19c07b22ad2afacf11e0680af4b63af7db2e63
tree636e4d948602758deef7d079df64c04fbd9219ca
parent9f36756ecfa00055b891e2d1228e2a7e301ff137
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