xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); "
@ 2016-05-30  1:46 Dongli Zhang
  2016-05-31 21:02 ` Konrad Rzeszutek Wilk
  2016-06-09 15:21 ` Wei Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Dongli Zhang @ 2016-05-30  1:46 UTC (permalink / raw)
  To: xen-devel; +Cc: ross.lagerwall, ian.jackson, wei.liu2

Local variable "j" would be used only when "i == ARRAY_SIZE(main_options)"
is true. Thus, it is not necessary to update "j" when "i ==
ARRAY_SIZE(main_options)" is false.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
 tools/misc/xen-xsplice.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
index ddaa079..811dc57 100644
--- a/tools/misc/xen-xsplice.c
+++ b/tools/misc/xen-xsplice.c
@@ -435,8 +435,7 @@ int main(int argc, char *argv[])
                    "'xen-xsplice help'\n", argv[1]);
             return 1;
         }
-    } else
-        j = ARRAY_SIZE(action_options);
+    }
 
     xch = xc_interface_open(0,0,0);
     if ( !xch )
-- 
1.9.1


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

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

* Re: [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); "
  2016-05-30  1:46 [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); " Dongli Zhang
@ 2016-05-31 21:02 ` Konrad Rzeszutek Wilk
  2016-06-01 10:14   ` Wei Liu
  2016-06-09 15:21 ` Wei Liu
  1 sibling, 1 reply; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-31 21:02 UTC (permalink / raw)
  To: Dongli Zhang; +Cc: ross.lagerwall, ian.jackson, wei.liu2, xen-devel

On Mon, May 30, 2016 at 09:46:02AM +0800, Dongli Zhang wrote:
> Local variable "j" would be used only when "i == ARRAY_SIZE(main_options)"
> is true. Thus, it is not necessary to update "j" when "i ==
> ARRAY_SIZE(main_options)" is false.
> 
> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>

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

Wei, it is up to you whether it should go in 4.7 or in 4.8.
This is a cleanup so it has no effect on the code.

> ---
>  tools/misc/xen-xsplice.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
> index ddaa079..811dc57 100644
> --- a/tools/misc/xen-xsplice.c
> +++ b/tools/misc/xen-xsplice.c
> @@ -435,8 +435,7 @@ int main(int argc, char *argv[])
>                     "'xen-xsplice help'\n", argv[1]);
>              return 1;
>          }
> -    } else
> -        j = ARRAY_SIZE(action_options);
> +    }
>  
>      xch = xc_interface_open(0,0,0);
>      if ( !xch )
> -- 
> 1.9.1
> 

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

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

* Re: [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); "
  2016-05-31 21:02 ` Konrad Rzeszutek Wilk
@ 2016-06-01 10:14   ` Wei Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2016-06-01 10:14 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Dongli Zhang, ross.lagerwall, ian.jackson, wei.liu2, xen-devel

On Tue, May 31, 2016 at 05:02:50PM -0400, Konrad Rzeszutek Wilk wrote:
> On Mon, May 30, 2016 at 09:46:02AM +0800, Dongli Zhang wrote:
> > Local variable "j" would be used only when "i == ARRAY_SIZE(main_options)"
> > is true. Thus, it is not necessary to update "j" when "i ==
> > ARRAY_SIZE(main_options)" is false.
> > 
> > Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
> 
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> Wei, it is up to you whether it should go in 4.7 or in 4.8.
> This is a cleanup so it has no effect on the code.
> 

This can wait.

You obviously have more important code churn then this. Do want to make
your life harder.

Wei.

> > ---
> >  tools/misc/xen-xsplice.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
> > index ddaa079..811dc57 100644
> > --- a/tools/misc/xen-xsplice.c
> > +++ b/tools/misc/xen-xsplice.c
> > @@ -435,8 +435,7 @@ int main(int argc, char *argv[])
> >                     "'xen-xsplice help'\n", argv[1]);
> >              return 1;
> >          }
> > -    } else
> > -        j = ARRAY_SIZE(action_options);
> > +    }
> >  
> >      xch = xc_interface_open(0,0,0);
> >      if ( !xch )
> > -- 
> > 1.9.1
> > 

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

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

* Re: [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); "
  2016-05-30  1:46 [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); " Dongli Zhang
  2016-05-31 21:02 ` Konrad Rzeszutek Wilk
@ 2016-06-09 15:21 ` Wei Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Wei Liu @ 2016-06-09 15:21 UTC (permalink / raw)
  To: Dongli Zhang; +Cc: ross.lagerwall, ian.jackson, wei.liu2, xen-devel

On Mon, May 30, 2016 at 09:46:02AM +0800, Dongli Zhang wrote:
> Local variable "j" would be used only when "i == ARRAY_SIZE(main_options)"
> is true. Thus, it is not necessary to update "j" when "i ==
> ARRAY_SIZE(main_options)" is false.
> 
> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
> ---
>  tools/misc/xen-xsplice.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
> index ddaa079..811dc57 100644
> --- a/tools/misc/xen-xsplice.c
> +++ b/tools/misc/xen-xsplice.c
> @@ -435,8 +435,7 @@ int main(int argc, char *argv[])
>                     "'xen-xsplice help'\n", argv[1]);
>              return 1;
>          }
> -    } else
> -        j = ARRAY_SIZE(action_options);
> +    }
>  

And of course since xsplice doesn't exist anymore, this patch won't
apply.

Dongli, can you resubmit this patch and update the subject line
accordingly?

You can of course keep Konrad's Review-by tag. I don't expect him to
object.

Wei.

>      xch = xc_interface_open(0,0,0);
>      if ( !xch )
> -- 
> 1.9.1
> 

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

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

end of thread, other threads:[~2016-06-09 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30  1:46 [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); " Dongli Zhang
2016-05-31 21:02 ` Konrad Rzeszutek Wilk
2016-06-01 10:14   ` Wei Liu
2016-06-09 15:21 ` Wei Liu

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).