From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-wireless@vger.kernel.org, open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] wifi: rt2x00: use non of nvmem_cell_get
Date: Sat, 21 Feb 2026 11:07:50 +0100 [thread overview]
Message-ID: <20260221100750.GA62045@wp.pl> (raw)
In-Reply-To: <CAKxU2N9teQSu+JTszxo_jbaYwfOT63513DziRq0X8KNkVj_jqw@mail.gmail.com>
On Fri, Feb 20, 2026 at 01:32:55PM -0800, Rosen Penev wrote:
> On Fri, Feb 20, 2026 at 2:37 AM Stanislaw Gruszka <stf_xl@wp.pl> wrote:
> >
> > On Thu, Feb 19, 2026 at 06:09:08PM -0800, Rosen Penev wrote:
> > > The library doesn't necessarily depend on OF. This codepath is used by
> > > both soc (OF only) and pci (no such requirement). After this, the only
> > > of specific function is of_get_mac_address, which is needed for nvmem.
> > >
> > > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
> >
> > > ---
> > > drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> > > index 65d0f805459c..93e4ce604171 100644
> > > --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> > > +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> > > @@ -10965,13 +10965,13 @@ EXPORT_SYMBOL_GPL(rt2800_read_eeprom_efuse);
> > >
> > > int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev)
> > > {
> > > - struct device_node *np = rt2x00dev->dev->of_node;
> > > + struct device *dev = rt2x00dev->dev;
> > > unsigned int len = rt2x00dev->ops->eeprom_size;
> > > struct nvmem_cell *cell;
> > > const void *data;
> > > size_t retlen;
> > >
> > > - cell = of_nvmem_cell_get(np, "eeprom");
> > > + cell = nvmem_cell_get(dev, "eeprom");
> most usages of nvmem_cell_get in wireless use devm instead. Seems
> pointless to extend the lifetime of cell until removal but what do I
> know...
No need for devm_ here, we release resources locally.
You can change other drivers, to avoid keeping nvem cell reference
needlessly, if you think that's beneficial.
Regards
Stanislaw
next prev parent reply other threads:[~2026-02-21 10:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 2:09 [PATCH] wifi: rt2x00: use non of nvmem_cell_get Rosen Penev
2026-02-20 10:37 ` Stanislaw Gruszka
2026-02-20 21:32 ` Rosen Penev
2026-02-21 10:07 ` Stanislaw Gruszka [this message]
2026-02-23 8:27 ` Johannes Berg
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=20260221100750.GA62045@wp.pl \
--to=stf_xl@wp.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rosenp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox