From: Randy Dunlap <[email protected]>
Fix printk format warning(s):
drivers/block/nbd.c:410: warning: long unsigned int format, different type arg (arg 4)
Signed-off-by: Randy Dunlap <[email protected]>
---
drivers/block/nbd.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2618-rc3mm2.orig/drivers/block/nbd.c
+++ linux-2618-rc3mm2/drivers/block/nbd.c
@@ -407,7 +407,7 @@ static void do_nbd_request(request_queue
struct nbd_device *lo;
blkdev_dequeue_request(req);
- dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%lx)\n",
+ dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%x)\n",
req->rq_disk->disk_name, req, req->cmd_type);
if (!blk_fs_request(req))
---
From: Randy Dunlap <[email protected]>
Fix printk format warning(s):
drivers/scsi/scsi_tgt_lib.c:96: warning: long unsigned int format, different type arg (arg 6)
drivers/scsi/scsi_tgt_lib.c:293: warning: long unsigned int format, different type arg (arg 5)
drivers/scsi/scsi_tgt_lib.c:305: warning: long unsigned int format, different type arg (arg 5)
drivers/scsi/scsi_tgt_lib.c:344: warning: long unsigned int format, different type arg (arg 7)
drivers/scsi/scsi_tgt_lib.c:553: warning: long unsigned int format, different type arg (arg 8
Signed-off-by: Randy Dunlap <[email protected]>
---
drivers/scsi/scsi_tgt_lib.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
--- linux-2618-rc3mm2.orig/drivers/scsi/scsi_tgt_lib.c
+++ linux-2618-rc3mm2/drivers/scsi/scsi_tgt_lib.c
@@ -93,7 +93,7 @@ static void scsi_tgt_cmd_destroy(void *d
struct scsi_tgt_queuedata *qdata = cmd->request->q->queuedata;
unsigned long flags;
- dprintk("cmd %p %d %lu\n", cmd, cmd->sc_data_direction,
+ dprintk("cmd %p %d %u\n", cmd, cmd->sc_data_direction,
rq_data_dir(cmd->request));
spin_lock_irqsave(&qdata->cmd_hash_lock, flags);
@@ -290,7 +290,7 @@ static void scsi_tgt_cmd_done(struct scs
{
struct scsi_tgt_cmd *tcmd = cmd->request->end_io_data;
- dprintk("cmd %p %lu\n", cmd, rq_data_dir(cmd->request));
+ dprintk("cmd %p %u\n", cmd, rq_data_dir(cmd->request));
scsi_tgt_uspace_send_status(cmd, GFP_ATOMIC);
INIT_WORK(&tcmd->work, scsi_tgt_cmd_destroy, cmd);
@@ -302,7 +302,7 @@ static int __scsi_tgt_transfer_response(
struct Scsi_Host *shost = scsi_tgt_cmd_to_host(cmd);
int err;
- dprintk("cmd %p %lu\n", cmd, rq_data_dir(cmd->request));
+ dprintk("cmd %p %u\n", cmd, rq_data_dir(cmd->request));
err = shost->hostt->transfer_response(cmd, scsi_tgt_cmd_done);
switch (err) {
@@ -341,7 +341,7 @@ static int scsi_tgt_init_cmd(struct scsi
cmd->request_bufflen = rq->data_len;
- dprintk("cmd %p addr %p cnt %d %lu\n", cmd, tcmd->buffer, cmd->use_sg,
+ dprintk("cmd %p addr %p cnt %d %u\n", cmd, tcmd->buffer, cmd->use_sg,
rq_data_dir(rq));
count = blk_rq_map_sg(rq->q, rq, cmd->request_buffer);
if (likely(count <= cmd->use_sg)) {
@@ -550,7 +550,7 @@ int scsi_tgt_kspace_exec(int host_no, u3
}
cmd = rq->special;
- dprintk("cmd %p result %d len %d bufflen %u %lu %x\n", cmd,
+ dprintk("cmd %p result %d len %d bufflen %u %u %x\n", cmd,
result, len, cmd->request_bufflen, rq_data_dir(rq), cmd->cmnd[0]);
if (result == TASK_ABORTED) {
---
From: Randy Dunlap <[email protected]>
Fix printk format warning(s):
fs/cachefiles/cf-proc.c:247: warning: int format, different type arg (arg 4)
Signed-off-by: Randy Dunlap <[email protected]>
---
fs/cachefiles/cf-proc.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2618-rc3mm2.orig/fs/cachefiles/cf-proc.c
+++ linux-2618-rc3mm2/fs/cachefiles/cf-proc.c
@@ -244,7 +244,7 @@ static ssize_t cachefiles_proc_write(str
error:
kfree(data);
- _leave(" = %d", ret);
+ _leave(" = %Zd", ret);
return ret;
found_command:
---
From: Randy Dunlap <[email protected]>
Fix printk format warning(s):
drivers/mtd/mtd_blkdevs.c:72: warning: long int format, different type arg (arg 2)
Signed-off-by: Randy Dunlap <[email protected]>
---
drivers/mtd/mtd_blkdevs.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2618-rc3mm2.orig/drivers/mtd/mtd_blkdevs.c
+++ linux-2618-rc3mm2/drivers/mtd/mtd_blkdevs.c
@@ -69,7 +69,7 @@ static int do_blktrans_request(struct mt
return 1;
default:
- printk(KERN_NOTICE "Unknown request %ld\n", rq_data_dir(req));
+ printk(KERN_NOTICE "Unknown request %d\n", rq_data_dir(req));
return 0;
}
}
---
From: Randy Dunlap <[email protected]>
Fix printk format warning(s):
drivers/usb/net/usbnet.c:654: warning: int format, different type arg (arg 3)
Can't say that I understand this one...
Signed-off-by: Randy Dunlap <[email protected]>
---
drivers/usb/net/usbnet.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2618-rc3mm2.orig/drivers/usb/net/usbnet.c
+++ linux-2618-rc3mm2/drivers/usb/net/usbnet.c
@@ -652,7 +652,7 @@ static int usbnet_open (struct net_devic
framing = "simple";
devinfo (dev, "open: enable queueing "
- "(rx %d, tx %d) mtu %d %s framing",
+ "(rx %ld, tx %d) mtu %u %s framing",
RX_QLEN (dev), TX_QLEN (dev), dev->net->mtu,
framing);
}
---
Hi!
> Fix printk format warning(s):
> drivers/block/nbd.c:410: warning: long unsigned int format, different type arg (arg 4)
>
ACK, but notice that we have new nbd maintainer... for a few years
now.
Pavel
> Signed-off-by: Randy Dunlap <[email protected]>
> ---
> drivers/block/nbd.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2618-rc3mm2.orig/drivers/block/nbd.c
> +++ linux-2618-rc3mm2/drivers/block/nbd.c
> @@ -407,7 +407,7 @@ static void do_nbd_request(request_queue
> struct nbd_device *lo;
>
> blkdev_dequeue_request(req);
> - dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%lx)\n",
> + dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%x)\n",
> req->rq_disk->disk_name, req, req->cmd_type);
>
> if (!blk_fs_request(req))
>
>
> ---
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Tue, 8 Aug 2006 01:07:26 +0200 Pavel Machek wrote:
> Hi!
>
> > Fix printk format warning(s):
> > drivers/block/nbd.c:410: warning: long unsigned int format, different type arg (arg 4)
> >
>
> ACK, but notice that we have new nbd maintainer... for a few years
> now.
Please notice that I could not find that info in either of
MAINTAINERS or CREDITS.... :(
Please have him/her send a patch.
> Pavel
>
> > Signed-off-by: Randy Dunlap <[email protected]>
> > ---
> > drivers/block/nbd.c | 2 +-
> > 1 files changed, 1 insertion(+), 1 deletion(-)
> >
> > --- linux-2618-rc3mm2.orig/drivers/block/nbd.c
> > +++ linux-2618-rc3mm2/drivers/block/nbd.c
> > @@ -407,7 +407,7 @@ static void do_nbd_request(request_queue
> > struct nbd_device *lo;
> >
> > blkdev_dequeue_request(req);
> > - dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%lx)\n",
> > + dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%x)\n",
> > req->rq_disk->disk_name, req, req->cmd_type);
> >
> > if (!blk_fs_request(req))
> >
> >
> > ---
---
~Randy
On Mon 2006-08-07 16:31:47, Randy.Dunlap wrote:
> On Tue, 8 Aug 2006 01:07:26 +0200 Pavel Machek wrote:
>
> > Hi!
> >
> > > Fix printk format warning(s):
> > > drivers/block/nbd.c:410: warning: long unsigned int format, different type arg (arg 4)
> > >
> >
> > ACK, but notice that we have new nbd maintainer... for a few years
> > now.
>
> Please notice that I could not find that info in either of
> MAINTAINERS or CREDITS.... :(
>
> Please have him/her send a patch.
No, I think you can push the patch, or make it go through akpm.
It is in maintainers, but perhaps we need to add (NBD) there to help
grep?
NETWORK BLOCK DEVICE
P: Paul Clements
M: [email protected]
S: Maintained
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Tue, 8 Aug 2006 01:31:51 +0200 Pavel Machek wrote:
> On Mon 2006-08-07 16:31:47, Randy.Dunlap wrote:
> > On Tue, 8 Aug 2006 01:07:26 +0200 Pavel Machek wrote:
> >
> > > Hi!
> > >
> > > > Fix printk format warning(s):
> > > > drivers/block/nbd.c:410: warning: long unsigned int format, different type arg (arg 4)
> > > >
> > >
> > > ACK, but notice that we have new nbd maintainer... for a few years
> > > now.
> >
> > Please notice that I could not find that info in either of
> > MAINTAINERS or CREDITS.... :(
> >
> > Please have him/her send a patch.
>
> No, I think you can push the patch, or make it go through akpm.
>
> It is in maintainers, but perhaps we need to add (NBD) there to help
> grep?
OK, yes, sorry about that. I did grep for /NBD/. :)
> NETWORK BLOCK DEVICE
> P: Paul Clements
> M: [email protected]
> S: Maintained
---
~Randy
This is a note to let you know that I've just added the patch titled
Subject: usbnet: printk format warning
to my gregkh-2.6 tree. Its filename is
usbnet-printk-format-warning.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From [email protected] Mon Aug 7 15:56:22 2006
Date: Mon, 7 Aug 2006 15:56:40 -0700
From: "Randy.Dunlap" <[email protected]>
To: lkml <[email protected]>
Cc: akpm <[email protected]>, gregkh <[email protected]>
Subject: usbnet: printk format warning
Message-Id: <[email protected]>
From: Randy Dunlap <[email protected]>
Fix printk format warning(s):
drivers/usb/net/usbnet.c:654: warning: int format, different type arg (arg 3)
Can't say that I understand this one...
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/net/usbnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- gregkh-2.6.orig/drivers/usb/net/usbnet.c
+++ gregkh-2.6/drivers/usb/net/usbnet.c
@@ -652,7 +652,7 @@ static int usbnet_open (struct net_devic
framing = "simple";
devinfo (dev, "open: enable queueing "
- "(rx %d, tx %d) mtu %d %s framing",
+ "(rx %ld, tx %d) mtu %u %s framing",
RX_QLEN (dev), TX_QLEN (dev), dev->net->mtu,
framing);
}
Patches currently in gregkh-2.6 which might be from [email protected] are
driver/driver-core-fix-driver-core-kernel-doc.patch
driver/debugfs-kernel-doc-fixes-for-debugfs.patch
usb/usbnet-printk-format-warning.patch
On Mon, 7 Aug 2006 15:56:40 -0700
"Randy.Dunlap" <[email protected]> wrote:
> Fix printk format warning(s):
> drivers/usb/net/usbnet.c:654: warning: int format, different type arg (arg 3)
>
> Can't say that I understand this one...
>
> Signed-off-by: Randy Dunlap <[email protected]>
> ---
> drivers/usb/net/usbnet.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2618-rc3mm2.orig/drivers/usb/net/usbnet.c
> +++ linux-2618-rc3mm2/drivers/usb/net/usbnet.c
> @@ -652,7 +652,7 @@ static int usbnet_open (struct net_devic
> framing = "simple";
>
> devinfo (dev, "open: enable queueing "
> - "(rx %d, tx %d) mtu %d %s framing",
> + "(rx %ld, tx %d) mtu %u %s framing",
> RX_QLEN (dev), TX_QLEN (dev), dev->net->mtu,
> framing);
Your compiler wasn't very helpful. Or maybe we get better diagnostics with
a 64-bit compiler:
From: Randy Dunlap <[email protected]>
Fix printk format warning(s):
drivers/usb/net/usbnet.c: In function 'usbnet_open':
drivers/usb/net/usbnet.c:654: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
The fact that rx_urb_size happens to be a size_t has propagated all the way
back to this printk. It's fragile to be using %z in this case - let's just
typecast the args instead.
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
drivers/usb/net/usbnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/usb/net/usbnet.c~usbnet-printk-format-warning drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c~usbnet-printk-format-warning
+++ a/drivers/usb/net/usbnet.c
@@ -653,7 +653,7 @@ static int usbnet_open (struct net_devic
devinfo (dev, "open: enable queueing "
"(rx %d, tx %d) mtu %d %s framing",
- RX_QLEN (dev), TX_QLEN (dev), dev->net->mtu,
+ (int)RX_QLEN(dev), (int)TX_QLEN(dev), dev->net->mtu,
framing);
}
_
Randy.Dunlap <[email protected]> wrote:
> Fix printk format warning(s):
> fs/cachefiles/cf-proc.c:247: warning: int format, different type arg (arg 4)
Applied, thanks.
David