]> git.baikalelectronics.ru Git - kernel.git/commit
orangefs: use ARRAY_SIZE
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Sun, 1 Oct 2017 19:30:48 +0000 (15:30 -0400)
committerMike Marshall <hubcap@omnibond.com>
Mon, 13 Nov 2017 20:09:58 +0000 (15:09 -0500)
commita7e3201c0a5174219922877cfb315363129e8a06
treed47aaf3f3608f15a4d2f747e3bf13d82b7d5454d
parent90251c6c64ac1faa684f7cd9248f0756e2d0dfe9
orangefs: use ARRAY_SIZE

Using the ARRAY_SIZE macro improves the readability of the code.

Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/orangefs-debug.h
fs/orangefs/orangefs-utils.c