All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()
@ 2014-03-27  1:16 Chen Gang
  2014-03-27  7:55 ` Marcel Apfelbaum
  2014-03-27  8:59 ` Markus Armbruster
  0 siblings, 2 replies; 23+ messages in thread
From: Chen Gang @ 2014-03-27  1:16 UTC (permalink / raw)
  To: aliguori, QEMU Developers

At present, each 'opt_name' of 'accel_list' is uniq with each other, so
'buf' can only match one 'opt_name'.

When drop into the matching code block, can 'break' outside related
'for' looping after finish processing it (just like the other 'break'
within the matching block).

After print "... not support for this target", it can avoid to print
"... accelerator does not exist".


Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 vl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index 842e897..b4f98fa 100644
--- a/vl.c
+++ b/vl.c
@@ -2709,7 +2709,7 @@ static int configure_accelerator(QEMUMachine *machine)
                 if (!accel_list[i].available()) {
                     printf("%s not supported for this target\n",
                            accel_list[i].name);
-                    continue;
+                    break;
                 }
                 *(accel_list[i].allowed) = true;
                 ret = accel_list[i].init(machine);
-- 
1.7.9.5

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

end of thread, other threads:[~2014-04-08 12:05 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-27  1:16 [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator() Chen Gang
2014-03-27  7:55 ` Marcel Apfelbaum
2014-03-27  9:54   ` Chen Gang
2014-03-27  8:59 ` Markus Armbruster
2014-03-27 10:01   ` Chen Gang
2014-03-30 14:44     ` Chen Gang
2014-03-31 12:38       ` Markus Armbruster
2014-03-31 12:53         ` Chen Gang
2014-03-31 13:01           ` Peter Maydell
2014-03-31 13:12             ` Chen Gang
2014-03-31 13:16               ` Peter Maydell
2014-03-31 13:26                 ` Chen Gang
2014-03-31 13:33                   ` Peter Maydell
2014-03-31 23:50                     ` Chen Gang
2014-04-04  9:39                     ` [Qemu-devel] [PATCH-trivial v2] vl: Report accelerator not supported for target more nicely Chen Gang
2014-04-04 10:57                       ` Markus Armbruster
2014-04-06 12:30                         ` Chen Gang
2014-04-06  6:32                       ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-04-06 12:32                         ` Chen Gang
2014-04-08 12:00                           ` [Qemu-devel] [PATCH trivial 0/3] vl: simplify code for main() and get_boot_device() Chen Gang
2014-04-08 12:01                             ` [Qemu-devel] [PATCH trivial 1/3] vl: remove useless 'continue' Chen Gang
2014-04-08 12:02                               ` [Qemu-devel] [PATCH trivial 2/3] vl: remove redundant local variable 'res' Chen Gang
2014-04-08 12:05                                 ` [Qemu-devel] [PATCH trivial 3/3] vl: remove local variable 'args' in the middle of code block Chen Gang

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.