From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCE4036EA8B for ; Wed, 1 Apr 2026 07:22:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775028142; cv=none; b=l0F8jAIkQ3Eu9p2PhSrvyubhGgoXutMuvFItG7dlT+YTOWc+AdqlZCUFkP026b3dMCOkjsLKZT4GZNUUkCI15uKebSXc500DlpmrhsztQoROOAFAtsaJlSGKf0DbUhygsHTdxgy8e5oX08rgxJq/j8iAnbKsfm/12b3K0aGsfGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775028142; c=relaxed/simple; bh=ykCps9LoWcsIEr+uLW61j4K354tVv4wmudPpwQQ4Zqk=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=u7Y+Zt65fbT/FpQo3nh1N4nl4wnFKzJQayar3XagfcZ8AyfMicJE51SPWLbVux+F06LJWe2AZCSKHhpF2inLY5sFoUrVQCKIAzoVsQqJ2FCBlah+jfmq5DpmMb1Qn4tiCLCaN4TYr0KPUFO+aSvvfEAk1W/anoA1dAxxaEQjRhE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=o1/sce0d; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="o1/sce0d" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bxFj6OIEBbC7e5xExdFY8pWr1S0/9CKhHj4D/T8TD54=; b=o1/sce0ds1X3AkV64edResoJdS IoMLugQyw1xzvqvdftL5rcVpzya9lP7CCpzA9V9Ea3PUk/ehSOkJmcqK/IqTUKo6m83NV1MnDhjIb dHhk5PTt+XDn+NroY0z9dTH6jbfgzJ0Sf9yCUPfqlsgAs45VdLXbpYNS7inqEUIRwSzUGYBIChvvr gSUIE6RK5V3Xq11n+HXT/L2vr9MmyOwarhOKQ7CXyA1n978dmn9DCyxyf66F9jKg/quPK14ox41J8 l4jrR+XU5inWj7XpmY3WHh8rPAJ70NpSRoWeu8mb5xTUDag5ko8RJxeNa93gQcm+KtHtdMVBGLqVB Rn+KKBIA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:59040 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7ptw-000000002iW-2gSe; Wed, 01 Apr 2026 08:22:08 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1w7ptt-0000000Eatn-1ziK; Wed, 01 Apr 2026 08:22:05 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn Cc: Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, Ong Boon Leong , Paolo Abeni Subject: [PATCH net-next v2 11/14] net: stmmac: make stmmac_set_gso_features() more readable Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Wed, 01 Apr 2026 08:22:05 +0100 Make stmmac_set_gso_features() more readable by adding some whitespace and getting rid of the indentation. Signed-off-by: Russell King (Oracle) --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e868fb0c9894..7134f6c6075b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -4389,13 +4389,19 @@ static void stmmac_set_gso_features(struct net_device *ndev) { struct stmmac_priv *priv = netdev_priv(ndev); - if ((priv->plat->flags & STMMAC_FLAG_TSO_EN) && (priv->dma_cap.tsoen)) { - ndev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6; - if (priv->plat->core_type == DWMAC_CORE_GMAC4) - ndev->hw_features |= NETIF_F_GSO_UDP_L4; - stmmac_set_gso_types(priv, true); - dev_info(priv->device, "TSO feature enabled\n"); - } + if (!(priv->plat->flags & STMMAC_FLAG_TSO_EN)) + return; + + if (!priv->dma_cap.tsoen) + return; + + ndev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6; + if (priv->plat->core_type == DWMAC_CORE_GMAC4) + ndev->hw_features |= NETIF_F_GSO_UDP_L4; + + stmmac_set_gso_types(priv, true); + + dev_info(priv->device, "TSO feature enabled\n"); } static size_t stmmac_tso_header_size(struct sk_buff *skb) -- 2.47.3