Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2166773iof; Tue, 7 Jun 2022 21:58:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQlg9F1neKugPgakMWrclWur/S3ALaeGymhBAWd7Xmx3nssEcpNwuYRtfdM2JCiMkNrQL3 X-Received: by 2002:a65:66cb:0:b0:3fc:8486:2a4 with SMTP id c11-20020a6566cb000000b003fc848602a4mr28115924pgw.525.1654664311463; Tue, 07 Jun 2022 21:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654664311; cv=none; d=google.com; s=arc-20160816; b=HZjptTdiT2RfRdhtrOIX28+agvuU8G4TsWh+xYdf3zoUdkMJyhsHeFdaQl6Yzq/7fS 7ngxMBFMx89joqu8jcdpeuI4Aa8K0kmMuUqunBTDYCczr9qRF7kygUd8yh0rJASVCEo8 LjvswKsMPLcjvagYLRNfENAHX1nF0xai7iErlS6pLDGPCm4nx7ApQEzNfEFqo0epvUnx dVHTtw79z8H/DS2Gh7VjZZpOVpIjfc1128NzkejoJKiMOXx7RUYjOC492CU+eCdg0xOC O++wW/HaPCreGA9uYSRjV97cZfce1gV9K8s5y2uzVNUqtAb5jwYBeGtIHfL/7JsZpl8i LhZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cIQs/oH511ZGrAjmN85kRKuxytz1/+P3/5DfjEqxfEc=; b=oOSuFCHFLXPrKJ9LFHNyvLcQGeDNBr9kSGEKSSL6M/FoRARum4pcTuKGGMPuL4CF6a +zxohNfq5dWuIF2WdFtvUN0UTSaE9HVcZwSDttO8WyZKLUfydGirUo9OiU9P9j88jrgb CMwm7rzfbIq/NyOwnu02JvKahOMbc8itNZyIF202EXbs1eAJADCO7cXMRxIC+BbJF1Gd CSWkb4ieoRC65KQRY6hDhgBoL+q7LuFt+DXmcxpyVb24xb7xEa/5naZJih6vhnBCnH5J uKMEaEP2XDG8heIIbIuUYVtJFJKTKtM7tFQuUGsERZ/0Ax3mA3S/Yv2kLkGUsFHLEXpx O63w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Af3+vOTn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 101-20020a17090a0fee00b001e31fad7db1si25130768pjz.24.2022.06.07.21.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Af3+vOTn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DCDC145CB53; Tue, 7 Jun 2022 21:31:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383507AbiFGWFi (ORCPT + 99 others); Tue, 7 Jun 2022 18:05:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379082AbiFGVFK (ORCPT ); Tue, 7 Jun 2022 17:05:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57056BA557; Tue, 7 Jun 2022 11:49:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A722AB8239A; Tue, 7 Jun 2022 18:49:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00403C385A2; Tue, 7 Jun 2022 18:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627749; bh=pBcuqRJyXkrcTTWjrJgll4gSCsKtCBBitGAKZhcs2VI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Af3+vOTnVM7B+jXif7uOmzSpueWI/NmEexsugJm2CBXEJ0UoiE8/DR8V462cv8ShI dr9ZHdQXOUqH9O2YWsfbVzSe2v3Q77AZVqYxAGzLR9rZzRU/z6G9LKW1DjKxYlb48g lGybx7E/JDlwuhksMNbe/fcbZ9JL7gjLNL3cf5Bw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haowen Bai , Edward Cree , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.18 080/879] sfc: ef10: Fix assigning negative value to unsigned variable Date: Tue, 7 Jun 2022 18:53:18 +0200 Message-Id: <20220607165005.011913913@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Haowen Bai [ Upstream commit b8ff3395fbdf3b79a99d0ef410fc34c51044121e ] 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 Acked-by: Edward Cree Link: https://lore.kernel.org/r/1649640757-30041-1-git-send-email-baihaowen@meizu.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- 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 f8edb3f1b73a..186cb28c03bd 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); -- 2.35.1