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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 30 Sep 2012 10:28:55 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Neil Zhang <zhangwm@...vell.com>
Cc:	grant.likely@...retlab.ca, haojian.zhuang@...il.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] GPIO: gpio-pxa: fix bug when get gpio value

On Tue, Sep 25, 2012 at 2:03 PM, Neil Zhang <zhangwm@...vell.com> wrote:

> We need to return 0 or 1 when get gpio value.

OK...

>  static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
>  {
> -       return readl_relaxed(gpio_chip_base(chip) + GPLR_OFFSET) & (1 << offset);
> +       u32 gplr = __raw_readl(gpio_chip_base(chip) + GPLR_OFFSET);
> +       u32 mask = 1 << offset;
> +
> +       return (gplr & mask) != 0;

So why are you switching the perfectly working readl_relaxed() call to
a __raw_readl()?

Please don't do this, and respin the patch.

Yours,
Linus Walleij
--
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