summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorMarkus Schneider-Pargmann <msp@baylibre.com>2024-08-05 20:30:43 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2024-08-06 09:25:30 +0200
commit40e4552eeef0e3090a5988de15889795936fd38f (patch)
treea519ac9e95f73d4907082e62ecc876a75d614bb9 /drivers/net/can
parent6eff1cead75ff330bb33264424c1da6cc7179ab8 (diff)
downloadlwn-40e4552eeef0e3090a5988de15889795936fd38f.tar.gz
lwn-40e4552eeef0e3090a5988de15889795936fd38f.zip
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@baylibre.com> Link: https://lore.kernel.org/all/20240805183047.305630-4-msp@baylibre.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/m_can/m_can.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index ba416c973e8d..a37ed376de9b 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1037,22 +1037,6 @@ end:
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;
}