Re: [PATCH 00/51] video: fbdev: Convert to platform remove callback returning void

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

 



Hello,

[Dropped Bartlomiej Zolnierkiewicz and Michal Januszewski from Cc, their
email addresses bounced]

On Sun, Mar 19, 2023 at 07:04:54PM +0100, Helge Deller wrote:
> Hello Uwe,
> 
> On 3/19/23 00:53, Uwe Kleine-König wrote:
> > this series adapts the platform drivers below drivers/video/fbdev to use the
> > .remove_new() callback. Compared to the traditional .remove() callback
> > .remove_new() returns no value. This is a good thing because the driver core
> > doesn't (and cannot) cope for errors during remove. The only effect of a
> > non-zero return value in .remove() is that the driver core emits a warning. The
> > device is removed anyhow and an early return from .remove() usually yields a
> > resource leak.
> > 
> > By changing the remove callback to return void driver authors cannot
> > reasonably assume any more that there is some kind of cleanup later.
> > 
> > The first patch simplifies the remove callback of one driver to obviously
> > always return zero. After that all drivers are converted trivially to
> > .remove_new().
> 
> Thanks for that patch series. It's a nice cleanup.
> I've applied it to the fbdev "for-next" git tree for now to get some compile testing.
> I hope that's ok for you.
> 
> Regarding the new "remove_new" struct member I'd prefer a better name but don't
> have any idea yet...

Ideally we won't have to life with it for long. The eventual plan is to
switch back to "remove" once all drivers are converted. So I didn't
think intensively about a better name. Did you know that struct
i2c_driver has a "temporary" .probe_new() callback since 2016?

Best regards
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 Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux