OSDN Git Service

dsa: sja1105: dynamically allocate stats structure
authorArnd Bergmann <arnd@arndb.de>
Tue, 5 May 2020 15:38:19 +0000 (17:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2020 00:47:32 +0000 (17:47 -0700)
commitae1804de93f6f1626906567ae7deec8e0111259d
tree6a61525fa65d9d394928da96767d650a5fb58fe5
parent9e330bf469e02e64d46cb150a2ec65310b9412ea
dsa: sja1105: dynamically allocate stats structure

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 allocation to avoid this.

Fixes: 336aa67bd027 ("net: dsa: sja1105: show more ethtool statistics counters for P/Q/R/S")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_ethtool.c