Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot@nvidia.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	gnurou@gmail.com
Subject: Re: [PATCH] gpio: remove const modifier from gpiod_get_direction()
Date: Tue, 25 Nov 2014 17:09:03 +0900	[thread overview]
Message-ID: <5474391F.6030908@nvidia.com> (raw)
In-Reply-To: <20141125080122.GY4431@pengutronix.de>

On 11/25/2014 05:01 PM, Uwe Kleine-König wrote:
> Hello Alexandre,
>
> just some minor nitpicking on the commit log:
>
> On Tue, Nov 25, 2014 at 04:20:45PM +0900, Alexandre Courbot wrote:
>> Although gpiod_get_direction() can be considered side-effect free for
>> consumers, its internals involve setting or clearing bits in the
>> affected GPIO descriptor, for which we need to force-cast the const
>> descriptor parameter. This could lead to incorrect behavior is the
> s/ is/ if/, and I think s/parameter/variable to non-const/
>
>> compiler decide to optimize here, so remove this const parameter. The
> s/decide/decides/; s/parameter/attribute/
>
>> intent is to make gpiod_get_direction() private anyway, so it does not
>> really matter.
>>
>> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks ; I should have proof-read myself...

Sending a v2 with a fixed log and your Ack so Linus can just pick the 
patch as-is.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-11-25  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  7:20 [PATCH] gpio: remove const modifier from gpiod_get_direction() Alexandre Courbot
2014-11-25  8:01 ` Uwe Kleine-König
2014-11-25  8:09   ` Alexandre Courbot [this message]
2014-11-25  8:16     ` [PATCH v2] " Alexandre Courbot
2014-11-28 13:44       ` Linus Walleij

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=5474391F.6030908@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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