[PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void

nobuhiro1.iwamatsu at toshiba.co.jp nobuhiro1.iwamatsu at toshiba.co.jp
Mon May 8 19:28:11 PDT 2023


Hi Uwe,

> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> Sent: Monday, May 8, 2023 11:27 PM
> To: Giuseppe Cavallaro <peppe.cavallaro at st.com>; Alexandre Torgue
> <alexandre.torgue at foss.st.com>; Jose Abreu <joabreu at synopsys.com>;
> David S. Miller <davem at davemloft.net>; Eric Dumazet
> <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni
> <pabeni at redhat.com>; iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○
> OST) <nobuhiro1.iwamatsu at toshiba.co.jp>; Maxime Coquelin
> <mcoquelin.stm32 at gmail.com>
> Cc: netdev at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> linux-stm32 at st-md-mailman.stormreply.com; kernel at pengutronix.de; Simon
> Horman <simon.horman at corigine.com>
> Subject: [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to
> platform remove callback returning void
> 
> 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 and this typically
> results in resource leaks. To improve here there is a quest to make the remove
> callback return void. In the first step of this quest all drivers are converted
> to .remove_new() which already returns void.
> 
> Trivially convert this driver from always returning zero in the remove callback to
> the void returning variant.
> 
> Reviewed-by: Simon Horman <simon.horman at corigine.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---

Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu at toshiba.co.jp>

Best regards,
  Nobuhiro


More information about the linux-arm-kernel mailing list