nfsd: use ARRAY_SIZE
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Sun, 1 Oct 2017 19:30:47 +0000 (15:30 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 5 Oct 2017 17:56:39 +0000 (13:56 -0400)
commita133552a0049aa2ff92f83dbe8d5185485b538c4
tree53fd16800d897e36750219984ce2523a53a738e2
parentde766e570413bd0484af0b580299b495ada625c3
nfsd: 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>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/fault_inject.c