lkml.org 
[lkml]   [2013]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/bootmem.c: remove unused 'limit' variable
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.


\
 
 \ /
  Last update: 2013-11-21 23:21    [W:0.037 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site