2008-07-29 00:37:30

by Harvey Harrison

[permalink] [raw]
Subject: [PATCH] omfs: fix sparse signedness warnings

fs/omfs/bitmap.c:74:18: warning: incorrect type in argument 2 (different signedness)
fs/omfs/bitmap.c:74:18: expected unsigned long volatile *addr
fs/omfs/bitmap.c:74:18: got long *<noident>
fs/omfs/bitmap.c:77:20: warning: incorrect type in argument 2 (different signedness)
fs/omfs/bitmap.c:77:20: expected unsigned long volatile *addr
fs/omfs/bitmap.c:77:20: got long *<noident>
fs/omfs/bitmap.c:112:17: warning: incorrect type in argument 2 (different signedness)
fs/omfs/bitmap.c:112:17: expected unsigned long volatile *addr
fs/omfs/bitmap.c:112:17: got long *<noident>

Signed-off-by: Harvey Harrison <[email protected]>
---
Sorry, missed these in my other sparse warning fixes, feel free to fold it
with the other one.

fs/omfs/bitmap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/omfs/bitmap.c b/fs/omfs/bitmap.c
index dc75f22..697663b 100644
--- a/fs/omfs/bitmap.c
+++ b/fs/omfs/bitmap.c
@@ -71,10 +71,10 @@ static int set_run(struct super_block *sb, int map,
}
if (set) {
set_bit(bit, sbi->s_imap[map]);
- set_bit(bit, (long *) bh->b_data);
+ set_bit(bit, (unsigned long *)bh->b_data);
} else {
clear_bit(bit, sbi->s_imap[map]);
- clear_bit(bit, (long *) bh->b_data);
+ clear_bit(bit, (unsigned long *)bh->b_data);
}
}
mark_buffer_dirty(bh);
@@ -109,7 +109,7 @@ int omfs_allocate_block(struct super_block *sb, u64 block)
if (!bh)
goto out;

- set_bit(bit, (long *) bh->b_data);
+ set_bit(bit, (unsigned long *)bh->b_data);
mark_buffer_dirty(bh);
brelse(bh);
}
--
1.6.0.rc1.154.ge3fc



2008-07-29 02:26:55

by Bob Copeland

[permalink] [raw]
Subject: Re: [PATCH] omfs: fix sparse signedness warnings

On Mon, Jul 28, 2008 at 05:37:08PM -0700, Harvey Harrison wrote:
> Sorry, missed these in my other sparse warning fixes, feel free to fold it
> with the other one.

Looks good, thanks.

--
Bob Copeland %% http://www.bobcopeland.com