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

Artem Bityutskiy dedekind1 at gmail.com
Thu May 26 01:16:48 EDT 2011


On Thu, 2011-05-26 at 08:14 +0300, Igor Grinberg wrote:
> On 05/26/11 00:59, Brian Norris wrote:
> 
> > These simple printk error messages can be a little simpler to maintain
> > when they use the __func__ identifier.
> 
> While this is a good thing you are doing, I'd suggest using pr_err macro
> and may be even pr_fmt.
> 
> pr_err() will save you from the need to define the log level each time.
> pr_fmt will save you the need to add %s: and __func__.

Right, but in this _particular_ case the best thing to do is to just
kill the error messages - if any of the allocation functions fail they
print a large scary warning with a backtrace anyway, and the backtrace
will contain the caller function names.

Brian, would you please instead just zap the prints?

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




More information about the linux-mtd mailing list