qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access()
Date: Wed, 24 Aug 2011 16:07:43 +0300	[thread overview]
Message-ID: <4E54F79F.7090804@redhat.com> (raw)
In-Reply-To: <4E54F5E9.1020104@siemens.com>

On 08/24/2011 04:00 PM, 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.
>
>

Let's let the maintainers pick the one they like.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

  reply	other threads:[~2011-08-24 13:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24 12:07 [Qemu-devel] [PATCH] vga: squash build error in vga_update_memory_access() Avi Kivity
2011-08-24 12:46 ` Jan Kiszka
2011-08-24 12:58   ` Avi Kivity
2011-08-24 13:00     ` Jan Kiszka
2011-08-24 13:07       ` Avi Kivity [this message]
2011-08-24 21:00       ` Anthony Liguori
2011-08-25  9:10         ` [Qemu-devel] [PATCH] vga: Silence bogus gcc warning about uninitialized variables Jan Kiszka
2011-08-25 22:41           ` Anthony Liguori

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=4E54F79F.7090804@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.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).