[PATCH 1/2] mtd: nand: generalized error messages with __func__

Artem Bityutskiy dedekind1 at gmail.com
Fri Jun 3 11:35:17 EDT 2011


On Wed, 2011-06-01 at 11:37 -0700, Brian Norris wrote:
> On Wed, Jun 1, 2011 at 3:30 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> >> or should we define our own pr_fmt in include/linux/mtd.h?
> >
> > Yes, before you include files.
> 
> Well, I've tried this, and as I suspected, I can't just include it in
> mtd.h at the top, since we can't guarantee that <linux/mtd/mtd.h> is
> going to be the first included header in other files.

In any case we do not want to blow the kernel binary size by too many
__func__ strings. They should be used only when needed.

>  Specifically, in
> include/linux/mtd/nand.h, we include other headers before mtd.h and so
> printk.h has already defined pr_fmt() for us, so this doesn't work.
> I'm not sure if there's a nice place to define pr_fmt() right now...

.c files, AFAIU.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list