From: Dave Hansen <dave.hansen@intel.com>
To: Luiz Capitulino <lcapitulino@redhat.com>, linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mm/bootmem.c: remove unused 'limit' variable
Date: Thu, 21 Nov 2013 14:05:42 -0800 [thread overview]
Message-ID: <528E83B6.5040107@intel.com> (raw)
In-Reply-To: <20131121164335.066fd6aa@redhat.com>
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.
--
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: Dave Hansen <dave.hansen@intel.com>
To: Luiz Capitulino <lcapitulino@redhat.com>, linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mm/bootmem.c: remove unused 'limit' variable
Date: Thu, 21 Nov 2013 14:05:42 -0800 [thread overview]
Message-ID: <528E83B6.5040107@intel.com> (raw)
In-Reply-To: <20131121164335.066fd6aa@redhat.com>
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.
next prev parent reply other threads:[~2013-11-21 22:06 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 [this message]
2013-11-21 22:05 ` Dave Hansen
2013-11-22 1:37 ` Luiz Capitulino
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=528E83B6.5040107@intel.com \
--to=dave.hansen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=lcapitulino@redhat.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.