From: Matthew Wilcox <willy@infradead.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: [PATCH v1] mm/dmapool.c: Replace open-coded list_first_entry()
Date: Wed, 12 Aug 2020 19:41:41 +0100 [thread overview]
Message-ID: <20200812184141.GC17456@casper.infradead.org> (raw)
In-Reply-To: <20200812153059.51089-1-andriy.shevchenko@linux.intel.com>
On Wed, Aug 12, 2020 at 06:30:59PM +0300, Andy Shevchenko wrote:
> while (!list_empty(&pool->page_list)) {
> struct dma_page *page;
> - page = list_entry(pool->page_list.next,
> - struct dma_page, page_list);
> +
> + page = list_first_entry(&pool->page_list, struct dma_page, page_list);
Eh, I'd rather see this as:
struct dma_page *page = list_first_entry(&pool->page_list,
struct dma_page, page_list);
next prev parent reply other threads:[~2020-08-12 18:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 15:30 [PATCH v1] mm/dmapool.c: Replace open-coded list_first_entry() Andy Shevchenko
2020-08-12 18:41 ` Matthew Wilcox [this message]
2020-08-13 11:09 ` Andy Shevchenko
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=20200812184141.GC17456@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).