summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/zydas
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-02-23 11:40:27 +0100
committerKalle Valo <kvalo@kernel.org>2024-02-28 13:37:23 +0200
commit5a391813e7ef5f12a55e3266a6832732916c7c10 (patch)
tree9673506574de72a32d972dda71b152d3c925c581 /drivers/net/wireless/zydas
parente06324303662fc23bb91e4e9d86650fb8c6d8398 (diff)
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
Diffstat (limited to 'drivers/net/wireless/zydas')
-rw-r--r--drivers/net/wireless/zydas/zd1211rw/zd_usb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
index 8505d84eeed6..f3b567a13ded 100644
--- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
@@ -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);
}