[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240304161735.75b14548@wsk>
Date: Mon, 4 Mar 2024 16:17:35 +0100
From: Lukasz Majewski <lukma@...x.de>
To: Andrew Lunn <andrew@...n.ch>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>, Eric Dumazet
<edumazet@...gle.com>, Vladimir Oltean <olteanv@...il.com>, "David S.
Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
netdev@...r.kernel.org, Tristram.Ha@...rochip.com, Sebastian Andrzej
Siewior <bigeasy@...utronix.de>, Paolo Abeni <pabeni@...hat.com>, Ravi
Gunasekaran <r-gunasekaran@...com>, Nikita Zhandarovich
<n.zhandarovich@...tech.ru>, Murali Karicheri <m-karicheri2@...com>, Ziyang
Xuan <william.xuanziyang@...wei.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: hsr: Use full string description when opening HSR
network device
Hi Andrew,
> On Mon, Mar 04, 2024 at 10:32:20AM +0100, Lukasz Majewski wrote:
> > Up till now only single character ('A' or 'B') was used to provide
> > information of HSR slave network device status.
> >
> > As it is also possible and valid, that Interlink network device may
> > be supported as well, the description must be more verbose. As a
> > result the full string description is now used.
> >
> > Signed-off-by: Lukasz Majewski <lukma@...x.de>
> > ---
> > net/hsr/hsr_device.c | 13 ++++++-------
> > 1 file changed, 6 insertions(+), 7 deletions(-)
> >
> > diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
> > index 9d71b66183da..9a60489fba96 100644
> > --- a/net/hsr/hsr_device.c
> > +++ b/net/hsr/hsr_device.c
> > @@ -142,30 +142,29 @@ static int hsr_dev_open(struct net_device
> > *dev) {
> > struct hsr_priv *hsr;
> > struct hsr_port *port;
> > - char designation;
> > + char *designation = NULL;
>
> Thanks for splitting this into a patch.
>
> Reverse Christmas tree. I know it is broken already, but we should not
> make it worse.
>
> I guess you can also add a const, since "Slave A" is probably const.
>
Yes, "Slave A/B" would be allocated in .rodata (as it it just a string
label).
const keyword added would help with the readability.
> Andrew
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@...x.de
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists