Re: [PATCH] gpio: remove const modifier from gpiod_get_direction()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux