Skip to content

Commit

Permalink
wifi: rtw88: Fix Sparse warning for rtw8821c_hw_spec
Browse files Browse the repository at this point in the history
Sparse lists the following:

  CHECK   drivers/net/wireless/realtek/rtw88/rtw8821c.c
drivers/net/wireless/realtek/rtw88/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 <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220524153716.20450-1-Larry.Finger@lwfinger.net
  • Loading branch information
lwfinger authored and Kalle Valo committed May 30, 2022
1 parent e36db29 commit 89d8f53
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/realtek/rtw88/rtw8821c.c
Expand Up @@ -1877,7 +1877,7 @@ static const struct rtw_reg_domain coex_info_hw_regs_8821c[] = {
{0x60A, MASKBYTE0, RTW_REG_DOMAIN_MAC8},
};

struct rtw_chip_info rtw8821c_hw_spec = {
const struct rtw_chip_info rtw8821c_hw_spec = {
.ops = &rtw8821c_ops,
.id = RTW_CHIP_TYPE_8821C,
.fw_name = "rtw88/rtw8821c_fw.bin",
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/realtek/rtw88/rtw8821c.h
Expand Up @@ -84,6 +84,8 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
rtw_write32_mask(rtwdev, addr + 0x200, mask, data);
}

extern const struct rtw_chip_info rtw8821c_hw_spec;

#define rtw_write32s_mask(rtwdev, addr, mask, data) \
do { \
BUILD_BUG_ON((addr) < 0xC00 || (addr) >= 0xD00); \
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/realtek/rtw88/rtw8821ce.c
Expand Up @@ -5,7 +5,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include "pci.h"
#include "rtw8821ce.h"
#include "rtw8821c.h"

static const struct pci_device_id rtw_8821ce_id_table[] = {
{
Expand Down
10 changes: 0 additions & 10 deletions drivers/net/wireless/realtek/rtw88/rtw8821ce.h

This file was deleted.

0 comments on commit 89d8f53

Please sign in to comment.