diff mbox series

[-next] rtw88: 8821c: make symbol 'rtw8821c_rtw_pwr_track_tbl' static

Message ID 20200721134901.33968-1-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Commit 9de6959f8584064de8c1d7392e3a6bb50a4a9c18
Delegated to: Kalle Valo
Headers show
Series [-next] rtw88: 8821c: make symbol 'rtw8821c_rtw_pwr_track_tbl' static | expand

Commit Message

Wei Yongjun July 21, 2020, 1:49 p.m. UTC
The sparse tool complains as follows:

drivers/net/wireless/realtek/rtw88/rtw8821c.c:1374:32: warning:
 symbol 'rtw8821c_rtw_pwr_track_tbl' was not declared. Should it be static?

This variable is not used outside of rtw8821c.c, so this commit
marks it static.

Fixes: 3a4312828ce1 ("rtw88: 8821c: add power tracking")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wireless/realtek/rtw88/rtw8821c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Aug. 2, 2020, 3:06 p.m. UTC | #1
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> The sparse tool complains as follows:
> 
> drivers/net/wireless/realtek/rtw88/rtw8821c.c:1374:32: warning:
>  symbol 'rtw8821c_rtw_pwr_track_tbl' was not declared. Should it be static?
> 
> This variable is not used outside of rtw8821c.c, so this commit
> marks it static.
> 
> Fixes: 3a4312828ce1 ("rtw88: 8821c: add power tracking")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

9de6959f8584 rtw88: 8821c: make symbol 'rtw8821c_rtw_pwr_track_tbl' static
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
index c41c61ee2fb6..5fef19f19ac1 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
@@ -1371,7 +1371,7 @@  static const u8 rtw8821c_pwrtrk_2g_cck_a_p[] = {
 	5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9
 };
 
-const struct rtw_pwr_track_tbl rtw8821c_rtw_pwr_track_tbl = {
+static const struct rtw_pwr_track_tbl rtw8821c_rtw_pwr_track_tbl = {
 	.pwrtrk_5gb_n[0] = rtw8821c_pwrtrk_5gb_n[0],
 	.pwrtrk_5gb_n[1] = rtw8821c_pwrtrk_5gb_n[1],
 	.pwrtrk_5gb_n[2] = rtw8821c_pwrtrk_5gb_n[2],