diff options
author | Tomasz Kvarsin <kvarsin@gmail.com> | 2007-02-12 03:52:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:29 -0500 |
commit | 3991d3bd1506391d8feec209b1d22ccb1c03a0bf (patch) | |
tree | b9a691fe6b0bc2bf3c98e64348472fa81de7ddab | |
parent | bc1fc6d88c646ea071de34250552051a63000d70 (diff) |
[PATCH] warning fix: unsigned->signed
While compiling my code with -Wconversion using gcc-trunk, I always get a
bunch of warrning from headers, here is fix for them:
__getblk is alawys called with unsigned argument,
but it takes signed, the same story with __bread,__breadahead and so on.
Signed-off-by: Tomasz Kvarsin
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/buffer.c | 12 | ||||
-rw-r--r-- | include/linux/buffer_head.h | 10 |
2 files changed, 12 insertions, 10 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index a4b824234fb9..f99c509697cd 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1283,11 +1283,11 @@ static void bh_lru_install(struct buffer_head *bh) | |||
1283 | * Look up the bh in this cpu's LRU. If it's there, move it to the head. | 1283 | * Look up the bh in this cpu's LRU. If it's there, move it to the head. |
1284 | */ | 1284 | */ |
1285 | static struct buffer_head * | 1285 | static struct buffer_head * |
1286 | lookup_bh_lru(struct block_device *bdev, sector_t block, int size) | 1286 | lookup_bh_lru(struct block_device *bdev, sector_t block, unsigned size) |
1287 | { | 1287 | { |
1288 | struct buffer_head *ret = NULL; | 1288 | struct buffer_head *ret = NULL; |
1289 | struct bh_lru *lru; | 1289 | struct bh_lru *lru; |
1290 | int i; | 1290 | unsigned int i; |
1291 | 1291 | ||
1292 | check_irqs_on(); | 1292 | check_irqs_on(); |
1293 | bh_lru_lock(); | 1293 | bh_lru_lock(); |
@@ -1319,7 +1319,7 @@ lookup_bh_lru(struct block_device *bdev, sector_t block, int size) | |||
1319 | * NULL | 1319 | * NULL |
1320 | */ | 1320 | */ |
1321 | struct buffer_head * | 1321 | struct buffer_head * |
1322 | __find_get_block(struct block_device *bdev, sector_t block, int size) | 1322 | __find_get_block(struct block_device *bdev, sector_t block, unsigned size) |
1323 | { | 1323 | { |
1324 | struct buffer_head *bh = lookup_bh_lru(bdev, block, size); | 1324 | struct buffer_head *bh = lookup_bh_lru(bdev, block, size); |
1325 | 1325 | ||
@@ -1347,7 +1347,7 @@ EXPORT_SYMBOL(__find_get_block); | |||
1347 | * attempt is failing. FIXME, perhaps? | 1347 | * attempt is failing. FIXME, perhaps? |
1348 | */ | 1348 | */ |
1349 | struct buffer_head * | 1349 | struct buffer_head * |
1350 | __getblk(struct block_device *bdev, sector_t block, int size) | 1350 | __getblk(struct block_device *bdev, sector_t block, unsigned size) |
1351 | { | 1351 | { |
1352 | struct buffer_head *bh = __find_get_block(bdev, block, size); | 1352 | struct buffer_head *bh = __find_get_block(bdev, block, size); |
1353 | 1353 | ||
@@ -1361,7 +1361,7 @@ EXPORT_SYMBOL(__getblk); | |||
1361 | /* | 1361 | /* |
1362 | * Do async read-ahead on a buffer.. | 1362 | * Do async read-ahead on a buffer.. |
1363 | */ | 1363 | */ |
1364 | void __breadahead(struct block_device *bdev, sector_t block, int size) | 1364 | void __breadahead(struct block_device *bdev, sector_t block, unsigned size) |
1365 | { | 1365 | { |
1366 | struct buffer_head *bh = __getblk(bdev, block, size); | 1366 | struct buffer_head *bh = __getblk(bdev, block, size); |
1367 | if (likely(bh)) { | 1367 | if (likely(bh)) { |
@@ -1381,7 +1381,7 @@ EXPORT_SYMBOL(__breadahead); | |||
1381 | * It returns NULL if the block was unreadable. | 1381 | * It returns NULL if the block was unreadable. |
1382 | */ | 1382 | */ |
1383 | struct buffer_head * | 1383 | struct buffer_head * |
1384 | __bread(struct block_device *bdev, sector_t block, int size) | 1384 | __bread(struct block_device *bdev, sector_t block, unsigned size) |
1385 | { | 1385 | { |
1386 | struct buffer_head *bh = __getblk(bdev, block, size); | 1386 | struct buffer_head *bh = __getblk(bdev, block, size); |
1387 | 1387 | ||
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index ffbdb6621f52..dd27b1c7227f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -174,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *); | |||
174 | void thaw_bdev(struct block_device *, struct super_block *); | 174 | void thaw_bdev(struct block_device *, struct super_block *); |
175 | int fsync_super(struct super_block *); | 175 | int fsync_super(struct super_block *); |
176 | int fsync_no_super(struct block_device *); | 176 | int fsync_no_super(struct block_device *); |
177 | struct buffer_head *__find_get_block(struct block_device *, sector_t, int); | 177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
178 | struct buffer_head * __getblk(struct block_device *, sector_t, int); | 178 | unsigned size); |
179 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, | ||
180 | unsigned size); | ||
179 | void __brelse(struct buffer_head *); | 181 | void __brelse(struct buffer_head *); |
180 | void __bforget(struct buffer_head *); | 182 | void __bforget(struct buffer_head *); |
181 | void __breadahead(struct block_device *, sector_t block, int size); | 183 | void __breadahead(struct block_device *, sector_t block, unsigned int size); |
182 | struct buffer_head *__bread(struct block_device *, sector_t block, int size); | 184 | struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); |
183 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); | 185 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); |
184 | void free_buffer_head(struct buffer_head * bh); | 186 | void free_buffer_head(struct buffer_head * bh); |
185 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); | 187 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); |