Re: [PATCH] spi/pl022: Fix chipselects pointer computation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 3, 2012 at 10:14 AM, Roland Stigge <stigge@xxxxxxxxx> 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@xxxxxxxxx>

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

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

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

when applying this.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux