diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-10-07 12:09:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-07 10:00:20 -0400 |
commit | 3ea7af9e2caaec13a455974b04bfa357faf18baf (patch) | |
tree | 73abccb210cfdc802a404fd8b2b0c98252695d1c /drivers/net/ethernet/hisilicon | |
parent | 99d895729f5d438518c8223d7ce81615cb9a88e9 (diff) | |
download | linux-3ea7af9e2caaec13a455974b04bfa357faf18baf.tar.bz2 |
net: hns3: make array tick_array static, makes object smaller
Don't populate the array tick_array on the stack but instead make it
static. Makes the object code smaller by 29 bytes.
Before:
text data bss dec hex filename
19191 432 0 19623 4ca7 hisilicon/hns3/hns3pf/hclge_tm.o
After:
text data bss dec hex filename
19098 496 0 19594 4c8a hisilicon/hns3/hns3pf/hclge_tm.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>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c index 9f0e35f27789..5cce9b7f1d3d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c @@ -46,7 +46,7 @@ static int hclge_shaper_para_calc(u32 ir, u8 shaper_level, #define DIVISOR_CLK (1000 * 8) #define DIVISOR_IR_B_126 (126 * DIVISOR_CLK) - const u16 tick_array[HCLGE_SHAPER_LVL_CNT] = { + static const u16 tick_array[HCLGE_SHAPER_LVL_CNT] = { 6 * 256, /* Prioriy level */ 6 * 32, /* Prioriy group level */ 6 * 8, /* Port level */ |