]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd7e0efe7bda5c24d728a0500b415b0d1131a10ff
tree6a61525fa65d9d394928da96767d650a5fb58fe5
parent2c3fe431ff254d068dbe524d746776df66a4ec1c
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: 8a4bb65d07e4 ("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