Skip to content

Commit

Permalink
net: hns3: make symbol 'hclge_mac_speed_map_to_fw' static
Browse files Browse the repository at this point in the history
The sparse tool complains as follows:

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2656:28: warning:
 symbol 'hclge_mac_speed_map_to_fw' was not declared. Should it be static?

This symbol is not used outside of hclge_main.c, so marks it static.

Fixes: e46da6a ("net: hns3: refine function hclge_cfg_mac_speed_dup_hw()")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Nov 30, 2021
1 parent 9ace230 commit c019087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,7 @@ static u8 hclge_check_speed_dup(u8 duplex, int speed)
return duplex;
}

struct hclge_mac_speed_map hclge_mac_speed_map_to_fw[] = {
static struct hclge_mac_speed_map hclge_mac_speed_map_to_fw[] = {
{HCLGE_MAC_SPEED_10M, HCLGE_FW_MAC_SPEED_10M},
{HCLGE_MAC_SPEED_100M, HCLGE_FW_MAC_SPEED_100M},
{HCLGE_MAC_SPEED_1G, HCLGE_FW_MAC_SPEED_1G},
Expand Down

0 comments on commit c019087

Please sign in to comment.