From: Andrew Morton <akpm@linux-foundation.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Joel Savitz <jsavitz@redhat.com>,
linux-kernel@vger.kernel.org, Vlastimil Babka <vbabka@suse.cz>,
John Hubbard <jhubbard@nvidia.com>,
Rafael Aquini <aquini@redhat.com>,
"Fabrizio D'Angelo" <fdangelo@redhat.com>,
linux-mm@kvack.org
Subject: Re: [PATCH v2] mm/page_alloc: fix documentation error and remove magic numbers
Date: Wed, 24 Jun 2020 11:56:35 -0700 [thread overview]
Message-ID: <20200624115635.852cb4563ad52844685e5c61@linux-foundation.org> (raw)
In-Reply-To: <20200624170131.GQ21350@casper.infradead.org>
On Wed, 24 Jun 2020 18:01:31 +0100 Matthew Wilcox <willy@infradead.org> wrote:
> On Wed, Jun 24, 2020 at 12:49:43PM -0400, Joel Savitz wrote:
> > When I increased the upper bound of the min_free_kbytes value in
> > ee8eb9a5fe863, I forgot to tweak the above comment to reflect
> > the new value. This patch fixes that mistake.
> >
> > In addition, this patch replaces the magic number bounds with symbolic
> > constants to clarify the logic.
> >
> > changes from v1:
> > - declare constants via enum instead of separate integers
> >
> > Suggested-by: John Hubbard <jhubbard@nvidia.com>
> > Suggested-by: Vlastimil Babka <vbabka@suse.cz>
> > Signed-off-by: Joel Savitz <jsavitz@redhat.com>
>
> NAK. Just fix the documentation. It's bad form to combine two completely
> different things in one patch anyway.
I don't think the enums add value anyway - if these numbers are only
used in a single place, it's clearer to just open-code them.
One advantage of using a #define/enum for single-use constants is that
the #define/enum site provides a neat location for documenting
(commenting) the reasoning behind the particular values which were
chosen. But this patch didn't do that.
prev parent reply other threads:[~2020-06-24 18:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 16:49 Joel Savitz
2020-06-24 17:01 ` Matthew Wilcox
2020-06-24 18:56 ` Andrew Morton [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=20200624115635.852cb4563ad52844685e5c61@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=fdangelo@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=jsavitz@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.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