diff mbox series

[net-next] net: hns3: make symbol 'hclge_mac_speed_map_to_fw' static

Message ID 20211130113437.1770221-1-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Commit c0190879323f88be22a0debda814680dc6e66751
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: hns3: make symbol 'hclge_mac_speed_map_to_fw' static | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Wei Yongjun Nov. 30, 2021, 11:34 a.m. UTC
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>
---
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 30, 2021, 12:30 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 30 Nov 2021 11:34:37 +0000 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] net: hns3: make symbol 'hclge_mac_speed_map_to_fw' static
    https://git.kernel.org/netdev/net-next/c/c0190879323f

You are awesome, thank you!
diff mbox series

Patch

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},