Re: [PATCH] hinic: reduce rss_init stack usage

From: David Miller
Date: Fri Jun 28 2019 - 12:32:18 EST


From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Fri, 28 Jun 2019 12:31:44 +0200

> 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@xxxxxxxx>

Applied to net-next.

Arnd, please make it clear what tree you are targetting in the
future. Thank you.