Re: [PATCH] mm/memblock.c: make the index explicit argument of for_each_memblock_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 13-09-17 13:05:02, Gi-Oh Kim wrote:
> On Wed, Sep 13, 2017 at 12:55 PM, Michal Hocko <mhocko@xxxxxxxxxx> 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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux