From: Fabian Frederick Date: Mon, 30 Jun 2014 17:49:39 +0000 (+0200) Subject: NFS: use ARRAY_SIZE instead of sizeof/sizeof[0] X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=002160269fcc73a01ca3889d3011afc9b63a53bd;p=linux-beck.git NFS: use ARRAY_SIZE instead of sizeof/sizeof[0] Use macro definition Cc: Trond Myklebust Cc: linux-nfs@vger.kernel.org Signed-off-by: Fabian Frederick Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 084af1060d79..c08e837c29e5 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1027,8 +1027,7 @@ static bool nfs_auth_info_add(struct nfs_auth_info *auth_info, rpc_authflavor_t flavor) { unsigned int i; - unsigned int max_flavor_len = (sizeof(auth_info->flavors) / - sizeof(auth_info->flavors[0])); + unsigned int max_flavor_len = ARRAY_SIZE(auth_info->flavors); /* make sure this flavor isn't already in the list */ for (i = 0; i < auth_info->flavor_len; i++) {