On 6/7/22 19:25, Ping-Ke Shih wrote:
-----Original Message-----
From: Larry Finger <larry.finger@xxxxxxxxx> On Behalf Of Larry Finger
Sent: Wednesday, June 8, 2022 5:26 AM
To: Nathan Chancellor <nathan@xxxxxxxxxx>
Cc: Kalle Valo <kvalo@xxxxxxxxxx>; Johannes Berg <johannes@xxxxxxxxxxxxxxxx>;
linux-wireless@xxxxxxxxxxxxxxx; Ping-Ke Shih <pkshih@xxxxxxxxxxx>
Subject: Re: [PATCH v3 4/4] rtw88: Fix Sparse warning for rtw8821c_hw_spec
On 6/7/22 14:05, Nathan Chancellor wrote:
Hi Larry,
On Tue, May 24, 2022 at 10:37:16AM -0500, Larry Finger wrote:
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@xxxxxxxxxxxx>
I bisected this change as commit 89d8f53ff6e7 ("wifi: rtw88: Fix Sparse
warning for rtw8821c_hw_spec") in linux-next as the cause of one of my
test machines failing to boot with the following stacktrace:
BUG: unable to handle page fault for address: ffffffffc09f52f4
#PF: supervisor write access in kernel mode
Nathan,
Thanks for your excellent report. Does the attached patch fix your issue?
Hi Larry,
How about keeping rtw8821c_hw_spec const, but move ch_param[3] from
'struct rtw_chip_info' to 'struct rtw_hal'?
If you agree this, I can prepare a patch.
If that fixes the crashes, that is fine with me. The other 3 devices will need
the same fix.
Larry