mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] fs: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a duplicate of ARRAY_SIZE. Some trailing whitespaces are also deleted. Signed-off-by: Tobias Klauser <[email protected]> Cc: David Howells <[email protected]> Cc: Dave Kleikamp <[email protected]> Acked-by: Trond Myklebust <[email protected]> Cc: Neil Brown <[email protected]> Cc: Chris Mason <[email protected]> Cc: Jeff Mahoney <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Nathan Scott <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
b5029622ac
commit
e8c96f8c29
23 changed files with 40 additions and 51 deletions
|
|
@ -224,8 +224,8 @@ static struct rpc_procinfo nsm_procedures[] = {
|
|||
};
|
||||
|
||||
static struct rpc_version nsm_version1 = {
|
||||
.number = 1,
|
||||
.nrprocs = sizeof(nsm_procedures)/sizeof(nsm_procedures[0]),
|
||||
.number = 1,
|
||||
.nrprocs = ARRAY_SIZE(nsm_procedures),
|
||||
.procs = nsm_procedures
|
||||
};
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ static struct rpc_stat nsm_stats;
|
|||
static struct rpc_program nsm_program = {
|
||||
.name = "statd",
|
||||
.number = SM_PROGRAM,
|
||||
.nrvers = sizeof(nsm_version)/sizeof(nsm_version[0]),
|
||||
.nrvers = ARRAY_SIZE(nsm_version),
|
||||
.version = nsm_version,
|
||||
.stats = &nsm_stats
|
||||
};
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ static struct svc_version * nlmsvc_version[] = {
|
|||
|
||||
static struct svc_stat nlmsvc_stats;
|
||||
|
||||
#define NLM_NRVERS (sizeof(nlmsvc_version)/sizeof(nlmsvc_version[0]))
|
||||
#define NLM_NRVERS ARRAY_SIZE(nlmsvc_version)
|
||||
static struct svc_program nlmsvc_program = {
|
||||
.pg_prog = NLM_PROGRAM, /* program number */
|
||||
.pg_nvers = NLM_NRVERS, /* number of entries in nlmsvc_version */
|
||||
|
|
|
|||
|
|
@ -599,7 +599,7 @@ static struct rpc_stat nlm_stats;
|
|||
struct rpc_program nlm_program = {
|
||||
.name = "lockd",
|
||||
.number = NLM_PROGRAM,
|
||||
.nrvers = sizeof(nlm_versions) / sizeof(nlm_versions[0]),
|
||||
.nrvers = ARRAY_SIZE(nlm_versions),
|
||||
.version = nlm_versions,
|
||||
.stats = &nlm_stats,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue