Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1731540
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm/memblock.c: make the index explicit argument of for_each_memblock_type |
| Date | 2017-09-13 13:20 +0200 |
| Message-ID | <updS1-6GT-1@gated-at.bofh.it> (permalink) |
| References | <upbQd-5mJ-9@gated-at.bofh.it> <updyF-6jl-9@gated-at.bofh.it> <updIm-6Dr-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mm/memblock.c: make the index explicit argument of for_each_memblock_type Gioh Kim <gi-oh.kim@profitbricks.com> - 2017-09-13 11:10 +0200
Re: [PATCH] mm/memblock.c: make the index explicit argument of for_each_memblock_type Michal Hocko <mhocko@kernel.org> - 2017-09-13 13:00 +0200
Re: [PATCH] mm/memblock.c: make the index explicit argument of for_each_memblock_type Gi-Oh Kim <gi-oh.kim@profitbricks.com> - 2017-09-13 13:10 +0200
Re: [PATCH] mm/memblock.c: make the index explicit argument of for_each_memblock_type Michal Hocko <mhocko@kernel.org> - 2017-09-13 13:20 +0200
csiph-web