Messages in this thread | | | From | Linus Walleij <> | Date | Mon, 6 Nov 2023 14:16:42 +0100 | 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@intel.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
| |