]> Git Repo - linux.git/commitdiff
atmel_serial: fix bad BUILD_BUG_ON() usage
authorHaavard Skinnemoen <[email protected]>
Mon, 26 Oct 2009 23:50:02 +0000 (16:50 -0700)
committerLinus Torvalds <[email protected]>
Thu, 29 Oct 2009 14:39:30 +0000 (07:39 -0700)
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 <[email protected]>
Cc: Uwe Kleine-König <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Cc: Claudio Scordino <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/serial/atmel_serial.c

index 3551c5cb70940cb9c4733ce645ce81ba1d9f2e3f..9d948bccafafa50bd13534ff330b6535cde29996 100644 (file)
@@ -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;
This page took 0.046914 seconds and 4 git commands to generate.