diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2008-04-30 03:54:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:52 -0400 |
commit | 3e5a5097303eedb4ffae2719843eb064221b1db4 (patch) | |
tree | 3b1de7bb20e5f344b4c96a8c5a4830823c1b7b5d /fs/hfs | |
parent | f735295b14ae073a8302d7b1da894bc597724557 (diff) |
hfs: fix warning with 64k PAGE_SIZE
fs/hfs/btree.c: In function 'hfs_bmap_alloc':
fs/hfs/btree.c:263: warning: comparison is always false due to limited range of data type
The patch makes the warning go away, but the code might actually be buggy?
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/btree.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 24cf6fc43021..f6621a785202 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c | |||
@@ -208,7 +208,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
208 | struct hfs_bnode *node, *next_node; | 208 | struct hfs_bnode *node, *next_node; |
209 | struct page **pagep; | 209 | struct page **pagep; |
210 | u32 nidx, idx; | 210 | u32 nidx, idx; |
211 | u16 off, len; | 211 | unsigned off; |
212 | u16 off16; | ||
213 | u16 len; | ||
212 | u8 *data, byte, m; | 214 | u8 *data, byte, m; |
213 | int i; | 215 | int i; |
214 | 216 | ||
@@ -235,7 +237,8 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
235 | node = hfs_bnode_find(tree, nidx); | 237 | node = hfs_bnode_find(tree, nidx); |
236 | if (IS_ERR(node)) | 238 | if (IS_ERR(node)) |
237 | return node; | 239 | return node; |
238 | len = hfs_brec_lenoff(node, 2, &off); | 240 | len = hfs_brec_lenoff(node, 2, &off16); |
241 | off = off16; | ||
239 | 242 | ||
240 | off += node->page_offset; | 243 | off += node->page_offset; |
241 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); | 244 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); |
@@ -280,7 +283,8 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
280 | return next_node; | 283 | return next_node; |
281 | node = next_node; | 284 | node = next_node; |
282 | 285 | ||
283 | len = hfs_brec_lenoff(node, 0, &off); | 286 | len = hfs_brec_lenoff(node, 0, &off16); |
287 | off = off16; | ||
284 | off += node->page_offset; | 288 | off += node->page_offset; |
285 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); | 289 | pagep = node->page + (off >> PAGE_CACHE_SHIFT); |
286 | data = kmap(*pagep); | 290 | data = kmap(*pagep); |