aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-03-24 06:15:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:19 -0500
commite8c96f8c29d89af0c13dc2819a9a00575846ca18 (patch)
treeb90ed0da4803df56a91be5979580e335af2d697c /fs/nfs
parentb5029622ac86bb441dc5e641226fb1152fca02d7 (diff)
[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 <tklauser@nuerscht.ch> Cc: David Howells <dhowells@redhat.com> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Chris Mason <mason@suse.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/inode.c4
-rw-r--r--fs/nfs/mount_clnt.c2
-rw-r--r--fs/nfs/nfs2xdr.c2
-rw-r--r--fs/nfs/nfs3xdr.c2
-rw-r--r--fs/nfs/nfs4xdr.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 37e55c328ebc..419d1d254f9f 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -103,7 +103,7 @@ static struct rpc_version * nfs_version[] = {
103static struct rpc_program nfs_program = { 103static struct rpc_program nfs_program = {
104 .name = "nfs", 104 .name = "nfs",
105 .number = NFS_PROGRAM, 105 .number = NFS_PROGRAM,
106 .nrvers = sizeof(nfs_version) / sizeof(nfs_version[0]), 106 .nrvers = ARRAY_SIZE(nfs_version),
107 .version = nfs_version, 107 .version = nfs_version,
108 .stats = &nfs_rpcstat, 108 .stats = &nfs_rpcstat,
109 .pipe_dir_name = "/nfs", 109 .pipe_dir_name = "/nfs",
@@ -118,7 +118,7 @@ static struct rpc_version * nfsacl_version[] = {
118struct rpc_program nfsacl_program = { 118struct rpc_program nfsacl_program = {
119 .name = "nfsacl", 119 .name = "nfsacl",
120 .number = NFS_ACL_PROGRAM, 120 .number = NFS_ACL_PROGRAM,
121 .nrvers = sizeof(nfsacl_version) / sizeof(nfsacl_version[0]), 121 .nrvers = ARRAY_SIZE(nfsacl_version),
122 .version = nfsacl_version, 122 .version = nfsacl_version,
123 .stats = &nfsacl_rpcstat, 123 .stats = &nfsacl_rpcstat,
124}; 124};
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index db99b8f678f8..0b9a78353d6e 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -174,7 +174,7 @@ static struct rpc_stat mnt_stats;
174static struct rpc_program mnt_program = { 174static struct rpc_program mnt_program = {
175 .name = "mount", 175 .name = "mount",
176 .number = NFS_MNT_PROGRAM, 176 .number = NFS_MNT_PROGRAM,
177 .nrvers = sizeof(mnt_version)/sizeof(mnt_version[0]), 177 .nrvers = ARRAY_SIZE(mnt_version),
178 .version = mnt_version, 178 .version = mnt_version,
179 .stats = &mnt_stats, 179 .stats = &mnt_stats,
180}; 180};
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index 7fc0560c89c9..6548a65de944 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -704,6 +704,6 @@ struct rpc_procinfo nfs_procedures[] = {
704 704
705struct rpc_version nfs_version2 = { 705struct rpc_version nfs_version2 = {
706 .number = 2, 706 .number = 2,
707 .nrprocs = sizeof(nfs_procedures)/sizeof(nfs_procedures[0]), 707 .nrprocs = ARRAY_SIZE(nfs_procedures),
708 .procs = nfs_procedures 708 .procs = nfs_procedures
709}; 709};
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index b6c0b5012bce..5224a191efb6 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -1138,7 +1138,7 @@ struct rpc_procinfo nfs3_procedures[] = {
1138 1138
1139struct rpc_version nfs_version3 = { 1139struct rpc_version nfs_version3 = {
1140 .number = 3, 1140 .number = 3,
1141 .nrprocs = sizeof(nfs3_procedures)/sizeof(nfs3_procedures[0]), 1141 .nrprocs = ARRAY_SIZE(nfs3_procedures),
1142 .procs = nfs3_procedures 1142 .procs = nfs3_procedures
1143}; 1143};
1144 1144
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 4bbf5ef57785..0a1bd36a4837 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4384,7 +4384,7 @@ struct rpc_procinfo nfs4_procedures[] = {
4384 4384
4385struct rpc_version nfs_version4 = { 4385struct rpc_version nfs_version4 = {
4386 .number = 4, 4386 .number = 4,
4387 .nrprocs = sizeof(nfs4_procedures)/sizeof(nfs4_procedures[0]), 4387 .nrprocs = ARRAY_SIZE(nfs4_procedures),
4388 .procs = nfs4_procedures 4388 .procs = nfs4_procedures
4389}; 4389};
4390 4390