diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-03-24 03:15:34 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 07:33:19 -0800 |
commit | e8c96f8c29d89af0c13dc2819a9a00575846ca18 (patch) | |
tree | b90ed0da4803df56a91be5979580e335af2d697c /fs/nfs | |
parent | b5029622ac86bb441dc5e641226fb1152fca02d7 (diff) | |
download | linux-3.10-e8c96f8c29d89af0c13dc2819a9a00575846ca18.tar.gz linux-3.10-e8c96f8c29d89af0c13dc2819a9a00575846ca18.tar.bz2 linux-3.10-e8c96f8c29d89af0c13dc2819a9a00575846ca18.zip |
[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.c | 4 | ||||
-rw-r--r-- | fs/nfs/mount_clnt.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs2xdr.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs3xdr.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 37e55c328eb..419d1d254f9 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -103,7 +103,7 @@ static struct rpc_version * nfs_version[] = { static struct rpc_program nfs_program = { .name = "nfs", .number = NFS_PROGRAM, - .nrvers = sizeof(nfs_version) / sizeof(nfs_version[0]), + .nrvers = ARRAY_SIZE(nfs_version), .version = nfs_version, .stats = &nfs_rpcstat, .pipe_dir_name = "/nfs", @@ -118,7 +118,7 @@ static struct rpc_version * nfsacl_version[] = { struct rpc_program nfsacl_program = { .name = "nfsacl", .number = NFS_ACL_PROGRAM, - .nrvers = sizeof(nfsacl_version) / sizeof(nfsacl_version[0]), + .nrvers = ARRAY_SIZE(nfsacl_version), .version = nfsacl_version, .stats = &nfsacl_rpcstat, }; diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index db99b8f678f..0b9a78353d6 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -174,7 +174,7 @@ static struct rpc_stat mnt_stats; static struct rpc_program mnt_program = { .name = "mount", .number = NFS_MNT_PROGRAM, - .nrvers = sizeof(mnt_version)/sizeof(mnt_version[0]), + .nrvers = ARRAY_SIZE(mnt_version), .version = mnt_version, .stats = &mnt_stats, }; diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 7fc0560c89c..6548a65de94 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c @@ -704,6 +704,6 @@ struct rpc_procinfo nfs_procedures[] = { struct rpc_version nfs_version2 = { .number = 2, - .nrprocs = sizeof(nfs_procedures)/sizeof(nfs_procedures[0]), + .nrprocs = ARRAY_SIZE(nfs_procedures), .procs = nfs_procedures }; diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index b6c0b5012bc..5224a191efb 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -1138,7 +1138,7 @@ struct rpc_procinfo nfs3_procedures[] = { struct rpc_version nfs_version3 = { .number = 3, - .nrprocs = sizeof(nfs3_procedures)/sizeof(nfs3_procedures[0]), + .nrprocs = ARRAY_SIZE(nfs3_procedures), .procs = nfs3_procedures }; diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4bbf5ef5778..0a1bd36a483 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -4384,7 +4384,7 @@ struct rpc_procinfo nfs4_procedures[] = { struct rpc_version nfs_version4 = { .number = 4, - .nrprocs = sizeof(nfs4_procedures)/sizeof(nfs4_procedures[0]), + .nrprocs = ARRAY_SIZE(nfs4_procedures), .procs = nfs4_procedures }; |