Skip to contentSkip to conversation

mtd: oobtest: correct printf() format specifier for 'size_t'

PATCH In review Brian Norris 1 participant 2 messages Nov 20, 2014 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: oobtest: correct printf() format specifier for 'size_t'

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'

Cc Roger Quadros <[email protected]>
Cc Sekhar Nori <[email protected]>

---
I'll roll this into the change I just merged

 drivers/mtd/tests/oobtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/tests/oobtest.c +1 -1
index 1fd2cdad85f0..5e061186eab1 100644
@@ -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);
 		}
Signature · 1 line
2.2.0.rc2
#1 lore raw
Quoted 10 lines · Brian Norris

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'

Cc Roger Quadros <[email protected]>
Cc Sekhar Nori <[email protected]>

---
I'll roll this into the change I just merged

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

Brian