linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Roland Stigge <stigge@antcom.de>, broonie@opensource.wolfsonmicro.com
Cc: shiraz.linux.kernel@gmail.com, aletes.xgr@gmail.com,
	grant.likely@secretlab.ca, rob.herring@calxeda.com,
	rob@landley.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	spi-devel-general@lists.sourceforge.net,
	gabriel.fernandez@stericsson.com, lee.jones@linaro.org,
	viresh.kumar@linaro.org, sachin.verma@st.co
Subject: Re: [PATCH] spi/pl022: Fix chipselects pointer computation
Date: Mon, 3 Sep 2012 11:11:14 +0200	[thread overview]
Message-ID: <CACRpkdZ75s-yh5vzevbUPzhGbOj+mBNfJ+i68f5tH67oS4X__A@mail.gmail.com> (raw)
In-Reply-To: <1346660069-16049-1-git-send-email-stigge@antcom.de>

On Mon, Sep 3, 2012 at 10:14 AM, Roland Stigge <stigge@antcom.de> wrote:

> The new chip select handling via GPIO introduced a pointer computation bug:
>
>         (int *) pl022 + sizeof(struct pl022)
>
> doesn't point to the data immediately after the actual struct pl022 (as was
> intended) but to a multiple of bytes after it because of the (int *) type.
>
> Replacing the kludgy pointer arithmetic with managed memory allocation for the
> chip selects.
>
> Signed-off-by: Roland Stigge <stigge@antcom.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks for fixing this! And thanks to Shiraz for spotting the problem,
Mark you could add a:

Reported-by: Shiraz Hashim <shiraz.linux.kernel@gmail.com>

when applying this.

Yours,
Linus Walleij

  reply	other threads:[~2012-09-03  9:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03  8:14 [PATCH] spi/pl022: Fix chipselects pointer computation Roland Stigge
2012-09-03  9:11 ` Linus Walleij [this message]
2012-09-05 23:44 ` Mark Brown

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=CACRpkdZ75s-yh5vzevbUPzhGbOj+mBNfJ+i68f5tH67oS4X__A@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=aletes.xgr@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gabriel.fernandez@stericsson.com \
    --cc=grant.likely@secretlab.ca \
    --cc=lee.jones@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=sachin.verma@st.co \
    --cc=shiraz.linux.kernel@gmail.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=stigge@antcom.de \
    --cc=viresh.kumar@linaro.org \
    /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).