Re: [PATCH v1 1/1] skd_main: use %*ph to dump small buffers

From: Andy Shevchenko
Date: Tue May 10 2016 - 11:00:33 EST


On Tue, May 10, 2016 at 5:45 PM, Jens Axboe <axboe@xxxxxx> wrote:
> On 05/06/2016 01:26 PM, Andy Shevchenko wrote:
>>
>> Replace custom approach by %*ph specifier to dump small buffers in hex
>> format.
>>
>> Unfortunately we can't use print_hex_dump_bytes() here since tha gap is
>> present, though one familiar with the code may change this.
>
>
> Did you test this?

Apparently I missed this somehow.

Typo is obvious, b[i] -> &b[i]

I will send an update and be sure that is compiled successfully.
Thanks!

>
> CC [M] drivers/block/skd_main.o
> In file included from include/linux/kernel.h:13:0,
> from drivers/block/skd_main.c:19:
> drivers/block/skd_main.c: In function âskd_send_fitmsgâ:
> include/linux/kern_levels.h:4:18: warning: format â%pâ expects argument
> of type âvoid *â, but argument 6 has type âintâ [-Wformat=]
> #define KERN_SOH "\001" /* ASCII Start Of Header */
> ^
> include/linux/printk.h:114:10: note: in definition of macro âno_printkâ
> printk(fmt, ##__VA_ARGS__); \
> ^
> include/linux/kern_levels.h:14:20: note: in expansion of macro
> âKERN_SOHâ
> #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
> ^
> include/linux/printk.h:289:12: note: in expansion of macro âKERN_DEBUGâ
> no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> ^
> drivers/block/skd_main.c:2141:4: note: in expansion of macro âpr_debugâ
> pr_debug("%s:%s:%d msg[%2d] %8ph\n",
> ^
> drivers/block/skd_main.c: In function âskd_send_special_fitmsgâ:
> include/linux/kern_levels.h:4:18: warning: format â%pâ expects argument
> of type âvoid *â, but argument 6 has type âintâ [-Wformat=]
> #define KERN_SOH "\001" /* ASCII Start Of Header */
> ^
> include/linux/printk.h:114:10: note: in definition of macro âno_printkâ
> printk(fmt, ##__VA_ARGS__); \
> ^
> include/linux/kern_levels.h:14:20: note: in expansion of macro
> âKERN_SOHâ
> #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
> ^
> include/linux/printk.h:289:12: note: in expansion of macro âKERN_DEBUGâ
> no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> ^
> drivers/block/skd_main.c:2175:4: note: in expansion of macro âpr_debugâ
> pr_debug("%s:%s:%d spcl[%2d] %8ph\n",
> ^
>
> --
> Jens Axboe



--
With Best Regards,
Andy Shevchenko