From: Wei Yongjun weiyongjun1@huawei.com
mainline inclusion from mainline-master commit c0190879323f category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4M1HB CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
----------------------------------------------------------------------
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: e46da6a3d4d3 ("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 Reviewed-by: Yongxin Li liyongxin1@huawei.com Signed-off-by: Junxin Chen chenjunxin1@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 753e6c2fff80..5dcb06407c2b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -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},