Skip to contentSkip to conversation

s390/pci: Use irq_data_get_msi_desc()

PATCH In review Thomas Gleixner 3 participants 4 messages Nov 12, 2022 – Nov 14, 2022

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

PATCH 1/1 s390/pci: Use irq_data_get_msi_desc()

No point in doing another lookup of irq_data, it's already provided as an argument.

---
 arch/s390/pci/pci_irq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/pci/pci_irq.c +1 -1
@@ -132,7 +132,7 @@ static int zpci_clear_irq(struct zpci_de
 static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *dest,
 				 bool force)
 {
-	struct msi_desc *entry = irq_get_msi_desc(data->irq);
+	struct msi_desc *entry = irq_data_get_msi_desc(data);
 	struct msi_msg msg = entry->msg;
 	int cpu_addr = smp_cpu_get_cpu_address(cpumask_first(dest));
 
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Thomas Gleixner

No point in doing another lookup of irq_data, it's already provided as an argument.

---
 arch/s390/pci/pci_irq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

arch/s390/pci/pci_irq.c static int zpci_clear_irq(struct zpci_de · line 138

Quoted 8 lines
arch/s390/pci/pci_irq.c +1 -1
@@ -132,7 +132,7 @@ static int zpci_clear_irq(struct zpci_de
 static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *dest,
 				 bool force)
 {
-	struct msi_desc *entry = irq_get_msi_desc(data->irq);
+	struct msi_desc *entry = irq_data_get_msi_desc(data);
 	struct msi_msg msg = entry->msg;
 	int cpu_addr = smp_cpu_get_cpu_address(cpumask_first(dest));
 

Thanks for the patch, makes sense to me so have my:

That said it must be noted that this function is only called when using directed PCI IRQs which is a hardware feature that has not made it to any released hardware. Nevertheless no point int doing things more complicated than necessary even for that case.

If there are no objections I'll apply this to our internal tree and it will then go upstream via the s390 tree.

#2 lore raw
Quoted 8 lines · Niklas Schnelle

On Sat, 2022-11-12 at 19:47 +0100, Thomas Gleixner wrote:
That said it must be noted that this function is only called when using directed PCI IRQs which is a hardware feature that has not made it to any released hardware. Nevertheless no point int doing things more complicated than necessary even for that case.

If there are no objections I'll apply this to our internal tree and it will then go upstream via the s390 tree.

Sure. It has no dependencies. I just stumbled over it when doing a tree wide inspection of (PCI)MSI code.

Thanks,

tglx

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Thomas Gleixner
Quoted 11 lines · Thomas Gleixner

No point in doing another lookup of irq_data, it's already provided as an argument.

---
 arch/s390/pci/pci_irq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

arch/s390/pci/pci_irq.c static int zpci_clear_irq(struct zpci_de · line 137

Quoted 7 lines
arch/s390/pci/pci_irq.c +1 -1
@@ -132,7 +132,7 @@ static int zpci_clear_irq(struct zpci_de
 static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *dest,
 				 bool force)
 {
-	struct msi_desc *entry = irq_get_msi_desc(data->irq);
+	struct msi_desc *entry = irq_data_get_msi_desc(data);
 	struct msi_msg msg = entry->msg;
 	int cpu_addr = smp_cpu_get_cpu_address(cpumask_first(dest));