Skip to contentSkip to conversation

cxl: Remove unnecessary cxl_pci_window_alignment()

PATCH Applied Bjorn Helgaas 3 participants 3 messages Dec 5, 2022 – Dec 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cxl: Remove unnecessary cxl_pci_window_alignment()

From: Bjorn Helgaas <[email protected]>

cxl_pci_window_alignment() is referenced only via the struct pci_controller_ops.window_alignment function pointer, and only in the powerpc implementation of pcibios_window_alignment().

pcibios_window_alignment() defaults to returning 1 if the function pointer is NULL, which is the same was what cxl_pci_window_alignment() does.

cxl_pci_window_alignment() is unnecessary, so remove it. No functional change intended.

---
 drivers/misc/cxl/vphb.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/misc/cxl/vphb.c +0 -7
index 1264253cc07b..6332db8044bd 100644
@@ -67,12 +67,6 @@ static void cxl_pci_disable_device(struct pci_dev *dev)
 	}
 }
 
-static resource_size_t cxl_pci_window_alignment(struct pci_bus *bus,
-						unsigned long type)
-{
-	return 1;
-}
-
 static void cxl_pci_reset_secondary_bus(struct pci_dev *dev)
 {
 	/* Should we do an AFU reset here ? */
@@ -200,7 +194,6 @@ static struct pci_controller_ops cxl_pci_controller_ops =
 	.enable_device_hook = cxl_pci_enable_device_hook,
 	.disable_device = cxl_pci_disable_device,
 	.release_device = cxl_pci_disable_device,
-	.window_alignment = cxl_pci_window_alignment,
 	.reset_secondary_bus = cxl_pci_reset_secondary_bus,
 	.setup_msi_irqs = cxl_setup_msi_irqs,
 	.teardown_msi_irqs = cxl_teardown_msi_irqs,
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

cxl_pci_window_alignment() is referenced only via the struct pci_controller_ops.window_alignment function pointer, and only in the powerpc implementation of pcibios_window_alignment().

Quoted 8 lines

pcibios_window_alignment() defaults to returning 1 if the function pointer is NULL, which is the same was what cxl_pci_window_alignment() does.

cxl_pci_window_alignment() is unnecessary, so remove it. No functional change intended.

---

Thanks!

Fred

Quoted 28 lines
  drivers/misc/cxl/vphb.c | 7 -------
  1 file changed, 7 deletions(-)
drivers/misc/cxl/vphb.c +0 -7
index 1264253cc07b..6332db8044bd 100644
@@ -67,12 +67,6 @@ static void cxl_pci_disable_device(struct pci_dev *dev)
  	}
  }
 
-static resource_size_t cxl_pci_window_alignment(struct pci_bus *bus,
-						unsigned long type)
-{
-	return 1;
-}
-
  static void cxl_pci_reset_secondary_bus(struct pci_dev *dev)
  {
  	/* Should we do an AFU reset here ? */
@@ -200,7 +194,6 @@ static struct pci_controller_ops cxl_pci_controller_ops =
  	.enable_device_hook = cxl_pci_enable_device_hook,
  	.disable_device = cxl_pci_disable_device,
  	.release_device = cxl_pci_disable_device,
-	.window_alignment = cxl_pci_window_alignment,
  	.reset_secondary_bus = cxl_pci_reset_secondary_bus,
  	.setup_msi_irqs = cxl_setup_msi_irqs,
  	.teardown_msi_irqs = cxl_teardown_msi_irqs,
#2 lore raw
In reply to Bjorn Helgaas
Quoted 10 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

cxl_pci_window_alignment() is referenced only via the struct pci_controller_ops.window_alignment function pointer, and only in the powerpc implementation of pcibios_window_alignment().

pcibios_window_alignment() defaults to returning 1 if the function pointer is NULL, which is the same was what cxl_pci_window_alignment() does.

[...]

Applied to powerpc/next.

[1/1] cxl: Remove unnecessary cxl_pci_window_alignment()

      https://git.kernel.org/powerpc/c/6aecc0a59e07ba895b5473e0c916ba5f3d556c15

cheers