Messages in this thread | | | Date | Thu, 21 Nov 2013 20:37:07 -0500 | From | Luiz Capitulino <> | Subject | Re: [PATCH] mm/bootmem.c: remove unused 'limit' variable |
| |
On Thu, 21 Nov 2013 14:05:42 -0800 Dave Hansen <dave.hansen@intel.com> wrote:
> On 11/21/2013 01:43 PM, Luiz Capitulino wrote: > > @@ -655,9 +655,7 @@ restart: > > void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align, > > unsigned long goal) > > { > > - unsigned long limit = 0; > > - > > - return ___alloc_bootmem_nopanic(size, align, goal, limit); > > + return ___alloc_bootmem_nopanic(size, align, goal, 0); > > } > > FWIW, I like those. The way you leave it: > > return ___alloc_bootmem_nopanic(size, align, goal, 0); > > the 0 is a magic number that you have to go look up the declaration of > ___alloc_bootmem_nopanic() to decipher, or you have to add a comment to > it in some way. > > I find it much more readable to have an 'unused' variable like that.
Got it. I was reading that code and thought 'limit' was a leftover, so I posted the patch...
Btw, I also have a patch consitfying some zone access functions parameters that are read-only. Wondering if anyone will object to such a change? Or maybe I should just stop doing trivial patches :)
| |