]> 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)
commite54f60a8b6ca46c4ec954fd2ab0c92c65e50919c
treebeae441aae49f686ad9b70d6a584ec679e1668bc
parentf640dfad5aee8d5b5363aefb925d5305d9d3531e
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