From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNPDh-00083L-Df for qemu-devel@nongnu.org; Wed, 13 Jul 2016 14:49:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNPDe-0002Jt-7c for qemu-devel@nongnu.org; Wed, 13 Jul 2016 14:49:17 -0400 Received: from 1.mo178.mail-out.ovh.net ([178.33.251.53]:56134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNPDe-0002Jf-0z for qemu-devel@nongnu.org; Wed, 13 Jul 2016 14:49:14 -0400 Received: from player169.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 67D53FFB5ED for ; Wed, 13 Jul 2016 20:49:12 +0200 (CEST) Date: Wed, 13 Jul 2016 20:49:07 +0200 From: Greg Kurz Message-ID: <20160713204907.7b828813@bahia.lan> In-Reply-To: <146843350570.23888.3512119586941866197.stgit@bahia.lan> References: <146843350570.23888.3512119586941866197.stgit@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] machine: add comment to abort path in machine_set_kernel_irqchip List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcel@redhat.com, ehabkost@redhat.com Cc: qemu-devel@nongnu.org On Wed, 13 Jul 2016 20:11:45 +0200 Greg Kurz 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 > --- > 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(); > } > } > >