[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240805183047.305630-4-msp@baylibre.com>
Date: Mon, 5 Aug 2024 20:30:43 +0200
From: Markus Schneider-Pargmann <msp@...libre.com>
To: Chandrasekar Ramakrishnan <rcsekar@...sung.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Martin Hundebøll <martin@...nix.com>,
Markus Schneider-Pargmann <msp@...libre.com>,
Judith Mendez <jm@...com>,
Tony Lindgren <tony@...mide.com>,
Simon Horman <horms@...nel.org>
Cc: Matthias Schiffer <matthias.schiffer@...tq-group.com>,
Linux regression tracking <regressions@...mhuis.info>,
linux-can@...r.kernel.org,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/7] can: m_can: Remove m_can_rx_peripheral indirection
m_can_rx_peripheral() is a wrapper around m_can_rx_handler() that calls
m_can_disable_all_interrupts() on error. The same handling for the same
error path is done in m_can_isr() as well.
So remove m_can_rx_peripheral() and do the call from m_can_isr()
directly.
Signed-off-by: Markus Schneider-Pargmann <msp@...libre.com>
---
drivers/net/can/m_can/m_can.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index fd600ab93218..42ed7f0fea78 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1037,22 +1037,6 @@ static int m_can_rx_handler(struct net_device *dev, int quota, u32 irqstatus)
return work_done;
}
-static int m_can_rx_peripheral(struct net_device *dev, u32 irqstatus)
-{
- struct m_can_classdev *cdev = netdev_priv(dev);
- int work_done;
-
- work_done = m_can_rx_handler(dev, NAPI_POLL_WEIGHT, irqstatus);
-
- /* Don't re-enable interrupts if the driver had a fatal error
- * (e.g., FIFO read failure).
- */
- if (work_done < 0)
- m_can_disable_all_interrupts(cdev);
-
- return work_done;
-}
-
static int m_can_poll(struct napi_struct *napi, int quota)
{
struct net_device *dev = napi->dev;
@@ -1250,7 +1234,7 @@ static irqreturn_t m_can_isr(int irq, void *dev_id)
} else {
int pkts;
- pkts = m_can_rx_peripheral(dev, ir);
+ pkts = m_can_rx_handler(dev, NAPI_POLL_WEIGHT, ir);
if (pkts < 0)
goto out_fail;
}
--
2.45.2
Powered by blists - more mailing lists