[Skiboot] [PATCH] npu2-opencapi: Fix integer promotion bug in LPC allocation

Oliver O'Halloran oohall at gmail.com
Fri Nov 8 16:07:37 AEDT 2019

On Thu, Sep 26, 2019 at 10:57 PM Andrew Donnellan <ajd at linux.ibm.com> wrote:
> If you try to allocate an amount of LPC memory that's not a power of 2,
> we round the value up to the nearest power of 2.
> By the magic of C, "1 << n" gets treated as an int, even if you're
> assigning it to a uint64_t.
> Change 1 to 1ULL to fix this.
> (C, it's great.)
> Reported-by: Alastair D'Silva <alistair at d-silva.org>
> Cc: skiboot-stable at lists.ozlabs.org
> Signed-off-by: Andrew Donnellan <ajd at linux.ibm.com>

Merged as of e85e2e2b8b0a4dd96e10343df19df1a161cd6aac

More information about the Skiboot mailing list