Re: [PATCH 3/7] can: m_can: m_can_handle_state_errors(): fix CAN state transition to Error Active
From: Marc Kleine-Budde
Date: Tue Sep 09 2025 - 10:38:56 EST
On 09.09.2025 16:31:29, Marc Kleine-Budde wrote:
> > > Also looking at all the users added for the function above, could you
> > > read the register inside the function? Currently you are adding a
> > > reg variable and a read call for each call to this function.
> > > m_can_handle_state_errors() also doesn't need the psr value with your
> > > refactoring.
> >
> > That makes sense.
>
> I'm also preparing the driver to have error handling for all register
> reads...so I'll have to return in case of an error and pass the state
> via a pointer.
This has to wait until a later patch.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature