]> 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)
commitb4c89dd43b1d0b4d1efcef2942ed8bf487d6010d
tree6a61525fa65d9d394928da96767d650a5fb58fe5
parent997a6c5d405e49ef516c4f79910816e95564aaa6
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: 06fb7952dbaa ("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