linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] iommu: constify pointer to bus_type
@ 2024-02-16 14:40 Krzysztof Kozlowski
  2024-02-16 14:40 ` [PATCH 2/4] iommu: constify of_phandle_args in xlate Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-16 14:40 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Joerg Roedel,
	Will Deacon, Robin Murphy, Rob Clark, Marek Szyprowski,
	Krzysztof Kozlowski, Alim Akhtar, Bjorn Andersson, Konrad Dybcio,
	Yong Wu, Matthias Brugger, AngeloGioacchino Del Regno,
	Heiko Stuebner, Orson Zhai, Baolin Wang, Chunyan Zhang,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Thierry Reding,
	Krishna Reddy, Jonathan Hunter, Jean-Philippe Brucker, asahi,
	linux-arm-kernel, iommu, linux-kernel, linux-arm-msm,
	linux-samsung-soc, linux-mediatek, linux-rockchip, linux-sunxi,
	linux-tegra, virtualization

Make pointer to bus_type a pointer to const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/iommu/iommu-priv.h | 5 +++--
 drivers/iommu/iommu.c      | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/iommu-priv.h b/drivers/iommu/iommu-priv.h
index 2024a2313348..5f731d994803 100644
--- a/drivers/iommu/iommu-priv.h
+++ b/drivers/iommu/iommu-priv.h
@@ -21,10 +21,11 @@ int iommu_group_replace_domain(struct iommu_group *group,
 			       struct iommu_domain *new_domain);
 
 int iommu_device_register_bus(struct iommu_device *iommu,
-			      const struct iommu_ops *ops, struct bus_type *bus,
+			      const struct iommu_ops *ops,
+			      const struct bus_type *bus,
 			      struct notifier_block *nb);
 void iommu_device_unregister_bus(struct iommu_device *iommu,
-				 struct bus_type *bus,
+				 const struct bus_type *bus,
 				 struct notifier_block *nb);
 
 #endif /* __LINUX_IOMMU_PRIV_H */
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index d14413916f93..170329a085b8 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -291,7 +291,7 @@ EXPORT_SYMBOL_GPL(iommu_device_unregister);
 
 #if IS_ENABLED(CONFIG_IOMMUFD_TEST)
 void iommu_device_unregister_bus(struct iommu_device *iommu,
-				 struct bus_type *bus,
+				 const struct bus_type *bus,
 				 struct notifier_block *nb)
 {
 	bus_unregister_notifier(bus, nb);
@@ -305,7 +305,8 @@ EXPORT_SYMBOL_GPL(iommu_device_unregister_bus);
  * some memory to hold a notifier_block.
  */
 int iommu_device_register_bus(struct iommu_device *iommu,
-			      const struct iommu_ops *ops, struct bus_type *bus,
+			      const struct iommu_ops *ops,
+			      const struct bus_type *bus,
 			      struct notifier_block *nb)
 {
 	int err;
-- 
2.34.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

end of thread, other threads:[~2024-03-01 12:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 14:40 [PATCH 1/4] iommu: constify pointer to bus_type Krzysztof Kozlowski
2024-02-16 14:40 ` [PATCH 2/4] iommu: constify of_phandle_args in xlate Krzysztof Kozlowski
2024-02-16 14:40 ` [PATCH 3/4] iommu: constify fwnode in iommu_ops_from_fwnode() Krzysztof Kozlowski
2024-02-16 14:40 ` [PATCH 4/4] iommu: re-use local fwnode variable " Krzysztof Kozlowski
2024-02-18  9:31 ` [PATCH 1/4] iommu: constify pointer to bus_type Baolu Lu
2024-03-01 12:47 ` 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).