Message ID | 20230515205759.1003118-2-mkl@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 03ef5a4b322f342453a135ca8f376c09fd379024 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,01/22] can: at91_can: Convert to platform remove callback returning void | expand |
Hello: This series was applied to netdev/net-next.git (main) by Marc Kleine-Budde <mkl@pengutronix.de>: On Mon, 15 May 2023 22:57:38 +0200 you wrote: > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > 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 ignored (apart from > emitting a warning) 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. Eventually after all drivers are converted, .remove_new() is > renamed to .remove(). > > [...] Here is the summary with links: - [net-next,01/22] can: at91_can: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/03ef5a4b322f - [net-next,02/22] can: bxcan: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/cba8ed7f0043 - [net-next,03/22] can: c_can: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/1708caf4c47d - [net-next,04/22] can: usb: f81604: add Fintek F81604 support https://git.kernel.org/netdev/net-next/c/88da17436973 - [net-next,05/22] can: cc770_isa: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/938100762293 - [net-next,06/22] can: bxcan: Remove unnecessary print function dev_err() https://git.kernel.org/netdev/net-next/c/cca7d85ad80c - [net-next,07/22] can: cc770_platform: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/86eb8a19b477 - [net-next,08/22] can: length: make header self contained https://git.kernel.org/netdev/net-next/c/6882011e8854 - [net-next,09/22] can: ctucanfd: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/45413bf75919 - [net-next,10/22] can: flexcan: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/55216590c9cf - [net-next,11/22] can: grcan: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/6aa62362f14d - [net-next,12/22] can: ifi_canfd: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/a5095a981018 - [net-next,13/22] can: janz-ican3: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/3ac96f45aac6 - [net-next,14/22] can: m_can: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/2d7c33d032ff - [net-next,15/22] can: mscan: mpc5xxx_can: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/36157299e67b - [net-next,16/22] can: rcar: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/ae08f87afff7 - [net-next,17/22] can: sja1000_isa: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/0367b598afbe - [net-next,18/22] can: sja1000_platform: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/bc79adfbd1fd - [net-next,19/22] can: softing: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/737aec8a8f13 - [net-next,20/22] can: sun4i_can: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/aaa278e646c0 - [net-next,21/22] can: ti_hecc: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/9587b93b7755 - [net-next,22/22] can: xilinx: Convert to platform remove callback returning void https://git.kernel.org/netdev/net-next/c/0816e1dd5ea8 You are awesome, thank you!
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 199cb200f2bd..4621266851ed 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c @@ -1346,7 +1346,7 @@ static int at91_can_probe(struct platform_device *pdev) return err; } -static int at91_can_remove(struct platform_device *pdev) +static void at91_can_remove(struct platform_device *pdev) { struct net_device *dev = platform_get_drvdata(pdev); struct at91_priv *priv = netdev_priv(dev); @@ -1362,8 +1362,6 @@ static int at91_can_remove(struct platform_device *pdev) clk_put(priv->clk); free_candev(dev); - - return 0; } static const struct platform_device_id at91_can_id_table[] = { @@ -1381,7 +1379,7 @@ MODULE_DEVICE_TABLE(platform, at91_can_id_table); static struct platform_driver at91_can_driver = { .probe = at91_can_probe, - .remove = at91_can_remove, + .remove_new = at91_can_remove, .driver = { .name = KBUILD_MODNAME, .of_match_table = of_match_ptr(at91_can_dt_ids),