Skip to contentSkip to conversation

iommu: remove useless parameter in iommu_bus_init().

PATCH In review Yu Zhang 2 participants 3 messages Sep 30, 2022 IOMMU

lore
Share & tools
lore

Yu Zhang

author
#0 lore raw

PATCH 1/1 iommu: remove useless parameter in iommu_bus_init().

Parameter 'ops' is no longer used by iommu_bus_init(), after commit 8cec63e52966 ("iommu: Remove iommu_callback_data").

So just remove it.

---
 drivers/iommu/iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/iommu.c +2 -2
index 3a808146b50f..bedda1e0f016 100644
@@ -1775,7 +1775,7 @@ int bus_iommu_probe(struct bus_type *bus)
 	return ret;
 }
 
-static int iommu_bus_init(struct bus_type *bus, const struct iommu_ops *ops)
+static int iommu_bus_init(struct bus_type *bus)
 {
 	struct notifier_block *nb;
 	int err;
@@ -1836,7 +1836,7 @@ int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops)
 	bus->iommu_ops = ops;
 
 	/* Do IOMMU specific setup for this bus-type */
-	err = iommu_bus_init(bus, ops);
+	err = iommu_bus_init(bus);
 	if (err)
 		bus->iommu_ops = NULL;
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 24 lines · Yu Zhang

Parameter 'ops' is no longer used by iommu_bus_init(), after commit 8cec63e52966 ("iommu: Remove iommu_callback_data").

So just remove it.

---
  drivers/iommu/iommu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/iommu.c +1 -1
index 3a808146b50f..bedda1e0f016 100644
@@ -1775,7 +1775,7 @@ int bus_iommu_probe(struct bus_type *bus)
  	return ret;
  }
 
-static int iommu_bus_init(struct bus_type *bus, const struct iommu_ops *ops)
+static int iommu_bus_init(struct bus_type *bus)
  {
  	struct notifier_block *nb;
  	int err;

drivers/iommu/iommu.c int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops) · line 1842

Quoted 8 lines
drivers/iommu/iommu.c +1 -1
@@ -1836,7 +1836,7 @@ int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops)
  	bus->iommu_ops = ops;
 
  	/* Do IOMMU specific setup for this bus-type */
-	err = iommu_bus_init(bus, ops);
+	err = iommu_bus_init(bus);
  	if (err)
  		bus->iommu_ops = NULL;
 

bus_set_iommu() has been retired. All patches are just queued in linux-next and will show up in v6.1-rc1.

Best regards,
baolu

author
#2 lore raw
Quoted 25 lines · Baolu Lu
Quoted 24 lines · Yu Zhang

Parameter 'ops' is no longer used by iommu_bus_init(), after commit 8cec63e52966 ("iommu: Remove iommu_callback_data").

So just remove it.

---
  drivers/iommu/iommu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/iommu.c +1 -1
index 3a808146b50f..bedda1e0f016 100644
@@ -1775,7 +1775,7 @@ int bus_iommu_probe(struct bus_type *bus)
  	return ret;
  }
-static int iommu_bus_init(struct bus_type *bus, const struct iommu_ops *ops)
+static int iommu_bus_init(struct bus_type *bus)
  {
  	struct notifier_block *nb;
  	int err;
@@ -1836,7 +1836,7 @@ int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops)
  	bus->iommu_ops = ops;
Quoted 8 lines

drivers/iommu/iommu.c int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops) · line 1841

Quoted 5 lines
drivers/iommu/iommu.c +1 -1
  	/* Do IOMMU specific setup for this bus-type */
-	err = iommu_bus_init(bus, ops);
+	err = iommu_bus_init(bus);
  	if (err)
  		bus->iommu_ops = NULL;

bus_set_iommu() has been retired. All patches are just queued in linux-next and will show up in v6.1-rc1.

Oh. Sorry for the disturbance.

B.R.
Yu

Quoted 3 lines

Best regards,
baolu