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: <CACRpkdaAT4vEtthPgfd=yptpoK9GPdMx5w6VaQNe0+2WySwy1g@mail.gmail.com>
Date:	Mon, 24 Jun 2013 13:29:39 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Patrice Chotard <patrice.chotard.st@...il.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Olivier Clergeaud <olivier.clergeaud@...com>,
	Lee Jones <lee.jones@...aro.org>,
	Fabio Baltieri <fabio.baltieri@...aro.org>,
	Patrice Chotard <patrice.chotard@...com>
Subject: Re: [PATCH v2 1/4] pinctrl: abx500: suppress hardcoded value

On Thu, Jun 20, 2013 at 4:05 PM,  <patrice.chotard.st@...il.com> wrote:

> From: Patrice Chotard <patrice.chotard@...com>
>
> Replace hardcoded value by corresponding #define's.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@...com>

This is not so good. The commit message is saying it
replaces values by #defines but is actually replacing it
by an enum.

Then you're in each instance calling

abx500_gpio_set_bits(struct gpio_chip *chip, u8 reg,
                unsigned offset, int val)

The last argument is a hardware register value, but here you
case an enum abx500_gpio_direction to an integer and pass
to this function.

It would be better if the patch did what it says: create a
#define for ABX500_GPIO_INPUT and ABX500_GPIO_OUTPUT
locally in drivers/pinctrl/pinctrl-abx500.c and use it locally
instead of touching <mfd/abx500/ab8500-gpio.h>.

Thanks,
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