提交 3991d3bd 编写于 作者: T Tomasz Kvarsin 提交者: Linus Torvalds

[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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 bc1fc6d8
...@@ -1283,11 +1283,11 @@ static void bh_lru_install(struct buffer_head *bh) ...@@ -1283,11 +1283,11 @@ static void bh_lru_install(struct buffer_head *bh)
* Look up the bh in this cpu's LRU. If it's there, move it to the head. * Look up the bh in this cpu's LRU. If it's there, move it to the head.
*/ */
static struct buffer_head * static struct buffer_head *
lookup_bh_lru(struct block_device *bdev, sector_t block, int size) lookup_bh_lru(struct block_device *bdev, sector_t block, unsigned size)
{ {
struct buffer_head *ret = NULL; struct buffer_head *ret = NULL;
struct bh_lru *lru; struct bh_lru *lru;
int i; unsigned int i;
check_irqs_on(); check_irqs_on();
bh_lru_lock(); bh_lru_lock();
...@@ -1319,7 +1319,7 @@ lookup_bh_lru(struct block_device *bdev, sector_t block, int size) ...@@ -1319,7 +1319,7 @@ lookup_bh_lru(struct block_device *bdev, sector_t block, int size)
* NULL * NULL
*/ */
struct buffer_head * struct buffer_head *
__find_get_block(struct block_device *bdev, sector_t block, int size) __find_get_block(struct block_device *bdev, sector_t block, unsigned size)
{ {
struct buffer_head *bh = lookup_bh_lru(bdev, block, size); struct buffer_head *bh = lookup_bh_lru(bdev, block, size);
...@@ -1347,7 +1347,7 @@ EXPORT_SYMBOL(__find_get_block); ...@@ -1347,7 +1347,7 @@ EXPORT_SYMBOL(__find_get_block);
* attempt is failing. FIXME, perhaps? * attempt is failing. FIXME, perhaps?
*/ */
struct buffer_head * struct buffer_head *
__getblk(struct block_device *bdev, sector_t block, int size) __getblk(struct block_device *bdev, sector_t block, unsigned size)
{ {
struct buffer_head *bh = __find_get_block(bdev, block, size); struct buffer_head *bh = __find_get_block(bdev, block, size);
...@@ -1361,7 +1361,7 @@ EXPORT_SYMBOL(__getblk); ...@@ -1361,7 +1361,7 @@ EXPORT_SYMBOL(__getblk);
/* /*
* Do async read-ahead on a buffer.. * Do async read-ahead on a buffer..
*/ */
void __breadahead(struct block_device *bdev, sector_t block, int size) void __breadahead(struct block_device *bdev, sector_t block, unsigned size)
{ {
struct buffer_head *bh = __getblk(bdev, block, size); struct buffer_head *bh = __getblk(bdev, block, size);
if (likely(bh)) { if (likely(bh)) {
...@@ -1381,7 +1381,7 @@ EXPORT_SYMBOL(__breadahead); ...@@ -1381,7 +1381,7 @@ EXPORT_SYMBOL(__breadahead);
* It returns NULL if the block was unreadable. * It returns NULL if the block was unreadable.
*/ */
struct buffer_head * struct buffer_head *
__bread(struct block_device *bdev, sector_t block, int size) __bread(struct block_device *bdev, sector_t block, unsigned size)
{ {
struct buffer_head *bh = __getblk(bdev, block, size); struct buffer_head *bh = __getblk(bdev, block, size);
......
...@@ -174,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *); ...@@ -174,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *);
void thaw_bdev(struct block_device *, struct super_block *); void thaw_bdev(struct block_device *, struct super_block *);
int fsync_super(struct super_block *); int fsync_super(struct super_block *);
int fsync_no_super(struct block_device *); int fsync_no_super(struct block_device *);
struct buffer_head *__find_get_block(struct block_device *, sector_t, int); struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
struct buffer_head * __getblk(struct block_device *, sector_t, int); unsigned size);
struct buffer_head *__getblk(struct block_device *bdev, sector_t block,
unsigned size);
void __brelse(struct buffer_head *); void __brelse(struct buffer_head *);
void __bforget(struct buffer_head *); void __bforget(struct buffer_head *);
void __breadahead(struct block_device *, sector_t block, int size); void __breadahead(struct block_device *, sector_t block, unsigned int size);
struct buffer_head *__bread(struct block_device *, sector_t block, int size); struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size);
struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
void free_buffer_head(struct buffer_head * bh); void free_buffer_head(struct buffer_head * bh);
void FASTCALL(unlock_buffer(struct buffer_head *bh)); void FASTCALL(unlock_buffer(struct buffer_head *bh));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册