[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zft8elry.fsf@kernel.org>
Date: Thu, 02 May 2024 10:05:37 +0300
From: Kalle Valo <kvalo@...nel.org>
To: Jeff Johnson <quic_jjohnson@...cinc.com>
Cc: Ziyang Huang <hzyitc@...look.com>, <jjohnson@...nel.org>,
<linux-wireless@...r.kernel.org>, <ath11k@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] wifi: ath11k: fix remapped ce accessing issue on 64bit OS
Jeff Johnson <quic_jjohnson@...cinc.com> writes:
>> static inline u32 ath11k_ahb_read32(struct ath11k_base *ab, u32 offset)
>> {
>> - return ioread32(ab->mem + offset);
>> + switch (offset & ATH11K_REG_TYPE_MASK) {
>> + case ATH11K_REG_TYPE_NORMAL:
>> + return ioread32(ab->mem + FIELD_GET(ATH11K_REG_OFFSET_MASK, offset));
>> + case ATH11K_REG_TYPE_CE:
>> + return ioread32(ab->mem_ce + FIELD_GET(ATH11K_REG_OFFSET_MASK, offset));
>> + default:
>> + BUG();
>
> you can WARN but you can't BUG (and even WARN is being discouraged)
Yeah, even WARN() is risky especially in a function like this. It can
cause so much log messages so that the wathdog can trigger and reboot
the host.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists