public inbox for linux-rtc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems
@ 2022-07-07 15:31 Uwe Kleine-König
  2022-07-13  2:40 ` Tzung-Bi Shih
  2022-07-26 14:44 ` Alexandre Belloni
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2022-07-07 15:31 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, Benson Leung
  Cc: Guenter Roeck, linux-rtc, chrome-platform, kernel

When a remove platform device callback returns an error code, the driver
core emits an error message ("remove callback returned a non-zero value.
This will be ignored.\n") and still removes the device. As the driver
already emits a more specific error message, return 0 to suppress the
core's error message.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/rtc/rtc-cros-ec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c
index 70626793ca69..887f5193e253 100644
--- a/drivers/rtc/rtc-cros-ec.c
+++ b/drivers/rtc/rtc-cros-ec.c
@@ -375,10 +375,8 @@ static int cros_ec_rtc_remove(struct platform_device *pdev)
 	ret = blocking_notifier_chain_unregister(
 				&cros_ec_rtc->cros_ec->event_notifier,
 				&cros_ec_rtc->notifier);
-	if (ret) {
+	if (ret)
 		dev_err(dev, "failed to unregister notifier\n");
-		return ret;
-	}
 
 	return 0;
 }

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems
  2022-07-07 15:31 [PATCH] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems Uwe Kleine-König
@ 2022-07-13  2:40 ` Tzung-Bi Shih
  2022-07-26 14:44 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Tzung-Bi Shih @ 2022-07-13  2:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Alessandro Zummo, Alexandre Belloni, Benson Leung, Guenter Roeck,
	linux-rtc, chrome-platform, kernel

On Thu, Jul 07, 2022 at 05:31:56PM +0200, Uwe Kleine-König wrote:
> When a remove platform device callback returns an error code, the driver
> core emits an error message ("remove callback returned a non-zero value.
> This will be ignored.\n") and still removes the device. As the driver
> already emits a more specific error message, return 0 to suppress the
> core's error message.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Tzung-Bi Shih <tzungbi@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems
  2022-07-07 15:31 [PATCH] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems Uwe Kleine-König
  2022-07-13  2:40 ` Tzung-Bi Shih
@ 2022-07-26 14:44 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2022-07-26 14:44 UTC (permalink / raw)
  To: a.zummo, bleung, Uwe Kleine-König
  Cc: kernel, linux-rtc, groeck, chrome-platform

On Thu, 7 Jul 2022 17:31:56 +0200, Uwe Kleine-König wrote:
> When a remove platform device callback returns an error code, the driver
> core emits an error message ("remove callback returned a non-zero value.
> This will be ignored.\n") and still removes the device. As the driver
> already emits a more specific error message, return 0 to suppress the
> core's error message.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> [...]

Applied, thanks!

[1/1] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems
      commit: 5c9f41443e8d5fbd414ad0dfa8e0996b937d135a

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-26 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07 15:31 [PATCH] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems Uwe Kleine-König
2022-07-13  2:40 ` Tzung-Bi Shih
2022-07-26 14:44 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox