Re: [PATCH v2 2/3] can: rcar_canfd: Fix channel specific IRQ handling for RZ/G2L

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25.10.2022 16:56:56, Biju Das wrote:
> RZ/G2L has separate channel specific IRQs for transmit and error
> interrupt. But the IRQ handler, process the code for both channels
> even if there is no interrupt occurred on one of the channels.
> 
> This patch fixes the issue by passing channel specific context
> parameter instead of global one for irq register and on irq handler,
> it just handles the channel which is triggered the interrupt.

Please clean up signatures of the IRQ handlers you touch, it's a little
mess. Change:

| rcar_canfd_handle_channel_tx(struct rcar_canfd_global *gpriv, u32 ch)

to:

| rcar_canfd_handle_channel_tx(struct rcar_canfd_channel *priv)

Same for:

| static void rcar_canfd_handle_channel_err(struct rcar_canfd_global *gpriv, u32 ch)



In a separate patch, please clean up these, too:

| static void rcar_canfd_handle_global_err(struct rcar_canfd_global *gpriv, u32 ch)
| static void rcar_canfd_handle_global_receive(struct rcar_canfd_global *gpriv, u32 ch)
| static void rcar_canfd_channel_remove(struct rcar_canfd_global *gpriv, u32 ch)

Why are 2 of the above functions called "global" as they work on a
specific channel? That can be streamlined, too.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux