diff options
author | Haowen Bai <baihaowen@meizu.com> | 2022-04-11 03:32:37 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-04-12 05:53:09 +0200 |
commit | b8ff3395fbdf3b79a99d0ef410fc34c51044121e (patch) | |
tree | 64744b744b4943e88c996e4bf3f1843ae97cf4a0 | |
parent | net: bridge: offload BR_HAIRPIN_MODE, BR_ISOLATED, BR_MULTICAST_TO_UNICAST (diff) | |
download | linux-b8ff3395fbdf3b79a99d0ef410fc34c51044121e.tar.xz linux-b8ff3395fbdf3b79a99d0ef410fc34c51044121e.zip |
sfc: ef10: Fix assigning negative value to unsigned variable
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@meizu.com>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://lore.kernel.org/r/1649640757-30041-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/sfc/ef10.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index 50d535981a35..c9ee5011803f 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -2256,7 +2256,7 @@ int efx_ef10_tx_tso_desc(struct efx_tx_queue *tx_queue, struct sk_buff *skb, * guaranteed to satisfy the second as we only attempt TSO if * inner_network_header <= 208. */ - ip_tot_len = -EFX_TSO2_MAX_HDRLEN; + ip_tot_len = 0x10000 - EFX_TSO2_MAX_HDRLEN; EFX_WARN_ON_ONCE_PARANOID(mss + EFX_TSO2_MAX_HDRLEN + (tcp->doff << 2u) > ip_tot_len); |