On Thu, Aug 27, 2015 at 04:54:18PM +0200, Linus Walleij wrote:
> The state container of the etraxfs GPIO driver is extracted from
> the gpio_chip exploiting the fact that offsetof() the
> struct gpio_chip inside the struct bgpio_chip are both 0, so
> the container_of() is in practice a noop. However if a member
> is added to struct etraxfs_gpio_chip in front of
> struct bgpio_chip, things will break. Using proper container_of()
> avoids this problem.
> 
> Semantically this is a noop, the compiler will optimize it away,
> but syntactically it makes me happier.
> 
> Cc: Rabin Vincent <ra...@rab.in>
> Signed-off-by: Linus Walleij <linus.wall...@linaro.org>

Acked-by: Rabin Vincent <ra...@rab.in>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to