History

pstore/blk: Use "%lu" to format unsigned long

On 32-bit: fs/pstore/blk.c: In function ‘__best_effort_init’: include/linux/kern_levels.h:5:18: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘long unsigned int’ [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/kern_levels.h:14:19: note: in expansion of macro ‘KERN_SOH’ 14 | #define KERN_INFO KERN_SOH "6" /* informational */ | ^~~~~~~~ include/linux/printk.h:373:9: note: in expansion of macro ‘KERN_INFO’ 373 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~ fs/pstore/blk.c:314:3: note: in expansion of macro ‘pr_info’ 314 | pr_info("attached %s (%zu) (no dedicated panic_write!)\n", | ^~~~~~~

Geert Uytterhoeven committed 4 years ago

Commit 61eb4951 parent 923dcc51 file · +1 −1Browse files

Unified · Split

fs/pstore/blk.c+1−1
@@ -309,7 +309,7 @@ static int __init __best_effort_init(void) · 308 unmodified lines
309 if (ret)309 if (ret)
310 kfree(best_effort_dev);310 kfree(best_effort_dev);
311 else311 else
312 pr_info("attached %s (%zu) (no dedicated panic_write!)\n",312 pr_info("attached %s (%lu) (no dedicated panic_write!)\n",
313 blkdev, best_effort_dev->zone.total_size);313 blkdev, best_effort_dev->zone.total_size);
314 314
315 return ret;315 return ret;