[Linux-stm32] [PATCH net-next v2 07/12] net: stmmac: Add ethtool register dump for XGMAC cores
Jakub Kicinski
jakub.kicinski at netronome.com
Tue Aug 13 21:19:18 UTC 2019
On Mon, 12 Aug 2019 11:44:06 +0200, Jose Abreu wrote:
> static void stmmac_ethtool_gregs(struct net_device *dev,
> struct ethtool_regs *regs, void *space)
> {
> - u32 *reg_space = (u32 *) space;
> -
> struct stmmac_priv *priv = netdev_priv(dev);
> + int size = stmmac_ethtool_get_regs_len(dev);
> + u32 *reg_space = (u32 *) space;
>
> - memset(reg_space, 0x0, REG_SPACE_SIZE);
> + memset(reg_space, 0x0, size);
no need to zero regs, ethtool core zallocs them
More information about the Linux-stm32
mailing list