]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: make array spec_opcode static const, makes object smaller
authorColin Ian King <colin.king@canonical.com>
Thu, 19 Aug 2021 11:58:13 +0000 (12:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Aug 2021 12:23:20 +0000 (13:23 +0100)
commit34fa903ff1d339ae32c6a2189010c9e45a28de70
tree8be48807dfda19f0a2fb44fc8ed11e29848cdf58
parent2ac4f3b07ecf7f32c384014cd0fb2205b9d196bf
net: hns3: make array spec_opcode static const, makes object smaller

Don't populate the array spec_opcode on the stack but instead it
static const. Makes the object code smaller by 158 bytes:

Before:
   text   data   bss     dec    hex filename
  12271   3976   128   16375   3ff7 .../hisilicon/hns3/hns3pf/hclge_cmd.o

After:
   text   data   bss     dec    hex filename
  12017   4072   128   16217   3f59 .../hisilicon/hns3/hns3pf/hclge_cmd.o

(gcc version 10.3.0)

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