lkml.org 
[lkml]   [2019]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] hugetlb: Fix clang compilation warning
From
Date
Hi Mike,

On 10/16/19 4:21 PM, Mike Kravetz wrote:
> On 10/16/19 7:23 AM, Vincenzo Frascino wrote:
>> Building the kernel with a recent version of clang I noticed the warning
>> below:
>>
>> mm/hugetlb.c:4055: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:4049:16: note: array 'key' declared here
>> unsigned long key[2];
>> ^
>> mm/hugetlb.c:4055:40: note: place parentheses around the 'sizeof(u32)'
>> expression to silence this warning
>> hash = jhash2((u32 *)&key, sizeof(key)/sizeof(u32), 0);
>> ^ CC fs/ext4/ialloc.o
>>
>> Fix the warning adding parentheses around the sizeof(u32) expression.
>>
>> Cc: Mike Kravetz <mike.kravetz@oracle.com>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>
> Thanks,
>
> However, this is already addressed in Andrew's tree.
> https://ozlabs.org/~akpm/mmotm/broken-out/hugetlbfs-hugetlb_fault_mutex_hash-cleanup.patch
>

Thank you for pointing this out.

--
Regards,
Vincenzo

\
 
 \ /
  Last update: 2019-10-16 18:40    [W:0.036 / U:7.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site