xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI
@ 2017-10-09  6:00 Zhenzhong Duan
  2017-10-09  6:15 ` Joe Jin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zhenzhong Duan @ 2017-10-09  6:00 UTC (permalink / raw)
  To: xen-devel; +Cc: Joe Jin, Srinivas REDDY Eeda

Same code is already in allocate_and_map_msi_pirq()

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
---
 xen/arch/x86/physdev.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 0eb4097..aa02d18 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -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);
-- 
1.7.3

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI
  2017-10-09  6:00 [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI Zhenzhong Duan
@ 2017-10-09  6:15 ` Joe Jin
  2017-10-09 17:44   ` Konrad Rzeszutek Wilk
  2017-10-09  8:29 ` Jan Beulich
  2017-10-09 14:27 ` Roger Pau Monné
  2 siblings, 1 reply; 5+ messages in thread
From: Joe Jin @ 2017-10-09  6:15 UTC (permalink / raw)
  To: Zhenzhong Duan, xen-devel; +Cc: Srinivas REDDY Eeda

Looks good for me.

Reviewed-by: Joe Jin <joe.jin@oracle.com>

On 10/09/2017 02:00 PM, Zhenzhong Duan wrote:
> Same code is already in allocate_and_map_msi_pirq()
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> ---
>  xen/arch/x86/physdev.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
> index 0eb4097..aa02d18 100644
> --- a/xen/arch/x86/physdev.c
> +++ b/xen/arch/x86/physdev.c
> @@ -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);
> 


-- 
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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI
  2017-10-09  6:00 [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI Zhenzhong Duan
  2017-10-09  6:15 ` Joe Jin
@ 2017-10-09  8:29 ` Jan Beulich
  2017-10-09 14:27 ` Roger Pau Monné
  2 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2017-10-09  8:29 UTC (permalink / raw)
  To: Zhenzhong Duan; +Cc: xen-devel, Joe Jin, Srinivas REDDY Eeda

>>> On 09.10.17 at 08:00, <zhenzhong.duan@oracle.com> wrote:
> --- a/xen/arch/x86/physdev.c
> +++ b/xen/arch/x86/physdev.c
> @@ -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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI
  2017-10-09  6:00 [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI Zhenzhong Duan
  2017-10-09  6:15 ` Joe Jin
  2017-10-09  8:29 ` Jan Beulich
@ 2017-10-09 14:27 ` Roger Pau Monné
  2 siblings, 0 replies; 5+ messages in thread
From: Roger Pau Monné @ 2017-10-09 14:27 UTC (permalink / raw)
  To: Zhenzhong Duan; +Cc: xen-devel, Joe Jin, Srinivas REDDY Eeda

On Mon, Oct 09, 2017 at 06:00:15AM +0000, Zhenzhong Duan wrote:
> Same code is already in allocate_and_map_msi_pirq()
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Whit one nit below.

> ---
>  xen/arch/x86/physdev.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
> index 0eb4097..aa02d18 100644
> --- a/xen/arch/x86/physdev.c
> +++ b/xen/arch/x86/physdev.c
> @@ -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.

>      case MAP_PIRQ_TYPE_MULTI_MSI:
>          ret = allocate_and_map_msi_pirq(d, *index, pirq_p, type, msi);
> -- 
> 1.7.3
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI
  2017-10-09  6:15 ` Joe Jin
@ 2017-10-09 17:44   ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-10-09 17:44 UTC (permalink / raw)
  To: Joe Jin, jbeulich, andrew.cooper3
  Cc: xen-devel, Zhenzhong Duan, Srinivas REDDY Eeda

On Mon, Oct 09, 2017 at 02:15:48PM +0800, Joe Jin wrote:
> Looks good for me.
> 
> Reviewed-by: Joe Jin <joe.jin@oracle.com>

Ah, indeed.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>


Also
CC-ing Jan and Andrew.

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

> 
> On 10/09/2017 02:00 PM, Zhenzhong Duan wrote:
> > Same code is already in allocate_and_map_msi_pirq()
> > 
> > Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> > ---
> >  xen/arch/x86/physdev.c |    2 --
> >  1 files changed, 0 insertions(+), 2 deletions(-)
> > 
> > diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
> > index 0eb4097..aa02d18 100644
> > --- a/xen/arch/x86/physdev.c
> > +++ b/xen/arch/x86/physdev.c
> > @@ -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);
> > 
> 
> 
> -- 
> 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
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-09 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09  6:00 [PATCH] Remove redundant code in branch MAP_PIRQ_TYPE_MSI Zhenzhong Duan
2017-10-09  6:15 ` Joe Jin
2017-10-09 17:44   ` Konrad Rzeszutek Wilk
2017-10-09  8:29 ` Jan Beulich
2017-10-09 14:27 ` Roger Pau Monné

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).