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

2014-11-25 Thread Alexandre Courbot
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 cl

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

2014-11-25 Thread Uwe Kleine-König
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,

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

2014-11-24 Thread Alexandre Courbot
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 compiler decide to optimize h