s390/pci: Use irq_data_get_msi_desc()
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_destatic 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));
Quoted 11 lines · Thomas Gleixner
No point in doing another lookup of
irq_data, it's already provided as an argument.Signed-off-by Thomas Gleixner <[email protected]>--- 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_destatic 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.
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
Quoted 11 lines · Thomas Gleixner
No point in doing another lookup of
irq_data, it's already provided as an argument.Signed-off-by Thomas Gleixner <[email protected]>--- 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_destatic 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));