* [PATCH] MTD: fix printk warning
@ 2006-10-01 16:16 Jeff Garzik
2006-10-01 17:23 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2006-10-01 16:16 UTC (permalink / raw)
To: dwmw2, Andrew Morton, LKML; +Cc: axboe
gcc spits out this warning:
drivers/mtd/mtd_blkdevs.c: In function ‘do_blktrans_request’:
drivers/mtd/mtd_blkdevs.c:72: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘unsigned int’
This could be fixed any number of ways, including use of BUG().
rq_data_dir() only returns 0 or 1, so this entire case is superfluous.
I did the most simple fix.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 6baf5fe..178b53b 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/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 %u\n", rq_data_dir(req));
return 0;
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] MTD: fix printk warning
2006-10-01 16:16 [PATCH] MTD: fix printk warning Jeff Garzik
@ 2006-10-01 17:23 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2006-10-01 17:23 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, LKML, axboe, rdunlap
On Sun, 2006-10-01 at 12:16 -0400, Jeff Garzik wrote:
> gcc spits out this warning:
>
> drivers/mtd/mtd_blkdevs.c: In function ‘do_blktrans_request’:
> drivers/mtd/mtd_blkdevs.c:72: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘unsigned int’
> - printk(KERN_NOTICE "Unknown request %ld\n", rq_data_dir(req));
> + printk(KERN_NOTICE "Unknown request %u\n", rq_data_dir(req));
Applied; thanks. I'd applied it once already and reverted it because it
seemed wrong -- but now the change which made it necessary is upstream.
--
dwmw2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-01 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-01 16:16 [PATCH] MTD: fix printk warning Jeff Garzik
2006-10-01 17:23 ` David Woodhouse
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®