lkml.org 
[lkml]   [2023]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: arch/arm/kernel/hibernate.c:29:40: warning: array subscript -1 is outside array bounds of 'const void[2147483647]'
Hi Robot,

On Wed, Oct 18, 2023 at 2:17 PM kernel test robot <lkp@intel.com> wrote:

> arch/arm/kernel/hibernate.c: In function 'pfn_is_nosave':
> >> arch/arm/kernel/hibernate.c:29:40: warning: array subscript -1 is outside array bounds of 'const void[2147483647]' [-Warray-bounds=]
> 29 | unsigned long nosave_end_pfn = virt_to_pfn(&__nosave_end - 1);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So the concern is that &__nosave_end could be 0 and the -1 would make
it wrap around?

It still has nothing to do with arrays, I don't get it.

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2023-11-20 13:50    [W:0.072 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site