From: "Tomasz Kvarsin" <kvarsin@gmail.com>
To: "Andrew Morton" <akpm@osdl.org>
Cc: viro@zeniv.linux.org.uk, axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: [PATCH]: warrning fix: unsigned->signed
Date: Wed, 7 Feb 2007 00:39:45 +0300 [thread overview]
Message-ID: <5157576d0702061339w28adbf5fp2dbc5e86661d894@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 246 bytes --]
While compiling my code, I always get 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
[-- Attachment #2: unsigned-fix.patch --]
[-- Type: application/octet-stream, Size: 3181 bytes --]
Index: linux-2.6.20/include/linux/buffer_head.h
===================================================================
--- linux-2.6.20.orig/include/linux/buffer_head.h
+++ linux-2.6.20/include/linux/buffer_head.h
@@ -172,12 +172,12 @@ struct super_block *freeze_bdev(struct b
void thaw_bdev(struct block_device *, struct super_block *);
int fsync_super(struct super_block *);
int fsync_no_super(struct block_device *);
-struct buffer_head *__find_get_block(struct block_device *, sector_t, int);
-struct buffer_head * __getblk(struct block_device *, sector_t, int);
+struct buffer_head *__find_get_block(struct block_device *, sector_t, unsigned int);
+struct buffer_head * __getblk(struct block_device *, sector_t, unsigned int);
void __brelse(struct buffer_head *);
void __bforget(struct buffer_head *);
-void __breadahead(struct block_device *, sector_t block, int size);
-struct buffer_head *__bread(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, unsigned int size);
struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
void free_buffer_head(struct buffer_head * bh);
void FASTCALL(unlock_buffer(struct buffer_head *bh));
Index: linux-2.6.20/fs/buffer.c
===================================================================
--- linux-2.6.20.orig/fs/buffer.c
+++ linux-2.6.20/fs/buffer.c
@@ -1282,11 +1282,11 @@ static void bh_lru_install(struct buffer
* Look up the bh in this cpu's LRU. If it's there, move it to the 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 int size)
{
struct buffer_head *ret = NULL;
struct bh_lru *lru;
- int i;
+ unsigned int i;
check_irqs_on();
bh_lru_lock();
@@ -1318,7 +1318,7 @@ lookup_bh_lru(struct block_device *bdev,
* NULL
*/
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 int size)
{
struct buffer_head *bh = lookup_bh_lru(bdev, block, size);
@@ -1346,7 +1346,7 @@ EXPORT_SYMBOL(__find_get_block);
* attempt is failing. FIXME, perhaps?
*/
struct buffer_head *
-__getblk(struct block_device *bdev, sector_t block, int size)
+__getblk(struct block_device *bdev, sector_t block, unsigned int size)
{
struct buffer_head *bh = __find_get_block(bdev, block, size);
@@ -1360,7 +1360,7 @@ EXPORT_SYMBOL(__getblk);
/*
* 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 int size)
{
struct buffer_head *bh = __getblk(bdev, block, size);
if (likely(bh)) {
@@ -1380,7 +1380,7 @@ EXPORT_SYMBOL(__breadahead);
* It returns NULL if the block was unreadable.
*/
struct buffer_head *
-__bread(struct block_device *bdev, sector_t block, int size)
+__bread(struct block_device *bdev, sector_t block, unsigned int size)
{
struct buffer_head *bh = __getblk(bdev, block, size);
next reply other threads:[~2007-02-06 21:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-06 21:39 Tomasz Kvarsin [this message]
2007-02-06 22:09 ` Andrew Morton
2007-02-06 22:55 ` Oleg Verych
2007-02-07 5:31 ` Tomasz Kvarsin
2007-02-07 11:56 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5157576d0702061339w28adbf5fp2dbc5e86661d894@mail.gmail.com \
--to=kvarsin@gmail.com \
--cc=akpm@osdl.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®