public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Jesper Juhl <jj@chaosbits.net>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] xen: off by one error in xen/setup.c
Date: Wed, 03 Aug 2011 08:31:52 +0200	[thread overview]
Message-ID: <4E38EB58.4020204@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1108030821320.4521@swampdragon.chaosbits.net>

On 08/03/2011 08:23 AM, Jesper Juhl wrote:
> 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@redhat.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 '<') ?

It is correct. Checkout https://lkml.org/lkml/2011/8/2/82

-- 
Thanks,
  Igor

  reply	other threads:[~2011-08-03  6:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02  9:45 [PATCH 0/3] xen: small fixes and cleanups at arch/x86/xen/setup.c Igor Mammedov
2011-08-02  9:45 ` [PATCH 1/3] xen: off by one error in xen/setup.c Igor Mammedov
2011-08-02 17:07   ` Konrad Rzeszutek Wilk
2011-08-03  5:33     ` Igor Mammedov
2011-08-03  6:23       ` Jesper Juhl
2011-08-03  6:31         ` Igor Mammedov [this message]
2011-08-09 16:55   ` Konrad Rzeszutek Wilk
2011-08-02  9:45 ` [PATCH 2/3] xen: Fix printk() format " Igor Mammedov
2011-08-02  9:45 ` [PATCH 3/3] xen: Fix misleading WARN message at xen_release_chunk Igor Mammedov

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=4E38EB58.4020204@redhat.com \
    --to=imammedo@redhat.com \
    --cc=jj@chaosbits.net \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.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