From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 868B1C48260 for ; Thu, 8 Feb 2024 14:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=asOZuKXuORCQNXHwPKk2egjVPMcknHC0oXM5ab/VhUQ=; b=HkjKJFFHMsG7XkbGWJU4pygPFX 597a6kfUoUXcw9zGCBYsmdo6Es3dgnyfSZD1/JG/dzEtRn+aV4CwJhhzLx7htfIhV5QcB2ZzhqX1A lC2j4XDj/KXX5grYWtyvg547C6NpwbeUZU6jsq3ECNui1eFkbhFZeLJ02wPQvNaVZg7J6XzcJVyft kn6pwQppn/EJVssv+nqpTBdkEHyUHKlj/dBwNqlaRANbflTnicvmq8vkbubSrFjlFOh3FKI/ii+Xn ky7fdDFa22t8ErSqI5KOln679hTucXhrq9mBMxvS+c/oJRXMj1nwLsE8y2Fm68QGLhhlEk6wIozg4 tLtQny6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY5SD-0000000E3e1-1OAs; Thu, 08 Feb 2024 14:32:41 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY5S8-0000000E3bJ-3PDV for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2024 14:32:40 +0000 From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707402752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0kmnynK8D4W3OfNuOIakrEyfM7cioDAxgVK3FbytS1U=; b=bGpOxOdZz8KjIh3Scht2Wl87HpaRmBa9E6aSTbQ4MeB4JrLU4CQbks1axiceU91YTAN4SP 1f0UJixuPUpQvEZeL7Cjj9K5cjw/IjHUDWNPKhop8GqGyox3Wnr3u7flz6tzNMf8EirgYd xCuEjuYNJY+uWUom+lCCTn39HTinS8/QbKNCxMFAtDh4bcYOw8v2LfOHIRM2eKc7tBwmz2 KIUxOE+eHNS4dLoUAe/dkHiQKvy3AklloYgLvpU+78DKum0ARqd0mERdi0DRXO0lzA4vRf /Ey/Np4r3CnVNfkGJeEfXeyo7TbVA1uVrkgDMrzmkVkngTZlcI8tkLOhwcAJRQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707402752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0kmnynK8D4W3OfNuOIakrEyfM7cioDAxgVK3FbytS1U=; b=l2Hlnwmg21eD+EOblp3zmFXVSzKQLlL+jBRqJ6ezflWTXHuUah7YE9Sav4hgzNlxyfc2Pw 0/u0JfQuqs9z9YBQ== To: Maciej Fijalkowski Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Yannick Vignon , Sebastian Andrzej Siewior , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next] net: stmmac: Simplify mtl IRQ status checking In-Reply-To: References: <20240208-stmmac_irq-v1-1-8bab236026d4@linutronix.de> Date: Thu, 08 Feb 2024 15:32:30 +0100 Message-ID: <871q9n81s1.fsf@kurt.kurt.home> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240208_063237_026423_FE16A75E X-CRM114-Status: GOOD ( 16.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8550308081747798186==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8550308081747798186== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu Feb 08 2024, Maciej Fijalkowski wrote: > On Thu, Feb 08, 2024 at 11:35:25AM +0100, Kurt Kanzenbach wrote: >> Commit 8a7cb245cf28 ("net: stmmac: Do not enable RX FIFO overflow >> interrupts") disabled the RX FIFO overflow interrupts. However, it left = the >> status variable around, but never checks it. >>=20 >> As stmmac_host_mtl_irq_status() returns only 0 now, the code can be >> simplified. >>=20 >> Signed-off-by: Kurt Kanzenbach >> --- >> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >>=20 >> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers= /net/ethernet/stmicro/stmmac/stmmac_main.c >> index 04d817dc5899..10ce2f272b62 100644 >> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c >> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c >> @@ -6036,10 +6036,8 @@ static void stmmac_common_interrupt(struct stmmac= _priv *priv) >> priv->tx_path_in_lpi_mode =3D false; >> } >>=20=20 >> - for (queue =3D 0; queue < queues_count; queue++) { >> - status =3D stmmac_host_mtl_irq_status(priv, priv->hw, >> - queue); >> - } >> + for (queue =3D 0; queue < queues_count; queue++) >> + stmmac_host_mtl_irq_status(priv, priv->hw, queue); > > Hey Kurt, > > looks to me that all of the current callbacks just return 0 so why not > make them return void instead? Well, there are two callbacks of this in dwmac4 and dwxgmac2. Both of them still have the code for handling the overflow interrupt (and then returning !=3D 0). However, as of commit 8a7cb245cf28 the interrupt shouldn't fire. So yes, it could be changed to void along with some code removal. But, maybe i'm missing something. Thanks, Kurt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEvLm/ssjDfdPf21mSwZPR8qpGc4IFAmXE5f4THGt1cnRAbGlu dXRyb25peC5kZQAKCRDBk9HyqkZzgoVNEACRQG38O8qvFH2wPmjBeFoLAK3lGxP9 bezvRO/XBO+/YBwOfbfDcFVq4IV46JU3wPsWwSUob/X6dtVWrbuvo18PmIJQLbf7 /w09ozvI59oMpgyGuht7p+sMW6rZJopvnnHcXWyZx5Q6dm78sqxpXJRCOJGgdq2R LNs6DFtw3GNLC+mgz2qlWKWZb15eNMfPkI9pfzlfIiHC3NOoU06tRGM+u3O8zIkA LuiZy9jeUW0lfTs73EictPtAWV+kIjAC0Gt20R0D7Y8IqgqhRQLKzsa1Yq2n4oV5 CQgcRZqcsxakjVfNp2P2yubTE9q6OlYYEBL/zW2tKmX93EPQLdKW5e+l04uv5scO ppbcyFnw4flKX6eNBE5p1Ls2xJx5UypS0B/E/MTmGC/sytC5C6UWvv+S9c/tmbhb fMWUwqa2nR2weXo7rRqu3Y9BncycxDAl99xCLq7tQJ3TifuX1WQKw6V49w1CTCu1 v98dHRh8Hcb46ZygVRyorNDjynf+ykWJ+arEynZL2qRpoaghPu53zQcwfus2P20D Iwx8Ps/qRxUimLuyb9xlLaqbMo7pyx7xUf2JX9HCr5MeiDiGEH89IxQ6kmRapaSs cqoWc8HbLrfRGSaTIzVOHyANQFDZh8yONokswgK3VWb6sJKnc5gTX2IcILiyUMSG zVDIO7KCp60RvA== =ersf -----END PGP SIGNATURE----- --=-=-=-- --===============8550308081747798186== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8550308081747798186==--