]> git.baikalelectronics.ru Git - kernel.git/commit
hinic: reduce rss_init stack usage
authorArnd Bergmann <arnd@arndb.de>
Fri, 28 Jun 2019 10:31:44 +0000 (12:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:30:05 +0000 (09:30 -0700)
commit7bf17d78b1f63dd590292415bffbdcd9cd0cf791
treebeae441aae49f686ad9b70d6a584ec679e1668bc
parente845619d4ecb1644e262397fce0558664efc9c41
hinic: reduce rss_init stack usage

On 32-bit architectures, putting an array of 256 u32 values on the
stack uses more space than the warning limit:

drivers/net/ethernet/huawei/hinic/hinic_main.c: In function 'hinic_rss_init':
drivers/net/ethernet/huawei/hinic/hinic_main.c:286:1: error: the frame size of 1068 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

I considered changing the code to use u8 values here, since that's
all the hardware supports, but dynamically allocating the array is
a more isolated fix here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/huawei/hinic/hinic_main.c