[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/1] main loop: remove useless code
From: |
felix yao |
Subject: |
Re: [Qemu-devel] [PATCH 1/1] main loop: remove useless code |
Date: |
Mon, 4 Dec 2017 10:08:18 +0800 |
Hi Peter Maydell:
Got it, thank you very much!
2017-12-02 19:52 GMT+08:00 Peter Maydell <address@hidden>:
> On 2 December 2017 at 07:41, FelixYao <address@hidden> wrote:
> > hi Paolo Bonzini:
> >
> > Those codes seem useless, Could it be removed?
> >
> > Signed-off-by: FelixYao <address@hidden>
> > ---
> > vl.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/vl.c b/vl.c
> > index 1ad1c04..5bed4c2 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -2995,10 +2995,6 @@ static void set_memory_options(uint64_t
> *ram_slots, ram_addr_t *maxram_size,
> >
> > sz = QEMU_ALIGN_UP(sz, 8192);
> > ram_size = sz;
> > - if (ram_size != sz) {
> > - error_report("ram size too large");
> > - exit(EXIT_FAILURE);
> > - }
>
> ram_size is a ramaddr_t, which may be a 32-bit variable, whereas
> sz is a uint64_t. This check is making sure that the ram size
> specified can actually fit in a ramaddr_t.
>
> thanks
> -- PMM
>