lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 29 Aug 2022 15:48:26 +0200 From: Maxime Chevallier <maxime.chevallier@...tlin.com> To: Andrew Lunn <andrew@...n.ch> Cc: davem@...emloft.net, Rob Herring <robh+dt@...nel.org>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org, devicetree@...r.kernel.org, thomas.petazzoni@...tlin.com, Florian Fainelli <f.fainelli@...il.com>, Heiner Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, linux-arm-kernel@...ts.infradead.org, Vladimir Oltean <vladimir.oltean@....com>, Luka Perkov <luka.perkov@...tura.hr>, Robert Marko <robert.marko@...tura.hr> Subject: Re: [PATCH net-next v3 1/5] net: ipqess: introduce the Qualcomm IPQESS driver Hello Andrew, and thanks for the review On Sat, 27 Aug 2022 21:28:21 +0200 Andrew Lunn <andrew@...n.ch> wrote: > > +static void ipqess_get_strings(struct net_device *netdev, u32 > > stringset, > > + u8 *data) > > +{ > > + u8 *p = data; > > + u32 i; > > + > > + switch (stringset) { > > + case ETH_SS_STATS: > > + for (i = 0; i < ARRAY_SIZE(ipqess_stats); i++) { > > + memcpy(p, ipqess_stats[i].string, > > + min((size_t)ETH_GSTRING_LEN, > > + strlen(ipqess_stats[i].string) > > + 1)); > > That looks pretty similar to strlcpy(). Indeed... and after digging I even found ethtool_sprintf() which seems to fit even better :) > > +static int ipqess_get_settings(struct net_device *netdev, > > + struct ethtool_link_ksettings *cmd) > > > > It would be traditional to have the k in the name. > > > +{ > > + struct ipqess *ess = netdev_priv(netdev); > > + > > + return phylink_ethtool_ksettings_get(ess->phylink, cmd); > > +} > > + > > +static int ipqess_set_settings(struct net_device *netdev, > > + const struct ethtool_link_ksettings > > *cmd) +{ > > Here too. Agreed, I'll address that. Thanks ! Maxime > Andrew
Powered by blists - more mailing lists