From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwKZB-0001jK-Hg for qemu-devel@nongnu.org; Wed, 24 Aug 2011 17:00:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwKZA-0003DG-Hl for qemu-devel@nongnu.org; Wed, 24 Aug 2011 17:00:53 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:34189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwKZA-0003DB-E0 for qemu-devel@nongnu.org; Wed, 24 Aug 2011 17:00:52 -0400 Received: by gyd12 with SMTP id 12so1353308gyd.4 for ; Wed, 24 Aug 2011 14:00:51 -0700 (PDT) Message-ID: <4E556681.2060207@codemonkey.ws> Date: Wed, 24 Aug 2011 16:00:49 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1314187627-20975-1-git-send-email-avi@redhat.com> <4E54F2A2.6000100@siemens.com> <4E54F57D.8070809@redhat.com> <4E54F5E9.1020104@siemens.com> In-Reply-To: <4E54F5E9.1020104@siemens.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Avi Kivity , "qemu-devel@nongnu.org" On 08/24/2011 08:00 AM, Jan Kiszka wrote: > On 2011-08-24 14:58, Avi Kivity wrote: >> On 08/24/2011 03:46 PM, Jan Kiszka wrote: >>>> +++ b/hw/vga.c >>>> @@ -179,6 +179,8 @@ static void vga_update_memory_access(VGACommonState *s) >>>> base = 0xb8000; >>>> size = 0x8000; >>>> break; >>>> + default: >>>> + abort(); >>>> } >>>> region = g_malloc(sizeof(*region)); >>>> memory_region_init_alias(region, "vga.chain4",&s->vram, offset, size); >>> >>> ...or just make the last case default? >>> >> >> No reason to make the code unobvious in this path, IMO. Eventually gcc >> will be able to drop the 4/5 bytes this patch adds to the object code. > > diff --git a/hw/vga.c b/hw/vga.c > index 851fd68..125fb29 100644 > --- a/hw/vga.c > +++ b/hw/vga.c > @@ -176,6 +176,7 @@ static void vga_update_memory_access(VGACommonState *s) > size = 0x8000; > break; > case 3: > + default: > base = 0xb8000; > size = 0x8000; > break; > > ...is fairly common and well readable IMHO. And is less likely to be considered by someone to be a guest triggerable abort(). Can you send the patch as a top-level one with a Signed-off-by? Regards, Anthony Liguori > > Jan >