Skip to contentSkip to conversation

mt7601u: do not use WARN_ON in the datapath

PATCH In review Lorenzo Bianconi 3 participants 3 messages Jan 22, 2019 – Feb 1, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 mt7601u: do not use WARN_ON in the datapath

In reply to a message not in the archive

Substitute WARN_ON with WARN_ON_ONCE in mt7601u_rx_next_seg_len routine

---
 drivers/net/wireless/mediatek/mt7601u/dma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt7601u/dma.c +3 -3
index 7f3e3983b781..f7edeffb2b19 100644
@@ -124,9 +124,9 @@ static u16 mt7601u_rx_next_seg_len(u8 *data, u32 data_len)
 	u16 dma_len = get_unaligned_le16(data);
 
 	if (data_len < min_seg_len ||
-	    WARN_ON(!dma_len) ||
-	    WARN_ON(dma_len + MT_DMA_HDRS > data_len) ||
-	    WARN_ON(dma_len & 0x3))
+	    WARN_ON_ONCE(!dma_len) ||
+	    WARN_ON_ONCE(dma_len + MT_DMA_HDRS > data_len) ||
+	    WARN_ON_ONCE(dma_len & 0x3))
 		return 0;
 
 	return MT_DMA_HDRS + dma_len;
Signature · 1 line
2.20.1
#3 lore raw
In reply to Lorenzo Bianconi
Quoted 5 lines · Lorenzo Bianconi

Substitute WARN_ON with WARN_ON_ONCE in mt7601u_rx_next_seg_len routine

Patch applied to wireless-drivers-next.git, thanks.

b6958ad021c1 mt7601u: do not use WARN_ON in the datapath

Signature · 3 lines
https://patchwork.kernel.org/patch/10775829/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches