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]
Date:	Sun, 3 Apr 2011 09:28:37 +0530
From:	Rabin Vincent <rabin@....in>
To:	Nicolas Kaiser <nikai@...ai.net>
Cc:	Alessandro Rubini <rubini@...pv.it>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	STEricsson <STEricsson_nomadik_linux@...t.st.com>,
	Russell King <linux@....linux.org.uk>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm: nomadik: avoid assigning u32 to bool

On Sat, Apr 2, 2011 at 03:21, Nicolas Kaiser <nikai@...ai.net> wrote:
> Avoid assigning u32 to the bool 'enabled'.
>
> Signed-off-by: Nicolas Kaiser <nikai@...ai.net>
> ---
>  arch/arm/plat-nomadik/gpio.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
> index f49748e..8b722f7 100644
> --- a/arch/arm/plat-nomadik/gpio.c
> +++ b/arch/arm/plat-nomadik/gpio.c
> @@ -636,7 +636,7 @@ static int nmk_gpio_irq_set_type(struct irq_data *d, unsigned int type)
>        if (type & IRQ_TYPE_LEVEL_LOW)
>                return -EINVAL;
>
> -       enabled = nmk_chip->enabled & bitmask;
> +       enabled = !!(nmk_chip->enabled & bitmask);

Why?  There are dozens of places in the kernel where this done, the code
generated should be the same, and it's pretty obvious what is being done
as it is.
--
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