From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Pekka Enberg <penberg@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Christoph Lameter <cl@linux.com>,
Behan Webster <behanw@converseincode.com>
Subject: Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()
Date: Mon, 22 Apr 2013 13:44:15 -0700 [thread overview]
Message-ID: <20130422134415.32c7f2cac07c924bff3017a4@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1304171702380.24494@chino.kir.corp.google.com>
On Wed, 17 Apr 2013 17:03:21 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:
> On Wed, 17 Apr 2013, Steven Rostedt wrote:
>
> > The slab.c code has a size check macro that checks the size of the
> > following structs:
> >
> > struct arraycache_init
> > struct kmem_list3
> >
> > The index_of() function that takes the sizeof() of the above two structs
> > and does an unnecessary __builtin_constant_p() on that. As sizeof() will
> > always end up being a constant making this always be true. The code is
> > not incorrect, but it just adds added complexity, and confuses users and
> > wastes the time of reviewers of the code, who spends time trying to
> > figure out why the builtin_constant_p() was used.
> >
> > This patch is just a clean up that makes the index_of() code a little
> > bit less complex.
> >
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> Adding Pekka to the cc.
I ducked this patch because it seemed rather pointless - but a little
birdie told me that there is a secret motivation which seems pretty
reasonable to me. So I shall await chirp-the-second, which hopefully
will have a fuller and franker changelog ;)
--
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>
next prev parent reply other threads:[~2013-04-22 20:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 19:09 Steven Rostedt
2013-04-18 0:03 ` David Rientjes
2013-04-22 20:44 ` Andrew Morton [this message]
2013-04-22 20:58 ` Steven Rostedt
2013-04-22 21:16 ` Andrew Morton
2013-04-22 23:15 ` Steven Rostedt
2013-04-24 7:31 ` Pekka Enberg
2013-04-23 5:06 ` Behan Webster
2013-04-18 0:15 ` Will Huck
2013-04-18 0:32 ` David Rientjes
2013-04-18 10:24 ` Borislav Petkov
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=20130422134415.32c7f2cac07c924bff3017a4@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=behanw@converseincode.com \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox