All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tudor Ambarus <tudor.ambarus@linaro.org>,
	Pratyush Yadav <pratyush@kernel.org>,
	Michael Walle <michael@walle.cc>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2] mtd: Avoid printing error messages on probe deferrals
Date: Mon, 20 Mar 2023 12:23:21 +0100	[thread overview]
Message-ID: <20230320122321.052d58bf@xps-13> (raw)
In-Reply-To: <b12a0baf-b7a0-80a2-fe78-08b3b227e0c5@gmail.com>

Hi Rafał,

zajec5@gmail.com wrote on Mon, 20 Mar 2023 12:17:12 +0100:

> On 7.03.2023 20:25, Miquel Raynal wrote:
> > There is no reason to complain about probe errors in case of deferrals.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > Changes in v2:
> > * Use of dev_err_probe().
> > 
> >   drivers/mtd/mtdcore.c | 9 ++++-----
> >   1 file changed, 4 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
> > index 0feacb9fbdac..e4e102585021 100644
> > --- a/drivers/mtd/mtdcore.c
> > +++ b/drivers/mtd/mtdcore.c
> > @@ -536,12 +536,11 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
> >   	mtd->nvmem = nvmem_register(&config);
> >   	if (IS_ERR(mtd->nvmem)) {
> >   		/* Just ignore if there is no NVMEM support in the kernel */
> > -		if (PTR_ERR(mtd->nvmem) == -EOPNOTSUPP) {
> > +		if (PTR_ERR(mtd->nvmem) == -EOPNOTSUPP)
> >   			mtd->nvmem = NULL;
> > -		} else {
> > -			dev_err(&mtd->dev, "Failed to register NVMEM device\n");
> > -			return PTR_ERR(mtd->nvmem);
> > -		}
> > +		else
> > +			return dev_err_probe(&mtd->dev,	PTR_ERR(mtd->nvmem),
> > +					     "Failed to register NVMEM device\n");  
> 
> Even one more improvement request possibility and request from me:
> "Failed to register NVMEM device: %d\n"

I get the request, but as I was saying in the other thread, isn't this
already handled?

https://elixir.bootlin.com/linux/latest/source/drivers/base/core.c#L4961

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2023-03-20 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 19:25 [PATCH v2] mtd: Avoid printing error messages on probe deferrals Miquel Raynal
2023-03-07 20:35 ` Michael Walle
2023-03-08 13:54   ` Miquel Raynal
2023-03-20 11:17 ` Rafał Miłecki
2023-03-20 11:23   ` Miquel Raynal [this message]
2023-03-21 12:35     ` Rafał Miłecki
2023-03-21 12:37 ` Rafał Miłecki
2023-03-22 16:08 ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320122321.052d58bf@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.