Message ID | 20231018030802.741923-1-yi.fang.gan@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4534016vqb; Tue, 17 Oct 2023 20:11:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG37NeuAsEi/uFnEavyXBKTQbGcU40ph7t1N2gzYHH8+VFOoANHlnpBstXgL9pADrSfSTxs X-Received: by 2002:a05:6a21:3987:b0:133:6e3d:68cd with SMTP id ad7-20020a056a21398700b001336e3d68cdmr4076977pzc.3.1697598718805; Tue, 17 Oct 2023 20:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697598718; cv=none; d=google.com; s=arc-20160816; b=N9pxKTV8u2ZZO5/0n3lQMpzXDCzTcdo8jXV7d+EPbIFoj7h2wxYEJX/aux/1Lu40jy R0oTd71DwfSfZxQ/5jp3TuvuxJso/kclTwkOGhKML31mNqr22DGcFyE+naWn9tcXdraR A6SeTeWo3NYYY2v/zbiClz5fVWXkXYm/mO4OTjOnm5tSVSdt/LEu/gso7WtH8Tmh92aw 6ZL2YxBOcTomgFlQLx9IWwriQ83fIZU36nR6QQV3iy+XVkIxjNJ7zHF4l/L6eZDEJkxI zW1bRa+qYMT+ZdX7aNy9KszfBkYbNdbeULwRh5IpKo6L4WCGyt6vmHCvx7iVHcakS+mG a/xA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ci6PIWJCAeBq50N3f3Wj3pc2nEP8+IL7wspsnrIBk4E=; fh=A3J55twubSq1oXlPKlTk9CziPh3328/nLTgQajj2MYg=; b=LmVLjl7WJKmKR6ZOYA0eg8Aswgz2Zme+RVQOREYs4o3s81/ElcKkSeNjzJCQl1/a2k iR89xmrSvGaW8ahQZMuYRE9K/xsuHeYL5xPDYeIy+QK8GFrG2jg7vH7WNUBEDk5jq8l8 t9t3YF1s/qls92+qvwEEvMheHfj02jT1n1Rd4a1jzeFnsuuduGqhP1CmYRMV904/Bme2 nZvB0cgMhwph9NCNLLpe4WyQ+AZ6oJEpc7/OXvl3se0/fHweH2Wf4G2fl2qkLy4fWBlN c3TkmeCPwSq28wpbmCalIHTkloesAWXcZ20bnNNVbGSdjY43NAIkfQzMwS0riLKTM/jF 2pcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fRZYt6aJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x10-20020a170902ec8a00b001c613b5e778si3457547plg.557.2023.10.17.20.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 20:11:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fRZYt6aJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4022E80BE3FC; Tue, 17 Oct 2023 20:11:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbjJRDLe (ORCPT <rfc822;zwp10758@gmail.com> + 23 others); Tue, 17 Oct 2023 23:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjJRDLc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 17 Oct 2023 23:11:32 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D48C4; Tue, 17 Oct 2023 20:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697598691; x=1729134691; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Yn9ROtkQUbrVMJYFJ3Gpu6KvcZ63WcxQJEA/jUOtYz8=; b=fRZYt6aJDfrFnNkg5i+HmjdQWhPaHsQIYz+5kmpWEd0FGHARM8Xmth9y 0Ch1TBIyJ5lQ2mVLkrcNLuP+rDUt2Ilacbqjm1RUfZrh8FlRJ2yWdxiEk 4VlfqRByX9Z3X5TyJFBglzoj8siq2H9sc55bYRZiMJjF6rSHU3I3i6aqw b0406EdQ9PbxWvczFp7ZpYVWzk48jBqV0iYgylJ7fippA9yP4LD6EK9b5 zQvwctVTtvy9KnLOU1eN4X2iDlKn9lX51at1RhWS2YKDHuyuehfTx7oqO I7uaQUwzfIS1cxcf9OIe1GrOGKf/ZE9lvxR8vOBzoQUTQJ9DgeQhJo5dg w==; X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="389802481" X-IronPort-AV: E=Sophos;i="6.03,234,1694761200"; d="scan'208";a="389802481" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 20:11:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="929993822" X-IronPort-AV: E=Sophos;i="6.03,234,1694761200"; d="scan'208";a="929993822" Received: from ssid-ilbpg3-teeminta.png.intel.com ([10.88.227.74]) by orsmga005.jf.intel.com with ESMTP; 17 Oct 2023 20:11:26 -0700 From: "Gan, Yi Fang" <yi.fang.gan@intel.com> To: Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Looi Hong Aun <hong.aun.looi@intel.com>, Voon Weifeng <weifeng.voon@intel.com>, Song Yoong Siang <yoong.siang.song@intel.com>, Gan Yi Fang <yi.fang.gan@intel.com> Subject: [PATCH net-next v2 1/1] net: stmmac: Remove redundant checking for rx_coalesce_usecs Date: Wed, 18 Oct 2023 11:08:02 +0800 Message-Id: <20231018030802.741923-1-yi.fang.gan@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 17 Oct 2023 20:11:56 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780061273882485455 X-GMAIL-MSGID: 1780061273882485455 |
Series |
[net-next,v2,1/1] net: stmmac: Remove redundant checking for rx_coalesce_usecs
|
|
Commit Message
Gan, Yi Fang
Oct. 18, 2023, 3:08 a.m. UTC
From: Gan Yi Fang <yi.fang.gan@intel.com> The datatype of rx_coalesce_usecs is u32, always larger or equal to zero. Previous checking does not include value 0, this patch removes the checking to handle the value 0. This change in behaviour making the value of 0 cause an error is not a problem because 0 is out of range of rx_coalesce_usecs. Signed-off-by: Gan Yi Fang <yi.fang.gan@intel.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello: This patch was applied to netdev/net-next.git (main) by Paolo Abeni <pabeni@redhat.com>: On Wed, 18 Oct 2023 11:08:02 +0800 you wrote: > From: Gan Yi Fang <yi.fang.gan@intel.com> > > The datatype of rx_coalesce_usecs is u32, always larger or equal to zero. > Previous checking does not include value 0, this patch removes the > checking to handle the value 0. This change in behaviour making the > value of 0 cause an error is not a problem because 0 is out of > range of rx_coalesce_usecs. > > [...] Here is the summary with links: - [net-next,v2,1/1] net: stmmac: Remove redundant checking for rx_coalesce_usecs https://git.kernel.org/netdev/net-next/c/392c226cda94 You are awesome, thank you!
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 6aa5c0556d22..f628411ae4ae 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -981,7 +981,7 @@ static int __stmmac_set_coalesce(struct net_device *dev, else if (queue >= max_cnt) return -EINVAL; - if (priv->use_riwt && (ec->rx_coalesce_usecs > 0)) { + if (priv->use_riwt) { rx_riwt = stmmac_usec2riwt(ec->rx_coalesce_usecs, priv); if ((rx_riwt > MAX_DMA_RIWT) || (rx_riwt < MIN_DMA_RIWT))