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

Brian Norris computersforpeace at gmail.com
Tue Jun 7 18:57:22 EDT 2011


On Tue, Jun 7, 2011 at 12:26 AM, Igor Grinberg <grinberg at compulab.co.il> wrote:
> You should not define pr_fmt() in .h file.
> pr_fmt() should be defined in _.c_ file at the top - _before any include is done_.
> And yes, like Artem already said, _only_ in those _.c_ files where we want to use it.

Hmm, well I guess I'll try defining pr_fmt() in nand_bbt.c only. Look
for the following patchset shortly:
* removing those printk's when a memory allocations fail
* changing other printk's to pr_*'s
* changing some DEBUG messages to dev_dbg
* define pr_fmt() to include __func__ in debug messages for nand_bbt.c

The only inconsistency with the 4th patch is that it adds the __func__
prefix to some print messages that didn't have them previously. Thus,
I'd be fine if the 4th patch is dropped.

Thanks,
Brian



More information about the linux-mtd mailing list