RE: [Intel-wired-lan] [PATCH] net/ixgbevf: make array api static const, makes object smaller

From: Bowers, AndrewX
Date: Mon Sep 09 2019 - 17:03:43 EST


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@xxxxxxxxxx] On
> Behalf Of Colin King
> Sent: Friday, September 6, 2019 4:34 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@xxxxxxxxx>; David S . Miller
> <davem@xxxxxxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx
> Cc: kernel-janitors@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [Intel-wired-lan] [PATCH] net/ixgbevf: make array api static const,
> makes object smaller
>
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> Don't populate the array api on the stack but instead make it static const.
> Makes the object code smaller by 58 bytes.
>
> Before:
> text data bss dec hex filename
> 82969 9763 256 92988 16b3c ixgbevf/ixgbevf_main.o
>
> After:
> text data bss dec hex filename
> 82815 9859 256 92930 16b02 ixgbevf/ixgbevf_main.o
>
> (gcc version 9.2.1, amd64)
>
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@xxxxxxxxx>