public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: akpm@linux-foundation.org
Cc: JBeulich@novell.com, linux-kernel@vger.kernel.org,
	sparclinux@vger.kernel.org
Subject: Re: [PATCH] fix BUILD_BUG_ON() and a couple of bogus uses of it
Date: Thu, 17 Sep 2009 17:45:30 -0700 (PDT)	[thread overview]
Message-ID: <20090917.174530.262030717.davem@davemloft.net> (raw)
In-Reply-To: <20090917.173154.100425957.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Thu, 17 Sep 2009 17:31:54 -0700 (PDT)

> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Thu, 17 Sep 2009 17:15:04 -0700
> 
>> There's a shortcoming in the current BUILD_BUG_ON() - it silently does
>> nothing if passed a non-constant arg.
>> 
>> I suspect that in the 2.6.31 code, that BUILD_BUG_ON() just does
>> nothing at all, and that Jan's patch is now exposing this.  It might be
>> compiler-version dependent too.
>> 
>> 
>> <tests it>
>> 
>> Yup, on base 2.6.31, this:
> 
> Ok, I'll have to either change this function to a macro or
> get rid of the check.

I can't even get GCC to see the constant evaluated by is_power_of_2().

I give up, I'll just remove the BUILD_BUG_ON() entirely.

  reply	other threads:[~2009-09-18  0:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 15:59 [PATCH] fix BUILD_BUG_ON() and a couple of bogus uses of it Jan Beulich
2009-09-17 23:24 ` Andrew Morton
2009-09-18  0:01   ` David Miller
2009-09-18  0:15     ` Andrew Morton
2009-09-18  0:18       ` Andrew Morton
2009-09-18  0:31       ` David Miller
2009-09-18  0:45         ` David Miller [this message]
2009-09-22  6:45 ` Rusty Russell
2009-09-23  0:57 ` Rusty Russell

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=20090917.174530.262030717.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=JBeulich@novell.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.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