From: Baoquan He <bhe@redhat.com>
To: Geliang Tang <geliangtang@163.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Dave Young <dyoung@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kexec: use list_for_each_entry_safe in kimage_free_page_list
Date: Fri, 11 Dec 2015 10:55:43 +0800 [thread overview]
Message-ID: <20151211025543.GA2544@x1.redhat.com> (raw)
In-Reply-To: <a046a71c6d1b83d282722ced492c51a7e997f48a.1449590675.git.geliangtang@163.com>
On 12/09/15 at 12:08am, Geliang Tang wrote:
> Use list_for_each_entry_safe() instead of list_for_each_safe() to
> simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> kernel/kexec_core.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
> index 11b64a6..f3951c7 100644
> --- a/kernel/kexec_core.c
> +++ b/kernel/kexec_core.c
> @@ -310,12 +310,9 @@ static void kimage_free_pages(struct page *page)
>
> void kimage_free_page_list(struct list_head *list)
> {
> - struct list_head *pos, *next;
> + struct page *page, *next;
>
> - list_for_each_safe(pos, next, list) {
> - struct page *page;
> -
> - page = list_entry(pos, struct page, lru);
> + list_for_each_entry_safe(page, next, list, lru) {
A small improvement, seems better. Ack it.
Please also send kexec mailing list if you have kexec related patchs so
that more people are attracted:
kexec@lists.infradead.org
Acked-by: Baoquan He <bhe@redhat.com>
Thanks
Baoquan
prev parent reply other threads:[~2015-12-11 2:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 16:08 [PATCH] kexec: use list_for_each_entry_safe in kimage_free_page_list Geliang Tang
2015-12-11 2:55 ` Baoquan He [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=20151211025543.GA2544@x1.redhat.com \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dyoung@redhat.com \
--cc=geliangtang@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@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;
as well as URLs for NNTP newsgroup(s).