Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305402

Re: [PATCH v3 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

From Minfei Huang <mhuang@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()
Date 2016-01-10 02:10 +0100
Message-ID <qPcG5-5m2-3@gated-at.bofh.it> (permalink)
References <qOv85-7I-1@gated-at.bofh.it> <qOv85-7I-3@gated-at.bofh.it> <qOAUa-4eB-19@gated-at.bofh.it> <qOFha-7jI-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/2] kexec: Introduce a protection mechanism for the crashkernel reserved memory Xunlei Pang <xlpang@redhat.com> - 2016-01-08 03:40 +0100
  [PATCH v3 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres() Xunlei Pang <xlpang@redhat.com> - 2016-01-08 03:40 +0100
    Re: [PATCH v3 2/2] kexec: Provide  arch_kexec_protect(unprotect)_crashkres() Minfei Huang <mhuang@redhat.com> - 2016-01-08 09:50 +0100
      Re: [PATCH v3 2/2] kexec: Provide  arch_kexec_protect(unprotect)_crashkres() Xunlei Pang <xlpang@redhat.com> - 2016-01-08 14:30 +0100
        Re: [PATCH v3 2/2] kexec: Provide  arch_kexec_protect(unprotect)_crashkres() Minfei Huang <mhuang@redhat.com> - 2016-01-10 02:10 +0100

csiph-web