From: Luiz Capitulino <lcapitulino@redhat.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] mm/bootmem.c: remove unused 'limit' variable
Date: Thu, 21 Nov 2013 20:37:07 -0500 [thread overview]
Message-ID: <20131121203707.4f59f86e@redhat.com> (raw)
In-Reply-To: <528E83B6.5040107@intel.com>
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 :)
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] mm/bootmem.c: remove unused 'limit' variable
Date: Thu, 21 Nov 2013 20:37:07 -0500 [thread overview]
Message-ID: <20131121203707.4f59f86e@redhat.com> (raw)
In-Reply-To: <528E83B6.5040107@intel.com>
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 :)
next prev parent reply other threads:[~2013-11-22 1:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 21:43 [PATCH] mm/bootmem.c: remove unused 'limit' variable Luiz Capitulino
2013-11-21 21:43 ` Luiz Capitulino
2013-11-21 22:05 ` Dave Hansen
2013-11-21 22:05 ` Dave Hansen
2013-11-22 1:37 ` Luiz Capitulino [this message]
2013-11-22 1:37 ` Luiz Capitulino
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=20131121203707.4f59f86e@redhat.com \
--to=lcapitulino@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.