]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns: make arrays static, makes object smaller
authorColin Ian King <colin.king@canonical.com>
Mon, 7 Oct 2019 10:55:10 +0000 (11:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Oct 2019 13:59:56 +0000 (09:59 -0400)
commitd7d8325b831d0d107f4f27b399b8afa30c35ded8
treeb96a186f149d40de3744bac37950c89a7f50ebaf
parent2fe75fc320282aacaa53cb60ecea1e7fb2c7203f
net: hns: make arrays static, makes object smaller

Don't populate the arrays port_map and sl_map on the stack but
instead make them static. Makes the object code smaller by 64 bytes.

Before:
   text    data     bss     dec     hex filename
  49575    6872      64   56511    dcbf hisilicon/hns/hns_dsaf_main.o

After:
   text    data     bss     dec     hex filename
  49350    7032      64   56446    dc7e hisilicon/hns/hns_dsaf_main.o

(gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c