On Mon, Nov 01, 2021 at 02:22:33PM +0000, Kieran Bingham wrote: > Quoting Uwe Kleine-König (2021-10-26 20:40:10) > > If disabling the hardware fails the driver propagates the error code to > > the i2c core. However this only results in a generic error message; the > > device still disappears. > > > > So instead emit a message that better describes the actual problem than > > the i2c core's "remove failed (ESOMETHING), will be ignored" and return > > 0 to suppress the generic message. > > You almost caught me out. I was going to say, this changes the > behaviour of the return code. But It's intentional ;-) > > It's still a bit concerning, /not/ returning an error on an error - but > as it's not going to prevent removal, and it won't add further (helpful) > diagnosticts), maybe it makes sense. > > My only concern would be if it might be better to keep the return code, > so that the core frameworks know about the issue at least. The long term goal is to make the remove callback return void. For that change I want all implementations to remove 0 to make the change easy to review. Best regards and thanks for your thoughts, Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Attachment:
signature.asc
Description: PGP signature