Re: [PATCH v2 1/4] nubus: Simplify check in remove callback
From: Uwe Kleine-König
Date: Mon Aug 02 2021 - 02:52:35 EST
On Sun, Aug 01, 2021 at 03:04:03PM +1000, Finn Thain wrote:
> On Fri, 30 Jul 2021, Uwe Kleine-König wrote:
> > The driver core only calls a remove callback when the device was
> > successfully bound (aka probed) before. So dev->driver is never NULL and
> > the respective check can just be dropped.
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> Acked-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
> BTW, aside from nubus, zorro and superhyway you can find the same pattern
> in many other busses. You may want to patch the following methods too.
Did you find these by hand? Or using a coccinelle match?
Anyhow, thanks for the list, I'll add it to my todo list but if you're
motivated don't consider these cleanups as my property. (Please Cc: me
though to prevent duplicated effort.)
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Description: PGP signature