From: Greg Kurz <groug@kaod.org>
To: marcel@redhat.com, ehabkost@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] machine: add comment to abort path in machine_set_kernel_irqchip
Date: Wed, 13 Jul 2016 20:49:07 +0200 [thread overview]
Message-ID: <20160713204907.7b828813@bahia.lan> (raw)
In-Reply-To: <146843350570.23888.3512119586941866197.stgit@bahia.lan>
On Wed, 13 Jul 2016 20:11:45 +0200
Greg Kurz <groug@kaod.org> wrote:
> We're not supposed to abort when the user passes a bogus value.
> Since the ckecing is done in visit_type_OnOffSplit(), the call to
s/ckecing/checking :)
> abort() is legitimate. Let's add a comment to make it explicit.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> hw/core/machine.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 2fe6ff6f3007..e5a456f21dd9 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -65,6 +65,9 @@ static void machine_set_kernel_irqchip(Object *obj, Visitor *v,
> ms->kernel_irqchip_split = true;
> break;
> default:
> + /* The value was checked in visit_type_OnOffSplit() above. If
> + * we get here, then something is wrong in QEMU.
> + */
> abort();
> }
> }
>
>
next prev parent reply other threads:[~2016-07-13 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 18:11 [Qemu-devel] [PATCH] machine: add comment to abort path in machine_set_kernel_irqchip Greg Kurz
2016-07-13 18:49 ` Greg Kurz [this message]
2016-07-13 20:03 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160713204907.7b828813@bahia.lan \
--to=groug@kaod.org \
--cc=ehabkost@redhat.com \
--cc=marcel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).