lkml.org 
[lkml]   [2013]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] slab: Remove unnecessary __builtin_constant_p()
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 ;)



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