Re: [RFC] Remove most all #define pr_fmt(fmt) lines

From: Geert Uytterhoeven
Date: Wed Mar 28 2012 - 03:42:10 EST


On Tue, Mar 27, 2012 at 19:23, Joe Perches <joe@xxxxxxxxxxx> wrote:
> Â#ifndef pr_fmt
> +
> +#ifndef pr_fmt_std
> +#define pr_fmt_std(fmt) KBUILD_MODNAME ": " fmt
> +#endif
> +#ifndef pr_fmt_dbg
> +#define pr_fmt_dbg(fmt) fmt
> +#endif
> Â#define pr_fmt(fmt) fmt

What's the rationale behind the above line?
I had expected

#define pr_fmt(fmt) pr_fmt_std(fmt)

> +
> +#else
> +
> +#ifndef pr_fmt_std
> +#define pr_fmt_std(fmt...) pr_fmt(fmt)

Why the "fmt..." here, and "fmt" in the definitions above?

> +#endif
> +#ifndef pr_fmt_dbg
> +#define pr_fmt_dbg(fmt...) pr_fmt(fmt)
> +#endif
> +
> Â#endif

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/