fs/adfs/dir_fplus.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
authorFabian Frederick <fabf@skynet.be>
Fri, 8 Aug 2014 21:22:22 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:24 +0000 (15:57 -0700)
Use kernel.h definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/adfs/dir_fplus.c

index d9e3bee4e653ff2c6df48006ddcdb3119082233a..7673c1fdbfc090e3c715b99a48baeba234ed4a92 100644 (file)
@@ -55,7 +55,7 @@ adfs_fplus_read(struct super_block *sb, unsigned int id, unsigned int sz, struct
        }
 
        size >>= sb->s_blocksize_bits;
-       if (size > sizeof(dir->bh)/sizeof(dir->bh[0])) {
+       if (size > ARRAY_SIZE(dir->bh)) {
                /* this directory is too big for fixed bh set, must allocate */
                struct buffer_head **bh_fplus =
                        kzalloc(size * sizeof(struct buffer_head *),
This page took 0.027204 seconds and 5 git commands to generate.