lkml.org 
[lkml]   [2019]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 07/12] net: stmmac: Add ethtool register dump for XGMAC cores
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

\
 
 \ /
  Last update: 2019-08-13 23:20    [W:0.081 / U:4.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site