Commit 89d8f53f authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

wifi: rtw88: Fix Sparse warning for rtw8821c_hw_spec

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: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220524153716.20450-1-Larry.Finger@lwfinger.net
parent e36db29c
...@@ -1877,7 +1877,7 @@ static const struct rtw_reg_domain coex_info_hw_regs_8821c[] = { ...@@ -1877,7 +1877,7 @@ static const struct rtw_reg_domain coex_info_hw_regs_8821c[] = {
{0x60A, MASKBYTE0, RTW_REG_DOMAIN_MAC8}, {0x60A, MASKBYTE0, RTW_REG_DOMAIN_MAC8},
}; };
struct rtw_chip_info rtw8821c_hw_spec = { const struct rtw_chip_info rtw8821c_hw_spec = {
.ops = &rtw8821c_ops, .ops = &rtw8821c_ops,
.id = RTW_CHIP_TYPE_8821C, .id = RTW_CHIP_TYPE_8821C,
.fw_name = "rtw88/rtw8821c_fw.bin", .fw_name = "rtw88/rtw8821c_fw.bin",
......
...@@ -84,6 +84,8 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data) ...@@ -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); 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) \ #define rtw_write32s_mask(rtwdev, addr, mask, data) \
do { \ do { \
BUILD_BUG_ON((addr) < 0xC00 || (addr) >= 0xD00); \ BUILD_BUG_ON((addr) < 0xC00 || (addr) >= 0xD00); \
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
#include "pci.h" #include "pci.h"
#include "rtw8821ce.h" #include "rtw8821c.h"
static const struct pci_device_id rtw_8821ce_id_table[] = { static const struct pci_device_id rtw_8821ce_id_table[] = {
{ {
......
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/* Copyright(c) 2018-2019 Realtek Corporation
*/
#ifndef __RTW_8821CE_H_
#define __RTW_8821CE_H_
extern struct rtw_chip_info rtw8821c_hw_spec;
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment