Commit f429298d authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

wifi: rtw88: Fix sparse warning for rtw8822b_hw_spec

Sparse lists the following for rtw88:

  CHECK   drivers/net/wireless/realtek/rtw88/rtw8822b.c
drivers/net/wireless/realtek/rtw88/rtw8822b.c:2500:22: warning: symbol 'rtw8822b_hw_spec' was not declared. Should it be static?

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

Symbol 'rtw8822b_hw_spec' can be made constant.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220524153621.19027-2-Larry.Finger@lwfinger.net
parent 32621eb6
......@@ -2497,7 +2497,7 @@ static struct rtw_hw_reg_offset rtw8822b_edcca_th[] = {
[EDCCA_TH_H2L_IDX] = {{.addr = 0x8a4, .mask = MASKBYTE1}, .offset = 0},
};
struct rtw_chip_info rtw8822b_hw_spec = {
const struct rtw_chip_info rtw8822b_hw_spec = {
.ops = &rtw8822b_ops,
.id = RTW_CHIP_TYPE_8822B,
.fw_name = "rtw88/rtw8822b_fw.bin",
......
......@@ -187,4 +187,6 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
#define REG_ANTWT 0x1904
#define REG_IQKFAILMSK 0x1bf0
extern const struct rtw_chip_info rtw8822b_hw_spec;
#endif
......@@ -5,7 +5,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include "pci.h"
#include "rtw8822be.h"
#include "rtw8822b.h"
static const struct pci_device_id rtw_8822be_id_table[] = {
{
......
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/* Copyright(c) 2018-2019 Realtek Corporation
*/
#ifndef __RTW_8822BE_H_
#define __RTW_8822BE_H_
extern struct rtw_chip_info rtw8822b_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