]> 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>
Fri, 6 Sep 2019 11:28:04 +0000 (12:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Sep 2019 16:03:05 +0000 (18:03 +0200)
commit2428b2318a55db88b232f0fe44cf16d2d3531ab1
treee5fcb3742138316a0e7cba00e697261beee6ca06
parentcea2fe11f1dd5b2a9c2c13d0afa9a35158116f7c
net: hns3: make array spec_opcode static const, makes object smaller

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

Before:
   text    data     bss     dec     hex filename
   6914    1040     128    8082    1f92 hns3/hns3vf/hclgevf_cmd.o

After:
   text    data     bss     dec     hex filename
   6866    1040     128    8034    1f62 hns3/hns3vf/hclgevf_cmd.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/hns3/hns3vf/hclgevf_cmd.c