Skip to contentSkip to conversation

Remove redundant code in branch MAP_PIRQ_TYPE_MSI

PATCH Superseded Zhenzhong Duan 5 participants 5 messages Oct 9, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove redundant code in branch MAP_PIRQ_TYPE_MSI

Same code is already in allocate_and_map_msi_pirq()

---
 xen/arch/x86/physdev.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/physdev.c +0 -2
index 0eb4097..aa02d18 100644
@@ -122,8 +122,6 @@ int physdev_map_pirq(domid_t domid, int type, int *index, int *pirq_p,
         break;
 
     case MAP_PIRQ_TYPE_MSI:
-        if ( !msi->table_base )
-            msi->entry_nr = 1;
         /* fallthrough */
     case MAP_PIRQ_TYPE_MULTI_MSI:
         ret = allocate_and_map_msi_pirq(d, *index, pirq_p, type, msi);
Signature · 6 lines
1.7.3

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw

Looks good for me.

Quoted 21 lines · Zhenzhong Duan

Same code is already in allocate_and_map_msi_pirq()

---
 xen/arch/x86/physdev.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/physdev.c +0 -2
index 0eb4097..aa02d18 100644
@@ -122,8 +122,6 @@ int physdev_map_pirq(domid_t domid, int type, int *index, int *pirq_p,
         break;
 
     case MAP_PIRQ_TYPE_MSI:
-        if ( !msi->table_base )
-            msi->entry_nr = 1;
         /* fallthrough */
     case MAP_PIRQ_TYPE_MULTI_MSI:
         ret = allocate_and_map_msi_pirq(d, *index, pirq_p, type, msi);
Signature · 9 lines
Oracle <http://www.oracle.com>
Joe Jin | Software Development Director | +8610.6106.5624
ORACLE | Linux and Virtualization
No. 24 Zhongguancun Software Park, Haidian District | 100193 Beijing 

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#2 lore raw
Quoted 3 lines · Joe Jin

Looks good for me.

Ah, indeed.

Also
CC-ing Jan and Andrew.

P.S.
Could you change the title to have 'x86/physdev:' as part of the name please?

Quoted 16 lines · Zhenzhong Duan
Quoted 14 lines

Same code is already in allocate_and_map_msi_pirq()

---
 xen/arch/x86/physdev.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/physdev.c +0 -0
index 0eb4097..aa02d18 100644
@@ -122,8 +122,6 @@ int physdev_map_pirq(domid_t domid, int type, int *index, int *pirq_p,
         break;
 
Quoted 19 lines
Quoted 7 lines
xen/arch/x86/physdev.c +0 -2
     case MAP_PIRQ_TYPE_MSI:
-        if ( !msi->table_base )
-            msi->entry_nr = 1;
         /* fallthrough */
     case MAP_PIRQ_TYPE_MULTI_MSI:
         ret = allocate_and_map_msi_pirq(d, *index, pirq_p, type, msi);
Signature · 9 lines
Oracle <http://www.oracle.com>
Joe Jin | Software Development Director | +8610.6106.5624
ORACLE | Linux and Virtualization
No. 24 Zhongguancun Software Park, Haidian District | 100193 Beijing 

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

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

#3 lore raw
In reply to Zhenzhong Duan

xen/arch/x86/physdev.c int physdev_map_pirq(domid_t domid, int type, int *index, int *pirq_p, · line 126

Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 09.10.17 at 08:00, <[email protected]> wrote:
xen/arch/x86/physdev.c +0 -2
@@ -122,8 +122,6 @@ int physdev_map_pirq(domid_t domid, int type, int *index, int *pirq_p,
         break;
 
     case MAP_PIRQ_TYPE_MSI:
-        if ( !msi->table_base )
-            msi->entry_nr = 1;
         /* fallthrough */
     case MAP_PIRQ_TYPE_MULTI_MSI:

I have a variant of this (also removing the then stray comment) pending for after 4.10 (the change comes too later for 4.10). Please also don't forget to Cc maintainers when submitting patches.

Jan

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

Reviewed-by on v1 1/1
#4 lore raw
In reply to Zhenzhong Duan
Quoted 3 lines · Zhenzhong Duan

Same code is already in allocate_and_map_msi_pirq()

Whit one nit below.

Quoted 9 lines
---
 xen/arch/x86/physdev.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/physdev.c +0 -0
index 0eb4097..aa02d18 100644

xen/arch/x86/physdev.c int physdev_map_pirq(domid_t domid, int type, int *index, int *pirq_p, · line 125

Quoted 6 lines
xen/arch/x86/physdev.c +0 -2
@@ -122,8 +122,6 @@ int physdev_map_pirq(domid_t domid, int type, int *index, int *pirq_p,
         break;
 
     case MAP_PIRQ_TYPE_MSI:
-        if ( !msi->table_base )
-            msi->entry_nr = 1;
         /* fallthrough */

Remove the fallthrough comment.

Quoted 9 lines
xen/arch/x86/physdev.c +0 -0
     case MAP_PIRQ_TYPE_MULTI_MSI:
         ret = allocate_and_map_msi_pirq(d, *index, pirq_p, type, msi);
Signature · 6 lines
1.7.3

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

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