Re: [PATCH] of: use pr_fmt prefix for all console printing

From: Joe Perches
Date: Thu Jun 02 2016 - 16:10:24 EST


On Thu, 2016-06-02 at 14:56 -0500, Rob Herring wrote:
> On Thu, Jun 2, 2016 at 12:33 PM, Frank Rowand <frowand.list@xxxxxxxxx> wrote:
[]
> > > @@ -355,8 +355,6 @@ int of_overlay_create(struct device_node *tree)
> > >
> > >       id = idr_alloc(&ov_idr, ov, 0, 0, GFP_KERNEL);
> > >       if (id < 0) {
> > > -             pr_err("%s: idr_alloc() failed for tree@%s\n",
> > > -                             __func__, tree->full_name);
> > Every other error in of_overlay_create() results in a pr_err().
> > (The other cases of removing pr_err() in this file are fine, because
> > the errors are already reported in the functions called from this
> > function.)
> >
> > I would recommend leaving in the pr_err() for idr_alloc() failure.
> I was thinking idr_alloc is going to call kmalloc which will print
> errors on failure, but there may be some case it doesn't.

Only if __GFP_NOWARN is used.
And it's not used in any idr_alloc call.