UDF: Fix compiler warning
PATCH 1/1 UDF: Fix compiler warning
From: Dirk Behme <[email protected]>
Fix compiler warning
fs/udf/balloc.c: In function 'udf_bitmap_new_block':fs/udf/balloc.c:273: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type fs/udf/balloc.c:285: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type fs/udf/balloc.c:311: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type fs/udf/balloc.c:325: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
The main fix is to add a cast in ext2_find_next_bit().
As all other usage locations of udf_find_next_one_bit() directly use bh->b_data (which is a char *), the useless (char *) cast in line 311 can be removed, too.
---
This fixes a long standing ARM Linux kernel UDF_FS build warning [1].
[1] http://armlinux.simtec.co.uk/kautobuild/2.6.37/warnings.html#modules
fs/udf/balloc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/udf/balloc.c +2 -2
@@ -31,7 +31,7 @@#define udf_set_bit (nr, addr) ext2_set_bit(nr, addr)#define udf_test_bit (nr, addr) ext2_test_bit(nr, addr)#define udf_find_next_one_bit (addr, size, offset) \ - ext2_find_next_bit(addr, size, offset) + ext2_find_next_bit((unsigned long *)(addr), size, offset) static int read_block_bitmap(struct super_block *sb, struct udf_bitmap *bitmap, unsigned int block,
@@ -297,7 +297,7 @@ repeat:break ; } }else { - bit =udf_find_next_one_bit ((char *)bh->b_data, + bit =udf_find_next_one_bit (bh->b_data, sb->s_blocksize <<3 , group_start <<3 );if (bit < sb->s_blocksize <<3 )
Signature · 1 line
1.7.4
Quoted 10 lines · George G. Davis
From: Dirk Behme <[email protected]>
Fix compiler warning
fs/udf/balloc.c: In function 'udf_bitmap_new_block':fs/udf/balloc.c:273: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer typefs/udf/balloc.c:285: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer typefs/udf/balloc.c:311: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer typefs/udf/balloc.c:325: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
Quoted 8 lines
The main fix is to add a cast in
ext2_find_next_bit().As all other usage locations of
udf_find_next_one_bit()directly usebh->b_data(which is a char *), the useless (char *) cast in line 311 can be removed, too.Signed-off-by Dirk Behme <[email protected]>Signed-off-by George G. Davis <[email protected]>
Thanks. Merged into my tree.
Honza
Quoted 33 lines
---
This fixes a long standing ARM Linux kernelUDF_FSbuild warning [1].[1] http://armlinux.simtec.co.uk/kautobuild/2.6.37/warnings.html#modules
fs/udf/balloc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)fs/udf/balloc.c +2
-2@@ -31,7 +31,7 @@#define udf_set_bit (nr, addr) ext2_set_bit(nr, addr)#define udf_test_bit (nr, addr) ext2_test_bit(nr, addr)#define udf_find_next_one_bit (addr, size, offset) \ - ext2_find_next_bit(addr, size, offset) + ext2_find_next_bit((unsigned long *)(addr), size, offset) static int read_block_bitmap(struct super_block *sb, struct udf_bitmap *bitmap, unsigned int block,@@ -297,7 +297,7 @@ repeat:break ; } }else { - bit =udf_find_next_one_bit ((char *)bh->b_data, + bit =udf_find_next_one_bit (bh->b_data, sb->s_blocksize <<3 , group_start <<3 );if (bit < sb->s_blocksize <<3 )Signature · 1 line
1.7.4
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR