Hello Alok, > -----Original Message----- > From: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx> > Sent: Thursday, August 28, 2025 8:42 PM > To: Michael Dege <michael.dege@xxxxxxxxxxx>; Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>; > niklas.soderlund <niklas.soderlund@xxxxxxxxxxxx>; Paul Barker <paul@xxxxxxxxxxx>; Andrew Lunn > <andrew+netdev@xxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; > Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx> > Cc: netdev@xxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Nikita > Yushchenko <nikita.yoush@xxxxxxxxxxxxxxxxxx> > Subject: Re: [PATCH net-next v4 3/4] net: renesas: rswitch: add offloading for L2 switching > > > > On 8/28/2025 3:53 PM, Michael Dege wrote: > > +static int rswitch_get_port_parent_id(struct net_device *ndev, > > + struct netdev_phys_item_id *ppid) { > > + struct rswitch_device *rdev = netdev_priv(ndev); > > + const char *name; > > + > > + name = dev_name(&rdev->priv->pdev->dev); > > + ppid->id_len = min_t(size_t, strlen(name), sizeof(ppid->id_len)); > > + memcpy(ppid->id, name, ppid->id_len); > > Please recheck here sizeof(ppid->id_len) or sizeof(ppid->id) it currently uses sizeof(ppid->id_len), > which is just 1 byte, so id_len will always be limited to 1. > Thank you! Very good catch. I will fix it and send an update. Best Regards, Michael > > + > > + return 0; > > +} > > + > > > Thanks, > Alok ________________________________ Renesas Electronics Europe GmbH Registered Office: Arcadiastrasse 10 DE-40472 Duesseldorf Commercial Registry: Duesseldorf, HRB 3708 Managing Director: Carsten Jauch VAT-No.: DE 14978647 Tax-ID-No: 105/5839/1793 Legal Disclaimer: This e-mail communication (and any attachment/s) is confidential and contains proprietary information, some or all of which may be legally privileged. It is intended solely for the use of the individual or entity to which it is addressed. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.