[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZ-1OcZ-cz0V218-VxAc07DMPvKWee3MHngs6Hrwv4zPA@mail.gmail.com>
Date: Mon, 6 Nov 2023 14:16:42 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: kernel test robot <lkp@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: arch/arm/include/asm/memory.h:298:23: warning: array subscript -1
is outside array bounds of 'const void[2147483647]'
Hi Robot,
On Thu, Oct 19, 2023 at 2:22 AM kernel test robot <lkp@...el.com> wrote:
> In function 'virt_to_pfn',
> inlined from 'pfn_is_nosave' at arch/arm/kernel/hibernate.c:29:33:
> >> arch/arm/include/asm/memory.h:298:23: warning: array subscript -1 is outside array bounds of 'const void[2147483647]' [-Warray-bounds=]
> 298 | unsigned long kaddr = (unsigned long)p;
What does this even mean?
> 296 static inline unsigned long virt_to_pfn(const void *p)
> 297 {
> > 298 unsigned long kaddr = (unsigned long)p;
> 299 return (((kaddr - PAGE_OFFSET) >> PAGE_SHIFT) +
> 300 PHYS_PFN_OFFSET);
> 301 }
Array out of bounds? It's not even an array! What's up with this warning?
Yours,
Linus Walleij
Powered by blists - more mailing lists