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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",
+2 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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[] = {
	{
+0 −10
Original line number Diff line number Diff line
/* 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