From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Andrew Victor <avictor.za@gmail.com>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] atmel_serial: Fix bad BUILD_BUG_ON() usage
Date: Wed, 07 Oct 2009 15:16:36 +0200 [thread overview]
Message-ID: <4ACC94B4.1050600@atmel.com> (raw)
In-Reply-To: <1254845207-7608-1-git-send-email-haavard.skinnemoen@atmel.com>
Haavard Skinnemoen :
> is_power_of_2() appears not to be constant enough for BUILD_BUG_ON()
> after the latest rework, so replace it with an open-coded test.
>
> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/serial/atmel_serial.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
> index 3551c5c..9d948bc 100644
> --- a/drivers/serial/atmel_serial.c
> +++ b/drivers/serial/atmel_serial.c
> @@ -1531,7 +1531,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
> void *data;
> int ret;
>
> - BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE));
> + BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
>
> port = &atmel_ports[pdev->id];
> port->backup_imr = 0;
--
Nicolas Ferre
next prev parent reply other threads:[~2009-10-07 13:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 16:06 [PATCH] atmel_serial: Fix bad BUILD_BUG_ON() usage Haavard Skinnemoen
2009-10-07 13:16 ` Nicolas Ferre [this message]
2009-10-12 7:58 ` Claudio Scordino
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=4ACC94B4.1050600@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=akpm@linux-foundation.org \
--cc=avictor.za@gmail.com \
--cc=haavard.skinnemoen@atmel.com \
--cc=linux-kernel@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 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.