From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Alexandre Courbot <acourbot@nvidia.com>
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 09:01:22 +0100 [thread overview]
Message-ID: <20141125080122.GY4431@pengutronix.de> (raw)
In-Reply-To: <1416900045-2304-1-git-send-email-acourbot@nvidia.com>
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
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
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
next prev parent reply other threads:[~2014-11-25 8:01 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 [this message]
2014-11-25 8:09 ` Alexandre Courbot
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=20141125080122.GY4431@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=acourbot@nvidia.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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