lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ACC94B4.1050600@atmel.com>
Date:	Wed, 07 Oct 2009 15:16:36 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	Haavard Skinnemoen <haavard.skinnemoen@...el.com>
CC:	Andrew Victor <avictor.za@...il.com>, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] atmel_serial: Fix bad BUILD_BUG_ON() usage

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@...el.com>
Acked-by: Nicolas Ferre <nicolas.ferre@...el.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ