lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211130113437.1770221-1-weiyongjun1@huawei.com>
Date:   Tue, 30 Nov 2021 11:34:37 +0000
From:   Wei Yongjun <weiyongjun1@...wei.com>
To:     <weiyongjun1@...wei.com>, Yisen Zhuang <yisen.zhuang@...wei.com>,
        Salil Mehta <salil.mehta@...wei.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Huazhong Tan <tanhuazhong@...wei.com>,
        Guangbin Huang <huangguangbin2@...wei.com>,
        Jian Shen <shenjian15@...wei.com>,
        Yufeng Mo <moyufeng@...wei.com>,
        Jiaran Zhang <zhangjiaran@...wei.com>,
        liaoguojia <liaoguojia@...wei.com>
CC:     <netdev@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        Hulk Robot <hulkci@...wei.com>
Subject: [PATCH net-next] net: hns3: make symbol 'hclge_mac_speed_map_to_fw' static

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@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
 .../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 7de4c56ef014..1815fcf168b0 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},

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ