Skip to contentSkip to conversation

x86/physdev: Remove redundant assignment in allocate_and_map_msi_pirq()

PATCH In review Zhenzhong Duan 3 participants 4 messages Jul 20, 2018 – Jul 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/physdev: Remove redundant assignment in allocate_and_map_msi_pirq()

No functional change.

---
 xen/arch/x86/irq.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/irq.c +0 -2
index 87ef2e8..5253fd1 100644
@@ -2701,8 +2701,6 @@ int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p,
         return -EINVAL;
     }
 
-    msi->irq = irq;
-
     pcidevs_lock();
     /* Verify or get pirq. */
     spin_lock(&d->event_lock);
Signature · 6 lines
1.7.3

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Zhenzhong Duan

No functional change.

---
 xen/arch/x86/irq.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/irq.c +0 -0
index 87ef2e8..5253fd1 100644

xen/arch/x86/irq.c int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p, · line 2704

Quoted 4 lines
xen/arch/x86/irq.c +0 -1
@@ -2701,8 +2701,6 @@ int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p,
         return -EINVAL;
     }
 
-    msi->irq = irq;

I would prefer to remove the assignment in the MAP_PIRQ_TYPE_MULTI_MSI case rather than here. IMO this one makes it clearer that msi->irq is always set. In any case:

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 16 lines · Roger Pau Monné
Quoted 15 lines · Zhenzhong Duan

No functional change.

---
 xen/arch/x86/irq.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/irq.c +0 -0
index 87ef2e8..5253fd1 100644
@@ -2701,8 +2701,6 @@ int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p,
         return -EINVAL;
     }
 
Quoted 4 lines

xen/arch/x86/irq.c int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p, · line 2704

Quoted 1 line
xen/arch/x86/irq.c +0 -1
-    msi->irq = irq;

I would prefer to remove the assignment in the MAP_PIRQ_TYPE_MULTI_MSI case rather than here. IMO this one makes it clearer that msi->irq is always set.

Me too.  I can fix this up on commit.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 17 lines · Andrew Cooper
Quoted 16 lines · Roger Pau Monné
Quoted 15 lines · Zhenzhong Duan

No functional change.

---
  xen/arch/x86/irq.c |    2 --
  1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/irq.c +0 -0
index 87ef2e8..5253fd1 100644
@@ -2701,8 +2701,6 @@ int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p,
          return -EINVAL;
      }
 
Quoted 6 lines
Quoted 4 lines

xen/arch/x86/irq.c int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p, · line 2704

Quoted 1 line
xen/arch/x86/irq.c +0 -1
-    msi->irq = irq;

I would prefer to remove the assignment in the MAP_PIRQ_TYPE_MULTI_MSI case rather than here. IMO this one makes it clearer that msi->irq is always set.

Me too.  I can fix this up on commit.

Sure, go ahead, thanks Roger, Andrew for review.

Regards
Zhenzhong

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel