From: Matthew Wilcox <willy@infradead.org>
To: qiwuchen55@gmail.com
Cc: akpm@linux-foundation.org, vbabka@suse.cz,
pankaj.gupta.linux@gmail.com, alexander.duyck@gmail.com,
bhe@redhat.com, linux-mm@kvack.org,
chenqiwu <chenqiwu@xiaomi.com>
Subject: Re: [PATCH v3] mm/page_alloc: simplify page_is_buddy() for better code readability
Date: Tue, 10 Mar 2020 05:48:17 -0700 [thread overview]
Message-ID: <20200310124817.GA22433@bombadil.infradead.org> (raw)
In-Reply-To: <1583831729-14383-1-git-send-email-qiwuchen55@gmail.com>
On Tue, Mar 10, 2020 at 05:15:29PM +0800, qiwuchen55@gmail.com wrote:
> Simplify page_is_buddy() to reduce the redundant code for better code
> readability.
If you're making these larger changes, then ...
> @@ -794,29 +794,23 @@ static inline void set_page_order(struct page *page, unsigned int order)
> static inline int page_is_buddy(struct page *page, struct page *buddy,
> unsigned int order)
Ideally this should return 'bool'.
> + /*
> + * zone check is done late to avoid uselessly
> + * calculating zone/node ids for pages that could
> + * never merge.
> + */
This comment could be reflowed onto fewer lines.
prev parent reply other threads:[~2020-03-10 12:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 9:15 [PATCH v3] mm/page_alloc: simplify page_is_buddy() for better code readability qiwuchen55
2020-03-10 9:36 ` Vlastimil Babka
2020-03-10 12:48 ` Matthew Wilcox [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=20200310124817.GA22433@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.duyck@gmail.com \
--cc=bhe@redhat.com \
--cc=chenqiwu@xiaomi.com \
--cc=linux-mm@kvack.org \
--cc=pankaj.gupta.linux@gmail.com \
--cc=qiwuchen55@gmail.com \
--cc=vbabka@suse.cz \
/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).