Re: [PATCH] [net-next] dsa: sja1105: dynamically allocate stats structure

2020-05-05 Thread Arnd Bergmann
On Tue, May 5, 2020 at 4:04 PM Andrew Lunn wrote: > > > - rc = sja1105_port_status_get(priv, &status, port); > > + rc = sja1105_port_status_get(priv, status, port); > > if (rc < 0) { > > dev_err(ds->dev, "Failed to read port %d counters: %d\n", > >

Re: [PATCH] [net-next] dsa: sja1105: dynamically allocate stats structure

2020-05-05 Thread Andrew Lunn
> - rc = sja1105_port_status_get(priv, &status, port); > + rc = sja1105_port_status_get(priv, status, port); > if (rc < 0) { > dev_err(ds->dev, "Failed to read port %d counters: %d\n", > port, rc); > - return; > + goto out;;

[PATCH] [net-next] dsa: sja1105: dynamically allocate stats structure

2020-05-05 Thread Arnd Bergmann
The addition of sja1105_port_status_ether structure into the statistics causes the frame size to go over the warning limit: drivers/net/dsa/sja1105/sja1105_ethtool.c:421:6: error: stack frame size of 1104 bytes in function 'sja1105_get_ethtool_stats' [-Werror,-Wframe-larger-than=] Use dynamic a