Commit 112917c5 authored by Colin Ian King's avatar Colin Ian King Committed by Yang Yingliang
Browse files

net: hns3: make array spec_opcode static const, makes object smaller



driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Reviewed-by: default avatarPeng Li <lipeng321@huawei.com>
Reviewed-by: default avatarZhong Zhaohui <zhongzhaohui@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent e278a917
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment