[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1108030821320.4521@swampdragon.chaosbits.net>
Date: Wed, 3 Aug 2011 08:23:05 +0200 (CEST)
From: Jesper Juhl <jj@...osbits.net>
To: Igor Mammedov <imammedo@...hat.com>
cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] xen: off by one error in xen/setup.c
On Wed, 3 Aug 2011, Igor Mammedov wrote:
> On 08/02/2011 07:07 PM, Konrad Rzeszutek Wilk wrote:
> > On Tue, Aug 02, 2011 at 11:45:23AM +0200, Igor Mammedov wrote:
> > > Do not try to initialize pfn beyond of available address space.
> > >
> > > Signed-off-by: Igor Mammedov<imammedo@...hat.com>
> > > ---
> > > arch/x86/xen/setup.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> > > index 60aeeb5..2221b05 100644
> > > --- a/arch/x86/xen/setup.c
> > > +++ b/arch/x86/xen/setup.c
> > > @@ -69,7 +69,7 @@ static void __init xen_add_extra_mem(unsigned long
> > > pages)
> > >
> > > xen_max_p2m_pfn = PFN_DOWN(extra_start + size);
> > >
> > > - for (pfn = PFN_DOWN(extra_start); pfn<= xen_max_p2m_pfn; pfn++)
> > > + for (pfn = PFN_DOWN(extra_start); pfn< xen_max_p2m_pfn; ++pfn)
> > > __set_phys_to_machine(pfn, INVALID_P2M_ENTRY);
> >
> > Did this actually break anything?
>
> Not really, but for the sake of correctness and as cleanup it's good idea.
>
Ok I'm really, really nitpicking here, but if it's supposed to "clean up",
wouldn't this:
for (pfn = PFN_DOWN(extra_start); pfn < xen_max_p2m_pfn; ++pfn)
be preferable (note the spacing around '<') ?
--
Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists