]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add --strict preference for p = kmalloc(sizeof(*p)...
authorJoe Perches <joe@perches.com>
Wed, 3 Jul 2013 22:05:21 +0000 (15:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:44 +0000 (16:07 -0700)
commit8bd72856f746db03fe69238fd8bbd14616165bfb
tree68226ed2019c2e999efdbf6ccd8d0c53a271e833
parenta325ae32602eb48ceed6e05d770bff13daa62c60
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl