linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harini Katakam <harinikatakamlinux@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Harini Katakam <harini.katakam@xilinx.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Ezra Savard <ezra.savard@xilinx.com>,
	Michal Simek <michal.simek@xilinx.com>,
	Alexandre Courbot <acourbot@nvidia.com>
Subject: Re: [PATCH 5/5] gpio: zynq: use container_of() to get state container
Date: Fri, 28 Aug 2015 11:12:34 +0530	[thread overview]
Message-ID: <CAFcVECJVt2rVLXPRoCtpZjaDuZaw1ZPqKHYVdBQN6wWrxn2adA@mail.gmail.com> (raw)
In-Reply-To: <1440687417-17227-1-git-send-email-linus.walleij@linaro.org>

On Thu, Aug 27, 2015 at 8:26 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> The state container of the Zynq GPIO driver is sometimes
> extracted from the gpio_chip exploiting the fact that offsetof()
> the struct gpio_chip inside the struct zynq_gpio is 0, so
> the container_of() is in practice a noop. However if a member
> is added to struct zynq_gpio 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.
>
> Cc: Harini Katakam <harini.katakam@xilinx.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Ezra Savard <ezra.savard@xilinx.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Harini Katakam <harinik@xilinx.com>

Thanks!

Regards,
Harini

      reply	other threads:[~2015-08-28  5:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 14:56 [PATCH 5/5] gpio: zynq: use container_of() to get state container Linus Walleij
2015-08-28  5:42 ` Harini Katakam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFcVECJVt2rVLXPRoCtpZjaDuZaw1ZPqKHYVdBQN6wWrxn2adA@mail.gmail.com \
    --to=harinikatakamlinux@gmail.com \
    --cc=acourbot@nvidia.com \
    --cc=ezra.savard@xilinx.com \
    --cc=harini.katakam@xilinx.com \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).