Skip to content

Commit 84c7e90

Browse files
committed
rtw88: Fix Sparse warning for rtw8822c_hw_spec
Sparse reports the following: CHECK rtw8822c.c rtw8822c.c:5313:22: warning: symbol 'rtw8822c_hw_spec' was not declared. Should it be static? The warning arises because the external declaration for rtw8822c_hw_spec occurs in rtw8822ce.h, which is not included in rtw8822c.h. That line is moved, and the now empty file rtw8822ce.h is deleted. Symbol 'rtw8822c_hw_spec' can be made constant. Signed-off-by: Larry Finger <[email protected]>
1 parent 57a45d6 commit 84c7e90

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

rtw8822c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5308,7 +5308,7 @@ static const struct rtw_reg_domain coex_info_hw_regs_8822c[] = {
53085308
{0xc50, MASKBYTE0, RTW_REG_DOMAIN_MAC8},
53095309
};
53105310

5311-
struct rtw_chip_info rtw8822c_hw_spec = {
5311+
const struct rtw_chip_info rtw8822c_hw_spec = {
53125312
.ops = &rtw8822c_ops,
53135313
.id = RTW_CHIP_TYPE_8822C,
53145314
.fw_name = "rtw88/rtw8822c_fw.bin",

rtw8822c.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ enum rtw8822c_dpk_one_shot_action {
118118
void rtw8822c_parse_tbl_dpk(struct rtw_dev *rtwdev,
119119
const struct rtw_table *tbl);
120120

121+
extern const struct rtw_chip_info rtw8822c_hw_spec;
122+
121123
#define RTW_DECL_TABLE_DPK(name) \
122124
const struct rtw_table name ## _tbl = { \
123125
.data = name, \

rtw8822ce.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 "rtw8822ce.h"
8+
#include "rtw8822c.h"
99

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

rtw8822ce.h

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

0 commit comments

Comments
 (0)