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

Brian Norris computersforpeace at gmail.com
Wed Jun 1 14:37:32 EDT 2011


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. 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...

Brian



More information about the linux-mtd mailing list