linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] rpmsg: Convert to platform remove callback returning void
@ 2023-03-21 15:40 Uwe Kleine-König
  2023-03-21 15:40 ` [PATCH 1/3] rpmsg: qcom_smd: Make qcom_smd_unregister_edge() return void Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-03-21 15:40 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Mathieu Poirier
  Cc: Konrad Dybcio, linux-arm-msm, linux-remoteproc, kernel

Hello,

this series adapts the platform drivers below drivers/rpmsg to use the
.remove_new() callback. Compared to the traditional .remove() callback
.remove_new() returns no value. This is a good thing because the driver core
doesn't (and cannot) cope for errors during remove. The only effect of a
non-zero return value in .remove() is that the driver core emits a warning. The
device is removed anyhow and an early return from .remove() usually yields a
resource leak.

By changing the remove callback to return void driver authors cannot
reasonably assume any more that there is some kind of cleanup later.

The two rpmsg platform drivers always returned zero before. This just
wasn't obvious, so the first patch simplifies a bit to make it obvious.
After that the drivers are converted without side effects to
.remove_new().

Best regards
Uwe

Uwe Kleine-König (3):
  rpmsg: qcom_smd: Make qcom_smd_unregister_edge() return void
  rpmsg: qcom_glink_rpm: Convert to platform remove callback returning
    void
  rpmsg: qcom_smd: Convert to platform remove callback returning void

 drivers/rpmsg/qcom_glink_rpm.c |  6 ++----
 drivers/rpmsg/qcom_smd.c       | 24 +++++++++++-------------
 include/linux/rpmsg/qcom_smd.h |  5 ++---
 3 files changed, 15 insertions(+), 20 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


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

end of thread, other threads:[~2023-04-06  4:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 15:40 [PATCH 0/3] rpmsg: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-21 15:40 ` [PATCH 1/3] rpmsg: qcom_smd: Make qcom_smd_unregister_edge() return void Uwe Kleine-König
2023-03-21 15:40 ` [PATCH 2/3] rpmsg: qcom_glink_rpm: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-21 15:40 ` [PATCH 3/3] rpmsg: qcom_smd: " Uwe Kleine-König
2023-04-06  4:04 ` [PATCH 0/3] rpmsg: " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).