[PATCH 0/3] rpmsg: Convert to platform remove callback returning void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux