public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: oobtest: correct printf() format specifier for 'size_t'
@ 2014-11-20  9:29 Brian Norris
  2014-11-20  9:33 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Norris @ 2014-11-20  9:29 UTC (permalink / raw)
  To: linux-mtd; +Cc: Brian Norris, Sekhar Nori, Roger Quadros

Fixes warning:

   drivers/mtd/tests/oobtest.c: In function 'memcmpshow':
   drivers/mtd/tests/oobtest.c:129: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
---
I'll roll this into the change I just merged

 drivers/mtd/tests/oobtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/tests/oobtest.c b/drivers/mtd/tests/oobtest.c
index 1fd2cdad85f0..5e061186eab1 100644
--- a/drivers/mtd/tests/oobtest.c
+++ b/drivers/mtd/tests/oobtest.c
@@ -132,7 +132,7 @@ static size_t memcmpshow(loff_t addr, const void *cs, const void *ct, size_t cou
 	for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--, i++) {
 		res = *su1 ^ *su2;
 		if (res) {
-			pr_info("error @addr[0x%lx:0x%x] 0x%x -> 0x%x diff 0x%x\n",
+			pr_info("error @addr[0x%lx:0x%zx] 0x%x -> 0x%x diff 0x%x\n",
 				(unsigned long)addr, i, *su1, *su2, res);
 			bitflips += hweight8(res);
 		}
-- 
2.2.0.rc2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: oobtest: correct printf() format specifier for 'size_t'
  2014-11-20  9:29 [PATCH] mtd: oobtest: correct printf() format specifier for 'size_t' Brian Norris
@ 2014-11-20  9:33 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2014-11-20  9:33 UTC (permalink / raw)
  To: linux-mtd; +Cc: Sekhar Nori, Roger Quadros

On Thu, Nov 20, 2014 at 01:29:43AM -0800, Brian Norris wrote:
> Fixes warning:
> 
>    drivers/mtd/tests/oobtest.c: In function 'memcmpshow':
>    drivers/mtd/tests/oobtest.c:129: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> ---
> I'll roll this into the change I just merged

Never mind, I just applied this on top, since that's easier.

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-20  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20  9:29 [PATCH] mtd: oobtest: correct printf() format specifier for 'size_t' Brian Norris
2014-11-20  9:33 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox