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: Fri, 4 Feb 2022 19:27:21 -0800 From: Jakub Kicinski <kuba@...nel.org> To: Prasanna Vengateshan <prasanna.vengateshan@...rochip.com> Cc: <andrew@...n.ch>, <netdev@...r.kernel.org>, <olteanv@...il.com>, <robh+dt@...nel.org>, <UNGLinuxDriver@...rochip.com>, <Woojung.Huh@...rochip.com>, <hkallweit1@...il.com>, <linux@...linux.org.uk>, <davem@...emloft.net>, <linux-kernel@...r.kernel.org>, <vivien.didelot@...il.com>, <f.fainelli@...il.com>, <devicetree@...r.kernel.org> Subject: Re: [PATCH v7 net-next 07/10] net: dsa: microchip: add support for ethtool port counters On Fri, 4 Feb 2022 23:14:57 +0530 Prasanna Vengateshan wrote: > +static void lan937x_get_strings(struct dsa_switch *ds, int port, u32 stringset, > + uint8_t *buf) not stdint types in the kernel, please use u8 instead > +{ > + struct ksz_device *dev = ds->priv; > + int i; > + > + if (stringset != ETH_SS_STATS) > + return; > + > + for (i = 0; i < dev->mib_cnt; i++) { > + memcpy(buf + i * ETH_GSTRING_LEN, lan937x_mib_names[i].string, > + ETH_GSTRING_LEN); > + } parenthesis unnecessary around single expression Also check out ethtool_sprintf(), although not strictly necessary since you're not formatting
Powered by blists - more mailing lists