From: Michal Hocko <mhocko@kernel.org>
To: Gi-Oh Kim <gi-oh.kim@profitbricks.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org
Subject: Re: [PATCH] mm/memblock.c: make the index explicit argument of for_each_memblock_type
Date: Wed, 13 Sep 2017 13:18:43 +0200 [thread overview]
Message-ID: <20170913111843.2kt344k7pmcmm2ed@dhcp22.suse.cz> (raw)
In-Reply-To: <CAJX1Ytb+vFc3p3j8v9_jtMXT3UNVawQAMi4KeQ0FFHDJ7BP4WA@mail.gmail.com>
On Wed 13-09-17 13:05:02, Gi-Oh Kim wrote:
> On Wed, Sep 13, 2017 at 12:55 PM, Michal Hocko <mhocko@kernel.org> wrote:
> > On Wed 13-09-17 11:06:06, Gioh Kim wrote:
> >> for_each_memblock_type macro function uses idx variable that is
> >> the local variable of caller. This patch makes for_each_memblock_type
> >> use only its own arguments.
> >
> > strictly speaking this changelog doesn't explain _why_ the original code
> > is wrong/suboptimal and why you are changing that. I would use the
> > folloging
> >
> > "
> > for_each_memblock_type macro function relies on idx variable defined in
> > the caller context. Silent macro arguments are almost always wrong thing
> > to do. They make code harder to read and easier to get wrong. Let's
> > use an explicit iterator parameter for for_each_memblock_type and make
> > the code more obious. This patch is a mere cleanup and it shouldn't
> > introduce any functional change.
> > "
>
> Absolutely this changelog is better.
> Should I send the patch with your changelog again?
> Or could you just replace my changelog with yours?
Please repost and make sure to CC Andrew Morton so that he can take the
patch.
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2017-09-13 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 9:06 Gioh Kim
2017-09-13 10:55 ` Michal Hocko
2017-09-13 11:05 ` Gi-Oh Kim
2017-09-13 11:18 ` Michal Hocko [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=20170913111843.2kt344k7pmcmm2ed@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=gi-oh.kim@profitbricks.com \
--cc=linux-kernel@vger.kernel.org \
--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