linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@st.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Patrice Chotard <patrice.chotard.st@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Olivier CLERGEAUD <olivier.clergeaud@st.com>,
	Lee Jones <lee.jones@linaro.org>,
	Fabio Baltieri <fabio.baltieri@linaro.org>
Subject: Re: [PATCH v2 1/4] pinctrl: abx500: suppress hardcoded value
Date: Mon, 24 Jun 2013 14:13:59 +0200	[thread overview]
Message-ID: <51C83807.8060705@st.com> (raw)
In-Reply-To: <CACRpkdaAT4vEtthPgfd=yptpoK9GPdMx5w6VaQNe0+2WySwy1g@mail.gmail.com>

On 06/24/2013 01:29 PM, Linus Walleij wrote:

> On Thu, Jun 20, 2013 at 4:05 PM,  <patrice.chotard.st@gmail.com> wrote:
> 
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> Replace hardcoded value by corresponding #define's.
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@st.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>.


Ok, i'll resubmit this

> 
> Thanks,
> Linus Walleij


  reply	other threads:[~2013-06-24 12:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 14:05 [PATCH v2 0/4] pinctrl: ABX500: fix patrice.chotard.st
2013-06-20 14:05 ` [PATCH v2 1/4] pinctrl: abx500: suppress hardcoded value patrice.chotard.st
2013-06-24 11:29   ` Linus Walleij
2013-06-24 12:13     ` Patrice CHOTARD [this message]
2013-06-20 14:05 ` [PATCH v2 2/4] pinctrl: abx500: fix abx500_gpio_get() patrice.chotard.st
2013-06-24 11:32   ` Linus Walleij
2013-06-20 14:05 ` [PATCH v2 3/4] pinctrl: abx500: factorize code patrice.chotard.st
2013-06-24 11:34   ` Linus Walleij
2013-06-20 14:05 ` [PATCH v2 4/4] pinctrl: abx500: rework error path patrice.chotard.st
2013-06-24 11:37   ` Linus Walleij
2013-06-24 12:23     ` Patrice CHOTARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C83807.8060705@st.com \
    --to=patrice.chotard@st.com \
    --cc=fabio.baltieri@linaro.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olivier.clergeaud@st.com \
    --cc=patrice.chotard.st@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).