[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <CZSOG0WG0FAJ.23WQ5CB6Q8RIZ@kernel.org>
Date: Wed, 13 Mar 2024 15:03:52 +0100
From: "Michael Walle" <mwalle@...nel.org>
To: "Aapo Vienamo" <aapo.vienamo@...ux.intel.com>
Cc: "Miquel Raynal" <miquel.raynal@...tlin.com>, "Richard Weinberger"
<richard@....at>, "Vignesh Raghavendra" <vigneshr@...com>,
<linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>, "Mika
Westerberg" <mika.westerberg@...ux.intel.com>
Subject: Re: [PATCH 2/2] mtd: core: Don't fail mtd_device_parse_register()
if OTP is unsupported
Hi,
On Wed Mar 13, 2024 at 2:59 PM CET, Aapo Vienamo wrote:
> On Wed, Mar 13, 2024 at 10:24:13AM +0100, Michael Walle wrote:
> > On Mon Mar 11, 2024 at 5:20 PM CET, Aapo Vienamo wrote:
> > > On Mon, Mar 11, 2024 at 03:38:17PM +0100, Michael Walle wrote:
> > > > Also, you'll print an error message for EOPNOTSUPP, although that is
> > > > not really an error. Is that intended?
> > >
> > > Well, when we hit this, the functionality of the SPI memory itself is
> > > degraded in the sense that the OTP functionality is not available. What
> > > would you suggest?
> >
> > But it's not really an error, I mean, we are ignoring that one on
> > purpose now :) I'd just guard it with "if (ret != -EOPNOTSUPP)".
>
> To clarify, are you suggesting a modification like this to the code at
> the end of mtd_otp_nvmem_add()?
>
> err:
> nvmem_unregister(...);
> if (ret != EOPNOTSUPP)
> return dev_err_probe(...);
> return 0;
Yes, either this variant, then you don't need to fix the caller or
return EOPNOTSUPP but just don't print the message.
-michael
Download attachment "signature.asc" of type "application/pgp-signature" (253 bytes)
Powered by blists - more mailing lists