From: Markus Schneider-Pargmann <msp@baylibre.com>
To: "Chandrasekar Ramakrishnan" <rcsekar@samsung.com>,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
"Vincent Mailhol" <mailhol.vincent@wanadoo.fr>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Markus Schneider-Pargmann" <msp@baylibre.com>,
"Martin Hundebøll" <martin@geanix.com>,
"Michal Kubiak" <michal.kubiak@intel.com>,
"Simon Horman" <horms@kernel.org>,
"Tony Lindgren" <tony@atomide.com>, "Judith Mendez" <jm@ti.com>
Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
Linux regression tracking <regressions@leemhuis.info>,
linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/7] can: m_can: Remove m_can_rx_peripheral indirection
Date: Fri, 26 Jul 2024 21:59:40 +0200 [thread overview]
Message-ID: <20240726195944.2414812-4-msp@baylibre.com> (raw)
In-Reply-To: <20240726195944.2414812-1-msp@baylibre.com>
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>
---
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
next prev parent reply other threads:[~2024-07-26 20:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 19:59 [PATCH 0/7] can: m_can: Fix polling and other issues Markus Schneider-Pargmann
2024-07-26 19:59 ` [PATCH 1/7] can: m_can: Reset coalescing during suspend/resume Markus Schneider-Pargmann
2024-07-26 19:59 ` [PATCH 2/7] can: m_can: Remove coalesing disable in isr during suspend Markus Schneider-Pargmann
2024-07-26 19:59 ` Markus Schneider-Pargmann [this message]
2024-07-26 19:59 ` [PATCH 4/7] can: m_can: Do not cancel timer from within timer Markus Schneider-Pargmann
2024-07-27 9:32 ` kernel test robot
2024-07-26 19:59 ` [PATCH 5/7] can: m_can: disable_all_interrupts, not clear active_interrupts Markus Schneider-Pargmann
2024-07-26 19:59 ` [PATCH 6/7] can: m_can: Reset cached active_interrupts on start Markus Schneider-Pargmann
2024-07-26 19:59 ` [PATCH 7/7] can: m_can: Limit coalescing to peripheral instances Markus Schneider-Pargmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240726195944.2414812-4-msp@baylibre.com \
--to=msp@baylibre.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jm@ti.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=martin@geanix.com \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=michal.kubiak@intel.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rcsekar@samsung.com \
--cc=regressions@leemhuis.info \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®