diff options
author | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2008-01-10 17:04:25 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2008-01-10 17:04:25 -0500 |
commit | 967c9ec4ec6178bee42f4231c49a3d7f77627978 (patch) | |
tree | 0e2315f29af2a8b560a1c277cf86550021b6fc6f /fs/jfs | |
parent | da8a41d19233c2bdcc59447aedc808fcdaabf5b7 (diff) |
JFS: simplify types to get rid of sparse warning
jfs_metapage.c was using uints and unsigned ints inconsistently when
regular ints suffice.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_metapage.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 1dfaae5adf1b..d1e64f2f2fcd 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -88,7 +88,7 @@ struct meta_anchor { | |||
88 | }; | 88 | }; |
89 | #define mp_anchor(page) ((struct meta_anchor *)page_private(page)) | 89 | #define mp_anchor(page) ((struct meta_anchor *)page_private(page)) |
90 | 90 | ||
91 | static inline struct metapage *page_to_mp(struct page *page, uint offset) | 91 | static inline struct metapage *page_to_mp(struct page *page, int offset) |
92 | { | 92 | { |
93 | if (!PagePrivate(page)) | 93 | if (!PagePrivate(page)) |
94 | return NULL; | 94 | return NULL; |
@@ -153,7 +153,7 @@ static inline void dec_io(struct page *page, void (*handler) (struct page *)) | |||
153 | } | 153 | } |
154 | 154 | ||
155 | #else | 155 | #else |
156 | static inline struct metapage *page_to_mp(struct page *page, uint offset) | 156 | static inline struct metapage *page_to_mp(struct page *page, int offset) |
157 | { | 157 | { |
158 | return PagePrivate(page) ? (struct metapage *)page_private(page) : NULL; | 158 | return PagePrivate(page) ? (struct metapage *)page_private(page) : NULL; |
159 | } | 159 | } |
@@ -249,7 +249,7 @@ static inline void drop_metapage(struct page *page, struct metapage *mp) | |||
249 | */ | 249 | */ |
250 | 250 | ||
251 | static sector_t metapage_get_blocks(struct inode *inode, sector_t lblock, | 251 | static sector_t metapage_get_blocks(struct inode *inode, sector_t lblock, |
252 | unsigned int *len) | 252 | int *len) |
253 | { | 253 | { |
254 | int rc = 0; | 254 | int rc = 0; |
255 | int xflag; | 255 | int xflag; |
@@ -352,11 +352,11 @@ static void metapage_write_end_io(struct bio *bio, int err) | |||
352 | static int metapage_writepage(struct page *page, struct writeback_control *wbc) | 352 | static int metapage_writepage(struct page *page, struct writeback_control *wbc) |
353 | { | 353 | { |
354 | struct bio *bio = NULL; | 354 | struct bio *bio = NULL; |
355 | unsigned int block_offset; /* block offset of mp within page */ | 355 | int block_offset; /* block offset of mp within page */ |
356 | struct inode *inode = page->mapping->host; | 356 | struct inode *inode = page->mapping->host; |
357 | unsigned int blocks_per_mp = JFS_SBI(inode->i_sb)->nbperpage; | 357 | int blocks_per_mp = JFS_SBI(inode->i_sb)->nbperpage; |
358 | unsigned int len; | 358 | int len; |
359 | unsigned int xlen; | 359 | int xlen; |
360 | struct metapage *mp; | 360 | struct metapage *mp; |
361 | int redirty = 0; | 361 | int redirty = 0; |
362 | sector_t lblock; | 362 | sector_t lblock; |
@@ -366,7 +366,7 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc) | |||
366 | sector_t page_start; | 366 | sector_t page_start; |
367 | unsigned long bio_bytes = 0; | 367 | unsigned long bio_bytes = 0; |
368 | unsigned long bio_offset = 0; | 368 | unsigned long bio_offset = 0; |
369 | unsigned int offset; | 369 | int offset; |
370 | 370 | ||
371 | page_start = (sector_t)page->index << | 371 | page_start = (sector_t)page->index << |
372 | (PAGE_CACHE_SHIFT - inode->i_blkbits); | 372 | (PAGE_CACHE_SHIFT - inode->i_blkbits); |
@@ -428,7 +428,7 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc) | |||
428 | continue; | 428 | continue; |
429 | } | 429 | } |
430 | set_bit(META_io, &mp->flag); | 430 | set_bit(META_io, &mp->flag); |
431 | len = min(xlen, (uint) JFS_SBI(inode->i_sb)->nbperpage); | 431 | len = min(xlen, (int)JFS_SBI(inode->i_sb)->nbperpage); |
432 | 432 | ||
433 | bio = bio_alloc(GFP_NOFS, 1); | 433 | bio = bio_alloc(GFP_NOFS, 1); |
434 | bio->bi_bdev = inode->i_sb->s_bdev; | 434 | bio->bi_bdev = inode->i_sb->s_bdev; |
@@ -480,13 +480,13 @@ static int metapage_readpage(struct file *fp, struct page *page) | |||
480 | { | 480 | { |
481 | struct inode *inode = page->mapping->host; | 481 | struct inode *inode = page->mapping->host; |
482 | struct bio *bio = NULL; | 482 | struct bio *bio = NULL; |
483 | unsigned int block_offset; | 483 | int block_offset; |
484 | unsigned int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits; | 484 | int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits; |
485 | sector_t page_start; /* address of page in fs blocks */ | 485 | sector_t page_start; /* address of page in fs blocks */ |
486 | sector_t pblock; | 486 | sector_t pblock; |
487 | unsigned int xlen; | 487 | int xlen; |
488 | unsigned int len; | 488 | unsigned int len; |
489 | unsigned int offset; | 489 | int offset; |
490 | 490 | ||
491 | BUG_ON(!PageLocked(page)); | 491 | BUG_ON(!PageLocked(page)); |
492 | page_start = (sector_t)page->index << | 492 | page_start = (sector_t)page->index << |
@@ -535,7 +535,7 @@ static int metapage_releasepage(struct page *page, gfp_t gfp_mask) | |||
535 | { | 535 | { |
536 | struct metapage *mp; | 536 | struct metapage *mp; |
537 | int ret = 1; | 537 | int ret = 1; |
538 | unsigned int offset; | 538 | int offset; |
539 | 539 | ||
540 | for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) { | 540 | for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) { |
541 | mp = page_to_mp(page, offset); | 541 | mp = page_to_mp(page, offset); |