Re: [PATCH] [media] tua9001: Improve messages in .remove's error path

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

 



Quoting Uwe Kleine-König (2021-11-01 15:02:09)
> 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.

Thanks for the update, that makes it much clearer indeed. And will make
it clear that there's no use for a return code.

--
Kieran

> Best regards and thanks for your thoughts,
> Uwe
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-K�nig            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux