mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: "Haavard Skinnemoen" <haavard.skinnemoen@atmel.com>,
	<u.kleine-koenig@pengutronix.de>
Cc: "Haavard Skinnemoen" <hskinnemoen@atmel.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Alan Cox" <alan@linux.intel.com>,
	<linux-arm-kernel@lists.infradead.org>,
	"Rusty Russell" <rusty@rustcorp.com.au>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serial/atmel_serial: Fix another fallout of the change to BUILD_BUG_ON
Date: Tue, 13 Oct 2009 08:40:01 +0100	[thread overview]
Message-ID: <4AD44AF10200007800019801@vpn.id2.novell.com> (raw)
In-Reply-To: <20091013092644.72c78334@hskinnemoen-d830>

>>> Haavard Skinnemoen <haavard.skinnemoen@atmel.com> 13.10.09 09:26 >>>
>Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>> Commit 8c87df457cb5 fixed BUILD_BUG_ON with the result that some
>> expressions (e.g. "not really constant" ones) result in a build failure.
>> 
>> Some of these were fixed in 8c87df457cb5, but not serial/atmel_serial.
>
>This patch fixes the same issue:
>
>http://lkml.org/lkml/2009/10/6/305 
>
>> -	BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE));
>> +	MAYBE_BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE));
>
>What's the difference between BUILD_BUG_ON() and MAYBE_BUILD_BUG_ON()?

The latter (at present) generally only serves as an annotation. It should
probably be renamed and converted to the (linking time) detecting
mechanism Rusty suggested (though I'm not sure that model would
allow all non-constant [at parsing time] uses to be detected - clearly
there would remain potential for build issues if the compiler isn't able
to reduce the expression to a constant during optimization).

Jan

  reply	other threads:[~2009-10-13  7:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13  7:08 Uwe Kleine-König
2009-10-13  7:26 ` Haavard Skinnemoen
2009-10-13  7:40   ` Jan Beulich [this message]
2009-10-19  6:08     ` Rusty Russell
2009-10-19  8:19       ` Jan Beulich
2009-10-19 14:32         ` Rusty Russell
2009-10-13  8:24   ` Uwe Kleine-König
2009-10-21 12:27     ` Russell King - ARM Linux
2009-10-21 13:56       ` Uwe Kleine-König

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=4AD44AF10200007800019801@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=hskinnemoen@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=u.kleine-koenig@pengutronix.de \
    /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

all inboxes | Powered by JetHome®