OSDN Git Service

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)
commitf7110b753b77b0639d831ad822aad557b2cf000e
treebeae441aae49f686ad9b70d6a584ec679e1668bc
parent8792e82ddb61098e7642911ad400cfc58795e362
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