MTD: fix printk warning
PATCH 1/1 MTD: fix printk warning
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.
drivers/mtd/mtd_blkdevs.c +1 -1
@@ -69,7 +69,7 @@ static int do_blktrans_request(struct mtreturn 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 ; } }
David Woodhouse
Applieddrivers/mtd/mtd_blkdevs.c static int do_blktrans_request(struct mt · line 72
Quoted 7 lines · Jeff Garzik
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’drivers/mtd/mtd_blkdevs.c +1
-1-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.
Signature · 1 line
dwmw2