Re: [PATCH 0/9] iio: Remove duplicated error reporting in .remove()

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

 



Hello Jonathan,

On Sun, May 01, 2022 at 06:41:49PM +0100, Jonathan Cameron wrote:
> On Sat, 30 Apr 2022 10:15:58 +0200
> Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> 
> > Hello,
> > 
> > this series adapts several i2c drivers that emit two error messages if
> > something in their remove function fails. The relevant issue is that the
> > i2c core emits an error message if the remove callback returns a
> > non-zero value but the drivers already emit a (better) message. So
> > these patches change the drivers to return 0 even after an error. Note
> > there is no further error handling in the i2c core, if a remove callback
> > returns an error code, the device is removed anyhow, so the only effect
> > of making the return value zero is that the error message is suppressed.
> > 
> > The motivation for this series is to eventually change the prototype of
> > the i2c remove callback to return void. As a preparation all remove
> > functions should return 0 such that changing the prototype doesn't
> > change behaviour of individual drivers.
> 
> I think I'd rather have seen these called out as simply moving towards
> this second change as it feels wrong to deliberately not report an error
> so as to avoid repeated error messages!

I admit this is a bit strange. Once the i2c remove callback is changed
accordingly (and the platform remove callback, and the ac97_codec_driver
remove callback ...) this goes away. Working on it.

The reason it's that way is that for similar patches the maintainer
feedback was to include the preparatory patch in the series that
actually changes the remove callback. As I like to have as much of the
preparatory patches already applied, I thought it a good idea to find a
motivation to apply already today :-)

Thanks for your cooperation,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux