[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZ9Hzkzk6SfLcrJTiNv5pYAjDZD3X=BSYU1BMiC-RLvHg@mail.gmail.com>
Date: Fri, 28 Nov 2014 14:44:42 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Alexandre Courbot <acourbot@...dia.com>
Cc: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Alexandre Courbot <gnurou@...il.com>
Subject: Re: [PATCH v2] gpio: remove const modifier from gpiod_get_direction()
On Tue, Nov 25, 2014 at 9:16 AM, Alexandre Courbot <acourbot@...dia.com> 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 variable to non-const. This could lead to incorrect behavior
> if the compiler decides to optimize here, so remove this const
> attribute. The intent is to make gpiod_get_direction() private anyway,
> so it does not really matter.
>
> Reported-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> ---
> Changes since v1:
> - Fixed poor grammar in commit log
> - Added Uwe's Ack
Patch applied after crying blood of the quoted-printable encoding
of this mail.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists