Re: [PATCH 3/6] dyndbg: add more info to -E2BIG log warning

From: Jim Cromie
Date: Mon Sep 24 2012 - 17:15:54 EST


On Mon, Sep 24, 2012 at 1:04 PM, Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
> On Mon, Sep 24, 2012 at 9:00 PM, Jason Baron <jbaron@xxxxxxxxxx> wrote:
>>> - pr_warn("expected <%d bytes into control\n", USER_BUF_PAGE);
>
> %u?
>
>>> + pr_warn("expected <%d bytes into control, you wrote %d\n",
>>> + USER_BUF_PAGE, (int) len);
>>
>> The style here, I think, is generally to leave out the space, ie: (int)len.
>
> Better, remove the cast and use "%zu" to properly format the size_t.
>

Ack, thanks. Update coming soon.

Is there a suitable macro defn to replace this?

#define USER_BUF_PAGE 4096

grep -r 4096 include/ fs/ finds plenty, but none look particularly
appropriate here.


> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/