mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Minfei Huang <mhuang@redhat.com>
To: Xunlei Pang <xlpang@redhat.com>
Cc: Petr Tesarik <ptesarik@suse.cz>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	ebiederm@xmission.com, akpm@linux-foundation.org,
	Dave Young <dyoung@redhat.com>, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH v3 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()
Date: Sun, 10 Jan 2016 09:08:51 +0800	[thread overview]
Message-ID: <20160110010851.GA19773@dhcp-128-25.nay.redhat.com> (raw)
In-Reply-To: <568FB964.7030705@redhat.com>

On 01/08/16 at 09:28pm, Xunlei Pang wrote:
> On 01/08/2016 at 04:47 PM, Minfei Huang wrote:
> > On 01/08/16 at 10:33am, Xunlei Pang wrote:
> >> +
> >> +static int
> >> +kexec_mark_range(unsigned long start, unsigned long end, bool protect)
> >> +{
> >> +	struct page *page;
> >> +	unsigned int nr_pages;
> >> +
> >> +	/* For physical range: [start, end] */
> >> +	if (!end || start > end)
> >> +		return 0;
> > This test !end is hard to be understood without the annotation. It is
> > better to add the comment about it.
> 
> !end is just for uninitialized crashk resource with a zero end member,
> maybe not so hard to understand :-)

Yes, The test !end may be simple, if someone knows the logic of kexec.
But it's hard to be understood, if there is only a glance from someone
without any annotation.

This test !end is related to the specific code flow, so it is better to
annotate it.

Thanks
Minfei

> 
> Regards,
> Xunlei
> 
> >
> > Otherwise it looks good for me.

      reply	other threads:[~2016-01-10  1:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08  2:33 [PATCH v3 1/2] kexec: Introduce a protection mechanism for the crashkernel reserved memory Xunlei Pang
2016-01-08  2:33 ` [PATCH v3 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres() Xunlei Pang
2016-01-08  8:47   ` Minfei Huang
2016-01-08 13:28     ` Xunlei Pang
2016-01-10  1:08       ` Minfei Huang [this message]

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=20160110010851.GA19773@dhcp-128-25.nay.redhat.com \
    --to=mhuang@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ptesarik@suse.cz \
    --cc=vgoyal@redhat.com \
    --cc=xlpang@redhat.com \
    /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

all inboxes | Powered by JetHome®