linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] i3c: Convert to platform remove callback returning void
@ 2023-03-18 23:33 Uwe Kleine-König
  2023-03-18 23:33 ` [PATCH 1/5] i3c: Make i3c_master_unregister() return void Uwe Kleine-König
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2023-03-18 23:33 UTC (permalink / raw)
  To: Alexandre Belloni, Przemysław Gaj, Miquel Raynal, Conor Culhane
  Cc: linux-i3c, kernel

Hello,

this series adapts the platform drivers below drivers/i3c 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 first patch simplifies the remove callbacks by making
i3c_master_unregister() return void. After that all drivers are converted
trivially to .remove_new().

Best regards
Uwe

Uwe Kleine-König (5):
  i3c: Make i3c_master_unregister() return void
  i3c: dw: Convert to platform remove callback returning void
  i3c: cdns: Convert to platform remove callback returning void
  i3c: mipi-i3c-hci: Convert to platform remove callback returning void
  i3c: svc: Convert to platform remove callback returning void

 drivers/i3c/master.c                   |  6 +-----
 drivers/i3c/master/dw-i3c-master.c     | 11 +++--------
 drivers/i3c/master/i3c-master-cdns.c   | 11 +++--------
 drivers/i3c/master/mipi-i3c-hci/core.c |  6 +++---
 drivers/i3c/master/svc-i3c-master.c    | 11 +++--------
 include/linux/i3c/master.h             |  2 +-
 6 files changed, 14 insertions(+), 33 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

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

end of thread, other threads:[~2023-03-21 18:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 23:33 [PATCH 0/5] i3c: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-18 23:33 ` [PATCH 1/5] i3c: Make i3c_master_unregister() return void Uwe Kleine-König
2023-03-20 10:51   ` Miquel Raynal
2023-03-18 23:33 ` [PATCH 2/5] i3c: dw: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-18 23:33 ` [PATCH 3/5] i3c: cdns: " Uwe Kleine-König
2023-03-18 23:33 ` [PATCH 4/5] i3c: mipi-i3c-hci: " Uwe Kleine-König
2023-03-18 23:33 ` [PATCH 5/5] i3c: svc: " Uwe Kleine-König
2023-03-20 10:52   ` Miquel Raynal
2023-03-21 18:25 ` [PATCH 0/5] i3c: " Alexandre Belloni

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).