All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vmstate-static-checker:remove this redundant return
@ 2022-09-28  9:03 dinglimin
  2022-10-13 22:36 ` John Snow
  2022-10-22 21:19 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: dinglimin @ 2022-09-28  9:03 UTC (permalink / raw)
  To: thuth; +Cc: alex.bennee, jsnow, qemu-devel, dinglimin

Jump statements, such as return and continue let you
change the default flow of program execution,
but jump statements that direct the control flow to
the original direction are just a waste of keystrokes.

Signed-off-by: dinglimin <dinglimin@cmss.chinamobile.com>
---
 scripts/vmstate-static-checker.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index b369388360..dfeee8231a 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -367,7 +367,6 @@ def check_machine_type(s, d):
     if s["Name"] != d["Name"]:
         print("Warning: checking incompatible machine types:", end=' ')
         print("\"" + s["Name"] + "\", \"" + d["Name"] + "\"")
-    return
 
 
 def main():
-- 
2.30.0.windows.2





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

* Re: [PATCH] vmstate-static-checker:remove this redundant return
  2022-09-28  9:03 [PATCH] vmstate-static-checker:remove this redundant return dinglimin
@ 2022-10-13 22:36 ` John Snow
  2022-10-22 21:19 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: John Snow @ 2022-10-13 22:36 UTC (permalink / raw)
  To: dinglimin; +Cc: thuth, alex.bennee, qemu-devel, qemu-trivial

On Wed, Sep 28, 2022 at 5:06 AM dinglimin
<dinglimin@cmss.chinamobile.com> wrote:
>
> Jump statements, such as return and continue let you
> change the default flow of program execution,
> but jump statements that direct the control flow to
> the original direction are just a waste of keystrokes.
>
> Signed-off-by: dinglimin <dinglimin@cmss.chinamobile.com>
> ---
>  scripts/vmstate-static-checker.py | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
> index b369388360..dfeee8231a 100755
> --- a/scripts/vmstate-static-checker.py
> +++ b/scripts/vmstate-static-checker.py
> @@ -367,7 +367,6 @@ def check_machine_type(s, d):
>      if s["Name"] != d["Name"]:
>          print("Warning: checking incompatible machine types:", end=' ')
>          print("\"" + s["Name"] + "\", \"" + d["Name"] + "\"")
> -    return
>
>
>  def main():
> --
> 2.30.0.windows.2
>

This can go through the trivial branch.

Reviewed-by: John Snow <jsnow@redhat.com>



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

* Re: [PATCH] vmstate-static-checker:remove this redundant return
  2022-09-28  9:03 [PATCH] vmstate-static-checker:remove this redundant return dinglimin
  2022-10-13 22:36 ` John Snow
@ 2022-10-22 21:19 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2022-10-22 21:19 UTC (permalink / raw)
  To: dinglimin, thuth; +Cc: alex.bennee, jsnow, qemu-devel, qemu-trivial

Le 28/09/2022 à 11:03, dinglimin a écrit :
> Jump statements, such as return and continue let you
> change the default flow of program execution,
> but jump statements that direct the control flow to
> the original direction are just a waste of keystrokes.
> 
> Signed-off-by: dinglimin <dinglimin@cmss.chinamobile.com>
> ---
>   scripts/vmstate-static-checker.py | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
> index b369388360..dfeee8231a 100755
> --- a/scripts/vmstate-static-checker.py
> +++ b/scripts/vmstate-static-checker.py
> @@ -367,7 +367,6 @@ def check_machine_type(s, d):
>       if s["Name"] != d["Name"]:
>           print("Warning: checking incompatible machine types:", end=' ')
>           print("\"" + s["Name"] + "\", \"" + d["Name"] + "\"")
> -    return
>   
>   
>   def main():

Applied to my trivial-patches branch.

Thanks,
Laurent



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

end of thread, other threads:[~2022-10-24  1:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28  9:03 [PATCH] vmstate-static-checker:remove this redundant return dinglimin
2022-10-13 22:36 ` John Snow
2022-10-22 21:19 ` Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.