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 275C433EAF3; Tue, 9 Sep 2025 16:48:10 +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=1757436492; cv=none; b=ZpwaRz1xuxlhJxeIHFCk09aw6HIoROx78BlZASkwP3nlXHPGAvm4iC5wzK7E/NcTFMo9IHWZU5ZjDf6GFweHUvXkSGtmDaFCEbc0zUpaWDFu7xwUC7ByeUUx5Q+TkrKAHIC/6PyV5+O9F3ZpGbT0zWMPK6NCF781+1jhXRlvJi0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757436492; c=relaxed/simple; bh=3qkI+As7kffDfYiHM6aKEXAr9lRsqb+/JBrKG4SnQXw=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=eRRwJ/FXUGj6+B5Yt3hTcs1tpI0ez8jyI8jxO+PD10YpTEAf+kVQp7IlQIwQq93CY4n7O9iRutSL6geTmUG3q9Qs3sl3WKYoauaST+CKbS+ZIqPBGNBG4EirWRt0RnYAr27EkLeCqU6v5aua6U2I9iYuENw523h2neXT89MGD4w= 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=Xasu243P; 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="Xasu243P" 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=B9mlUuiZUBrX7aQtqBT3TxfiZmcQldNbBylxYkZ/v1U=; b=Xasu243PE4+x7EhdTuRRpFFaIp ajSpEcHYhC+X/gI0bD4m31dEWya8hehFCIefFOTrcYNUMv9TyUS7jMW67dsEdLi8kYIHL2Z4m+ETA fYhwXXZhqjmBORtYbHcEL8m+LxvH+VQZQpQ2YidZK3HEjL2ktP8MXxVuW5PCC0LuayiNpUCetaBjM oFakpvKCOKu9LUF22clin5BpCjVgQMzrjcQ5nYwh3XVhb0iKRoS2mq/KVf2D6iFNdtt8+FTrQI7e/ BX+ilGhFcvX2ZeXmlmJTj3jSdrgz49Lclzjk2s48pNMushYZlar5sY27eRK7mT/PqXkWrUAXH8GTM EA231OLg==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:55550 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 1uw1Vh-0000000005E-2psl; Tue, 09 Sep 2025 17:48:02 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1uw1Vf-00000004MCR-2eUl; Tue, 09 Sep 2025 17:47:59 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Alexei Starovoitov , Andrew Lunn , bpf@vger.kernel.org, Daniel Borkmann , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Richard Cochran , Stanislav Fomichev Subject: [PATCH net-next 07/11] net: stmmac: move stmmac_init_ptp() messages into function Precedence: bulk X-Mailing-List: bpf@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: Tue, 09 Sep 2025 17:47:59 +0100 Move the stmmac_init_ptp() messages from stmmac_hw_setup() to stmmac_init_ptp(), which will allow further cleanups. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index cb058e4c6ea9..716c7e21baf1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -788,8 +788,13 @@ static int stmmac_init_ptp(struct stmmac_priv *priv) priv->plat->ptp_clk_freq_config(priv); ret = stmmac_init_tstamp_counter(priv, STMMAC_HWTS_ACTIVE); - if (ret) + if (ret) { + if (ret == -EOPNOTSUPP) + netdev_info(priv->dev, "PTP not supported by HW\n"); + else + netdev_warn(priv->dev, "PTP init failed\n"); return ret; + } priv->adv_ts = 0; /* Check if adv_ts can be enabled for dwmac 4.x / xgmac core */ @@ -3497,12 +3502,7 @@ static int stmmac_hw_setup(struct net_device *dev, bool ptp_register) ERR_PTR(ret)); } - ret = stmmac_init_ptp(priv); - if (ret == -EOPNOTSUPP) - netdev_info(priv->dev, "PTP not supported by HW\n"); - else if (ret) - netdev_warn(priv->dev, "PTP init failed\n"); - else if (ptp_register) + if (stmmac_init_ptp(priv) == 0 && ptp_register) stmmac_ptp_register(priv); if (priv->use_riwt) { -- 2.47.3