[PATCH] sfc: ef10: Fix assigning negative value to unsigned variable
From: Haowen Bai
Date: Thu Apr 07 2022 - 22:11:40 EST
fix warning reported by smatch:
251 drivers/net/ethernet/sfc/ef10.c:2259 efx_ef10_tx_tso_desc()
warn: assigning (-208) to unsigned variable 'ip_tot_len'
Signed-off-by: Haowen Bai <baihaowen@xxxxxxxxx>
---
drivers/net/ethernet/sfc/ef10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 50d535981a35..1434510dbdc9 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -2218,7 +2218,7 @@ int efx_ef10_tx_tso_desc(struct efx_tx_queue *tx_queue, struct sk_buff *skb,
u16 outer_ipv4_id = 0;
struct tcphdr *tcp;
struct iphdr *ip;
- u16 ip_tot_len;
+ s16 ip_tot_len;
u32 seqnum;
u32 mss;
--
2.7.4