Skip to content

Commit dbcc43c

Browse files
committed
rtw88: Fix Sparse warning for rtw8821c_hw_spec
Sparse lists the following: CHECK rtw8821c.c rtw8821c.c:1880:22: warning: symbol 'rtw8821c_hw_spec' was not declared. Should it be static? The warning arises because the external declaration for rtw8821c_hw_spec occurs in rtw8821ce.h, which is not included in rtw8821c.h. That line is moved, and the now empty file rtw8821ce.h is deleted. Symbol 'rtw8821c_hw_spec' can be made constant. Signed-off-by: Larry Finger <[email protected]>
1 parent 9a0526b commit dbcc43c

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

rtw8821c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ static const struct rtw_reg_domain coex_info_hw_regs_8821c[] = {
18751875
{0x60A, MASKBYTE0, RTW_REG_DOMAIN_MAC8},
18761876
};
18771877

1878-
struct rtw_chip_info rtw8821c_hw_spec = {
1878+
const struct rtw_chip_info rtw8821c_hw_spec = {
18791879
.ops = &rtw8821c_ops,
18801880
.id = RTW_CHIP_TYPE_8821C,
18811881
.fw_name = "rtw88/rtw8821c_fw.bin",

rtw8821c.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
8484
rtw_write32_mask(rtwdev, addr + 0x200, mask, data);
8585
}
8686

87+
extern const struct rtw_chip_info rtw8821c_hw_spec;
88+
8789
#define rtw_write32s_mask(rtwdev, addr, mask, data) \
8890
do { \
8991
BUILD_BUG_ON((addr) < 0xC00 || (addr) >= 0xD00); \

rtw8821ce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <linux/module.h>
66
#include <linux/pci.h>
77
#include "pci.h"
8-
#include "rtw8821ce.h"
8+
#include "rtw8821c.h"
99

1010
static const struct pci_device_id rtw_8821ce_id_table[] = {
1111
{

rtw8821ce.h

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)