Skip to content

Commit

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

  CHECK   drivers/net/wireless/realtek/rtw88/rtw8723d.c
drivers/net/wireless/realtek/rtw88/rtw8723d.c:2704:22: warning: symbol 'rtw8723d_hw_spec' was not declared. Should it be static?

The warning arises because the external declaration for rtw8723d_hw_spec
occurs in rtw8723de.h, which is not included in rtw8723d.h. That line is
moved, and the now empty file rtw8723de.h is deleted.

Symbol 'rtw8723d_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/20220524153621.19027-4-Larry.Finger@lwfinger.net
  • Loading branch information
lwfinger authored and Kalle Valo committed May 30, 2022
1 parent f86fc57 commit e36db29
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/rtw8723d.c
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ static const struct rtw_reg_domain coex_info_hw_regs_8723d[] = {
{0x953, BIT(1), RTW_REG_DOMAIN_MAC8},
};

struct rtw_chip_info rtw8723d_hw_spec = {
const struct rtw_chip_info rtw8723d_hw_spec = {
.ops = &rtw8723d_ops,
.id = RTW_CHIP_TYPE_8723D,
.fw_name = "rtw88/rtw8723d_fw.bin",
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/realtek/rtw88/rtw8723d.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ struct rtw8723d_efuse {
struct rtw8723de_efuse e;
};

extern const struct rtw_chip_info rtw8723d_hw_spec;

/* phy status page0 */
#define GET_PHY_STAT_P0_PWDB(phy_stat) \
le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8))
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/realtek/rtw88/rtw8723de.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include "pci.h"
#include "rtw8723de.h"
#include "rtw8723d.h"

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

This file was deleted.

0 comments on commit e36db29

Please sign in to comment.