Message ID | 20230217095317.1213387-1-u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | watchdog: at91rm9200: Only warn once about problems in .remove() | expand |
On 17.02.2023 11:53, Uwe Kleine-König wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > The single difference between returning 0 and returning an error code in > a platform remove callback is that in the latter case the platform core > emits a warning about the error being ignored. > > at91wdt_remove() already emits a warning in the error case, so suppress > the more generic (and less helpful) one by returning 0. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> > --- > drivers/watchdog/at91rm9200_wdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c > index 5126454bb861..d57409c1a4d1 100644 > --- a/drivers/watchdog/at91rm9200_wdt.c > +++ b/drivers/watchdog/at91rm9200_wdt.c > @@ -270,7 +270,7 @@ static int at91wdt_remove(struct platform_device *pdev) > misc_deregister(&at91wdt_miscdev); > at91wdt_miscdev.parent = NULL; > > - return res; > + return 0; > } > > static void at91wdt_shutdown(struct platform_device *pdev) > > base-commit: 033c40a89f55525139fd5b6342281b09b97d05bf > -- > 2.39.1 >
On Fri, Feb 17, 2023 at 10:53:17AM +0100, Uwe Kleine-König wrote: > The single difference between returning 0 and returning an error code in > a platform remove callback is that in the latter case the platform core > emits a warning about the error being ignored. > > at91wdt_remove() already emits a warning in the error case, so suppress > the more generic (and less helpful) one by returning 0. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > drivers/watchdog/at91rm9200_wdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c > index 5126454bb861..d57409c1a4d1 100644 > --- a/drivers/watchdog/at91rm9200_wdt.c > +++ b/drivers/watchdog/at91rm9200_wdt.c > @@ -270,7 +270,7 @@ static int at91wdt_remove(struct platform_device *pdev) > misc_deregister(&at91wdt_miscdev); > at91wdt_miscdev.parent = NULL; > > - return res; > + return 0; > } > > static void at91wdt_shutdown(struct platform_device *pdev) > > base-commit: 033c40a89f55525139fd5b6342281b09b97d05bf > -- > 2.39.1 >
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index 5126454bb861..d57409c1a4d1 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c @@ -270,7 +270,7 @@ static int at91wdt_remove(struct platform_device *pdev) misc_deregister(&at91wdt_miscdev); at91wdt_miscdev.parent = NULL; - return res; + return 0; } static void at91wdt_shutdown(struct platform_device *pdev)
The single difference between returning 0 and returning an error code in a platform remove callback is that in the latter case the platform core emits a warning about the error being ignored. at91wdt_remove() already emits a warning in the error case, so suppress the more generic (and less helpful) one by returning 0. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/watchdog/at91rm9200_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 033c40a89f55525139fd5b6342281b09b97d05bf