[PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: Convert to platform remove callback returning void
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Tue May 9 23:29:59 PDT 2023
Hello Bhupesh,
On Tue, May 09, 2023 at 01:21:56PM +0530, Bhupesh Sharma wrote:
> On Mon, 8 May 2023 at 19:56, Uwe Kleine-König
> <u.kleine-koenig at pengutronix.de> wrote:
> >
> > The .remove() callback for a platform driver returns an int which makes
> > many driver authors wrongly assume it's possible to do error handling by
> > returning an error code. However the value returned is (mostly) ignored
>
> ^^^ mostly, here seems confusing. Only if the return value is ignored
> marking the function
> as 'void' makes sense IMO.
FTR: It's only mostly ignored because a message is emitted:
dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n");
(see platform_remove() in drivers/base/platform.c).
> Also a small note (maybe a TBD) indicating that 'remove_new' will be
> eventually replaced with 'remove' would make reading this easier.
I adapted the commit message for future similar submissions. Thanks for
the feedback.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230510/b12ba557/attachment.sig>
More information about the linux-arm-kernel
mailing list