Re: please pick 552546366a30 to 5.4.y

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

 



On Wed, Mar 24, 2021 at 10:06 AM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Mar 24, 2021 at 09:47:49AM -0700, Nick Desaulniers wrote:
> > Dear stable kernel maintainers,
> > Please consider cherry-picking
> > commit 552546366a30 ("hugetlbfs: hugetlb_fault_mutex_hash() cleanup")
> > to linux-5.4.y.  It first landed in v5.5-rc1 and fixes an instance of
> > the warning -Wsizeof-array-div.
>
> What shows that warning?  I don't see it here with my gcc builds :)

$ make LLVM=1 -j72 defconfig
$ ./scripts/config -e CONFIG_HUGETLBFS
$ make LLVM=1 -j72 mm/hugetlb.o
...
  CC      mm/hugetlb.o
mm/hugetlb.c:4159:40: warning: expression does not compute the number
of elements in this array; element type is 'unsigned long', not 'u32'
(aka 'unsigned int') [-Wsizeof-array-div]
        hash = jhash2((u32 *)&key, sizeof(key)/sizeof(u32), 0);
                                          ~~~ ^
mm/hugetlb.c:4153:16: note: array 'key' declared here
        unsigned long key[2];
                      ^
mm/hugetlb.c:4159:40: note: place parentheses around the 'sizeof(u32)'
expression to silence this warning
        hash = jhash2((u32 *)&key, sizeof(key)/sizeof(u32), 0);
                                              ^
-- 
Thanks,
~Nick Desaulniers



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux