linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] iommu: Convert to platform remove callback returning void
@ 2023-03-21  8:41 Uwe Kleine-König
  2023-03-21  8:41 ` [PATCH 01/10] iommu/arm-smmu: Drop if with an always false condition Uwe Kleine-König
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2023-03-21  8:41 UTC (permalink / raw)
  To: Will Deacon, Joerg Roedel, Lu Baolu, Vladimir Oltean,
	Sai Prakash Ranjan, Jon Nettleton, Hector Martin, Sven Peter,
	Jason Gunthorpe, Shameer Kolothum, Yicong Yang, Nicolin Chen,
	Rob Clark, Andy Gross, Bjorn Andersson, Yong Wu, Matthias Brugger,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: Robin Murphy, linux-arm-kernel, iommu, kernel, Alyssa Rosenzweig,
	asahi, linux-arm-msm, Konrad Dybcio, AngeloGioacchino Del Regno,
	linux-mediatek

Hello,

this series adapts the platform drivers below drivers/iommu 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.

After the first patch all drivers return zero unconditionally in their
.remove() callback, then the remaining patches convert to .remove_new()
without side effects.

There is only a single interdependency (namely patch #4 depends on #1).
If there are concerns for individual patches[1], please still apply the
others. Then I'd only care for the actual change requests and don't need
to resend the other unchanged patches at a later point in time.

Thanks
Uwe

[1] I don't expect something more tragic than "You picked the wrong
subject prefix" or similar.

Uwe Kleine-König (10):
  iommu/arm-smmu: Drop if with an always false condition
  iommu/apple-dart: Convert to platform remove callback returning void
  iommu/arm-smmu-v3: Convert to platform remove callback returning void
  iommu/arm-smmu: Convert to platform remove callback returning void
  iommu/ipmmu-vmsa: Convert to platform remove callback returning void
  iommu/msm: Convert to platform remove callback returning void
  iommu/mtk: Convert to platform remove callback returning void
  iommu/mtk_iommu_v1: Convert to platform remove callback returning void
  iommu/omap: Convert to platform remove callback returning void
  iommu/sprd: Convert to platform remove callback returning void

 drivers/iommu/apple-dart.c                  |  6 ++----
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |  6 ++----
 drivers/iommu/arm/arm-smmu/arm-smmu.c       | 12 ++----------
 drivers/iommu/arm/arm-smmu/qcom_iommu.c     | 12 ++++--------
 drivers/iommu/ipmmu-vmsa.c                  |  6 ++----
 drivers/iommu/msm_iommu.c                   |  5 ++---
 drivers/iommu/mtk_iommu.c                   |  5 ++---
 drivers/iommu/mtk_iommu_v1.c                |  5 ++---
 drivers/iommu/omap-iommu.c                  |  5 ++---
 drivers/iommu/sprd-iommu.c                  |  6 ++----
 10 files changed, 22 insertions(+), 46 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-03-31  8:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21  8:41 [PATCH 00/10] iommu: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-21  8:41 ` [PATCH 01/10] iommu/arm-smmu: Drop if with an always false condition Uwe Kleine-König
2023-03-28 13:42   ` Joerg Roedel
2023-03-28 14:10   ` Robin Murphy
2023-03-21  8:41 ` [PATCH 02/10] iommu/apple-dart: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-21  8:41 ` [PATCH 03/10] iommu/arm-smmu-v3: " Uwe Kleine-König
2023-03-21  8:41 ` [PATCH 04/10] iommu/arm-smmu: " Uwe Kleine-König
2023-03-21  8:41 ` [PATCH 07/10] iommu/mtk: " Uwe Kleine-König
2023-03-21  9:45   ` AngeloGioacchino Del Regno
2023-03-21  8:41 ` [PATCH 08/10] iommu/mtk_iommu_v1: " Uwe Kleine-König
2023-03-21  9:45   ` AngeloGioacchino Del Regno
2023-03-31  8:02 ` [PATCH 00/10] iommu: " Joerg Roedel

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