[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <02afcfd1dc4d4c258c2c5ffbda2688c8@AcuMS.aculab.com>
Date: Wed, 19 Jul 2023 08:47:57 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Andrew Lunn' <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>
CC: Kees Cook <kees@...nel.org>,
"justinstitt@...gle.com" <justinstitt@...gle.com>,
Florian Fainelli <f.fainelli@...il.com>,
"Vladimir Oltean" <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
"Eric Dumazet" <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kees Cook <keescook@...omium.org>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: RE: [PATCH] net: dsa: remove deprecated strncpy
From: Andrew Lunn
> Sent: 18 July 2023 20:31
...
> Maybe we should actually add another helper:
>
> ethtool_name_cpy(u8 **data, unsigned int index, const char *name);
>
> Then over the next decade, slowly convert all drivers to it. And then
> eventually replace the u8 with a struct including the length.
Define the structure with the length from the start.
Add a wrapper that allows the length to be absent.
(Either ignoring the length or using 0/infinity to mean no length.)
Then you don't need to visit everywhere twice - just some places.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists