[PATCH 6/6] net: mvpp2: convert FDT access to ofnode API
Tom Rini
trini at konsulko.com
Wed May 27 16:47:32 CEST 2026
On Wed, May 27, 2026 at 02:29:37PM +0000, Peng Fan (OSS) wrote:
> Hi Simon,
>
> Thanks for giving a look.
>
> > Subject: Re: [PATCH 6/6] net: mvpp2: convert FDT access to ofnode API
> >
> > Hi Peng,
> >
> > On 2026-05-26T07:25:09, Peng Fan (OSS) <peng.fan at oss.nxp.com>
> > wrote:
> > > net: mvpp2: convert FDT access to ofnode API
> > >
> > > Convert mvpp2 driver from legacy fdtdec/fdt_* APIs to the ofnode-
> > based
> > > interfaces.
> > >
> > > Replace usage of dev_of_offset(), fdtdec_lookup_phandle(),
> > > fdtdec_get_int(), fdt_parent_offset(), and related helpers with their
> > > ofnode equivalents, including dev_ofnode(), ofnode_parse_phandle(),
> > > ofnode_read_s32_default(), ofnode_get_parent(), and
> > > ofnode_for_each_subnode().
> > >
> > > Remove direct dependencies on gd->fdt_blob.
> > >
> > > Main changes:
> > > - Use ofnode_valid() instead of integer checks for node presence
> > > - Switch fixed-link detection to ofnode_find_subnode()
> > > - Replace uclass_get_device_by_of_offset() with
> > > uclass_get_device_by_ofnode()
> > > - Update subnode iteration and device binding to use ofnode
> > >
> > > [...]
> > >
> > > drivers/net/mvpp2.c | 54
> > > ++++++++++++++++++++++++++---------------------------
> > > 1 file changed, 27 insertions(+), 27 deletions(-)
> >
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> >
> > > diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c @@ -5436,15
> > > +5436,14 @@ static struct driver mvpp2_driver = {
> > > */
> > > static int mvpp2_base_bind(struct udevice *parent) {
> > > - const void *blob = gd->fdt_blob;
> > > - int node = dev_of_offset(parent);
> > > + ofnode node = dev_ofnode(parent);
> >
> > 'node' is now no longer used by the look of it. Do you see a warning?
>
> I use "./tools/buildman/buildman x250 ", I may miss something.
> indeed no user, I will remove it.
You have to use buildman -E to make warnings be errors. Or, *cough*, we
enable WERROR by default, as has been suggested.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260527/92c10f57/attachment.sig>
More information about the U-Boot
mailing list