OSDN Git Service

net: hns3: Constify static structs
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Mon, 21 Sep 2020 22:55:17 +0000 (00:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Sep 2020 00:31:50 +0000 (17:31 -0700)
commite4b9146849f246e77da4787657a3a95c1b6d2833
tree92643ec2bfe06c7e952886fdf1261aa4a2c05204
parent68d4fd30c83b1b208e08c954cd45e6474b148c87
net: hns3: Constify static structs

A number of static variables were not modified. Make them const to allow
the compiler to put them in read-only memory. In order to do so,
constify a couple of input pointers as well as some local pointers.
This moves about 35Kb to read-only memory as seen by the output of the
size command.

Before:
   text    data     bss     dec     hex filename
 404938  111534     640  517112   7e3f8 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge.ko

After:
   text    data     bss     dec     hex filename
 439499   76974     640  517113   7e3f9 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge.ko

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h