On 2015-08-27 07:55, Linus Walleij wrote:
> The state container of the vf610 GPIO driver is sometimes
> extracted from the gpio_chip exploiting the fact that offsetof()
> the struct gpio_chip inside the struct vf610_gpio_port is 0, so
> the container_of() is in practice a noop. However if a member
> is added to struct vf610_gpio_port in front of struct gpio_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.
> 
> Also replace some explicit container_of() calls with the helper
> function.

Acked-by: Stefan Agner <ste...@agner.ch>

--
Stefan
--
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