Re: [PATCH RFC can-next 3/3] can: tcan4x5x: add handle_dev_interrupts callback to ops

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

 



On Fri, May 14, 2021 at 04:10:12PM +0200, Marc Kleine-Budde wrote:
> For new code, please don't wrap the regmap_*() functions so that the
> error values are ignored. I know, it's a bit annoying to always do the
> "if (err) return err" dance.

Will do, thanks.

> As this is the interrupt handler there's not much we can do in case of
> an error. In the mcp251xfd driver I print an error message and shut down
> the interface. You should at least print an error message at the end of
> the handle_interrupts() function.

I assume you mean the handling of errors out of aforementioned
regmap_*() functions specifically? I agree we should shut down the
interface - I've previously endured serious debugging pain due to SPI
errors going unrecognised and causing havoc.

> I think it's best to have a single handle_interrupts() callback that
> combines the existing clear_interrupts and this code. If you want to
> save an SPI transaction and only read the TCAN4X5X_INT_FLAGS if the
> M_CAN_IR is unset, pass is as 2nd parameter from the generic interrupt
> handler.

Yup, agreed.

--
Regards,

Torin Cooper-Bennun
Software Engineer | maxiluxsystems.com

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