checkpatch: add 'Prefer ARRAY_SIZE" test
authorJoe Perches <joe@perches.com>
Thu, 16 Apr 2015 19:44:36 +0000 (12:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:03:58 +0000 (09:03 -0400)
commitb598b67060f14eb8c34d0cef1db4727dab56ef91
treeeae35ba4c7ad7e538a0c273a504169f540b50b15
parent6d07d01b62b2d81500803058f736b46677ec873a
checkpatch: add 'Prefer ARRAY_SIZE" test

Add a test for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo).

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