mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
wifi: zd1211rw: silence sparse warnings
This code wants to compare the obtained value, but as it also has a special type for register addresses to find places doing such compares and calculations wrong, we need explicit casts here to silence sparse. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240223114023.976fcd59e97a.I0bba4ef7dc2847ce8ab5ec229149e1a09413b8b9@changeid
This commit is contained in:
parent
e063243036
commit
5a391813e7
1 changed files with 3 additions and 2 deletions
|
@ -380,7 +380,7 @@ static inline void handle_regs_int(struct urb *urb)
|
|||
spin_lock_irqsave(&intr->lock, flags);
|
||||
|
||||
int_num = le16_to_cpu(*(__le16 *)(urb->transfer_buffer+2));
|
||||
if (int_num == CR_INTERRUPT) {
|
||||
if (int_num == (u16)CR_INTERRUPT) {
|
||||
struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context));
|
||||
spin_lock(&mac->lock);
|
||||
memcpy(&mac->intr_buffer, urb->transfer_buffer,
|
||||
|
@ -416,7 +416,8 @@ out:
|
|||
spin_unlock_irqrestore(&intr->lock, flags);
|
||||
|
||||
/* CR_INTERRUPT might override read_reg too. */
|
||||
if (int_num == CR_INTERRUPT && atomic_read(&intr->read_regs_enabled))
|
||||
if (int_num == (u16)CR_INTERRUPT &&
|
||||
atomic_read(&intr->read_regs_enabled))
|
||||
handle_regs_int_override(urb);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue