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 7B3C8C4828F for ; Thu, 8 Feb 2024 15:08:22 +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=7lQZw8ptviUJ8vS8YDqfugQSmppFIhVMxqxaJDkme9E=; b=IxdgeeRtRPOkzhigkjQKdGdq91 5DtYmlHMfK+UtNbRrLnrp0lGBalXtDdVN7iF40LoRDNQTb3DiQ+/rnLPwgSSs8sjuaJ+/IbLayzGD fOwQ/HxVDgAuhbyzqrD5cRr8Us9CkZwWW+9waISL9wrKpYJd+GQuMqzYjWja2HuXVQktpsdnWSKTJ jbOvsfrlVehzGGCxOEQ0uVzuJ+vJkSPpOGMn7vZeBMWArUoulqBAdR4wvSWqKbIGk1FPLOdRZhf/L DRkMkIyPNZZnMstyjddkzOvCIOAwvuHUNPtLE2DvjJmdoEbsuLGm/z1qG6woJTM5tQUe6owr4XCeq WzkCOUPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY60W-0000000E7dg-3js7; Thu, 08 Feb 2024 15:08:08 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY60T-0000000E7aq-0RnZ for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2024 15:08:07 +0000 From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707404881; 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=KWgJgd6Z3ryJqQjA1Py+G/4gkJHYEfzRUj8BBBe02k8=; b=qAHoFif3apfMZ5rPFFx44tAG5uffVd/VGorFMZXggJn2F3iILQ6Px4Pp39ptQACupsxrDE 2vEXSN4dmNHy5wpSWi4sT1Y00zR2b13Nf/UmyIfoN+DkdyBkPDPfOjXcBgVUIqvHOEODuI xODZdWubb1xvkDbf1UVH7BNwFciDuN/jVDWuXS1OczDl8dBg6QCUSJs2VNv4KhxdC1q5hE 4RZmUOznwbZ8eITl/dhsIHDgXgrrUMvAXwns719IUvvn//0M8TIhFbP1QXD7jAtcVnTqV+ uItQOr6SAjOozbppeDoFqho4X5sjHx5PWFKAqV+olREOtaW0miYEDcZp/LWyJw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707404881; 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=KWgJgd6Z3ryJqQjA1Py+G/4gkJHYEfzRUj8BBBe02k8=; b=CYhzDV5MkDoZ0H9Q8gHK39KLiF4HBdpN1Wbddapq8bhNDgRgPCNWfW3wDBhJoxNfPG6wbe 4YNJiYpnDVdGKhCA== 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> <871q9n81s1.fsf@kurt.kurt.home> Date: Thu, 08 Feb 2024 16:08:00 +0100 Message-ID: <87y1bv6lkf.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_070805_310807_CBA1A0C0 X-CRM114-Status: GOOD ( 18.29 ) 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="===============6196307425106803530==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6196307425106803530== 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 03:32:30PM +0100, Kurt Kanzenbach wrote: >> 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 le= ft 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/driv= ers/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 stm= mac_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? >>=20 >> 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. > > Hmm, ok, my 'quick' glance over the code was too quick :) I missed > overflow encoding to ret within callbacks, sorry. But it seems that even > though they can return nonzero values they would be ignored, correct? Yeah, they are ignored. Thanks, Kurt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEvLm/ssjDfdPf21mSwZPR8qpGc4IFAmXE7lATHGt1cnRAbGlu dXRyb25peC5kZQAKCRDBk9HyqkZzgtzBD/9nDDb3DltYcIgqEvmxDM3LECpgT0DF HFB3GXNIA6YKdtCS+QusIoH1E0B6qf4F06j7zNh/os9u+tsbMyLkxiimsaWOyfIk OEqX1a9bZpFcEFAaDcSLQB367SoqAGeuswQ+KHOUR+IerOj0Y+vCnz7jrjn5N+Pn KfQXn1p2u3QkDHPILK+TSE4ygPDMqr3tk7CtHoWnZ+hT1qaRsPyNYZEpLX+R17+f xndwQP6IzM77RrNq/RCfsM2Ozl/5Aar3PumvuHtB4eIgEMhTug2s1QI3KHq6bzL3 R9iyUPnqwhK8MUMEaR+jksVZPL0I+lZtLVJmQuiUpwLGLG1ipw0ULUOD1/38UZuk yPaosBA8i3NyGS3akVmDc08AcsnsMrAnY/lgP2H2mKvmPCKf3/kuhmDbfLUehpql gerYvYGfNIeGIe0PGuYSRf/1eWADM3gDMSzS2JlwVteYfIsSniD6DHkfRKTkOzr0 +Y6pH3dYrmSr0Zb9243Ebgw2f7nXbUIYW8MM16RgqC32vg4Yk6MrcQkZ6rpUOgk4 /0E6afVbJjrYYweTsiARACdluiF+9Yd5byyIxz7Om6KIWrY7zDkg90L3mVnE1WcR U4ao0ASaiUSn5wL4rwLvvf6r1n/vE2ZzikBhKbr5E6mS6LgZAKeQ9DIHDsLRAjTL RZyukkHrSq8KGg== =U68y -----END PGP SIGNATURE----- --=-=-=-- --===============6196307425106803530== 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 --===============6196307425106803530==--