mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hugetlb: Fix clang compilation warning
Date: Wed, 16 Oct 2019 08:21:40 -0700	[thread overview]
Message-ID: <29fdadee-2e0c-0886-73b3-358f983fd1fd@oracle.com> (raw)
In-Reply-To: <20191016142324.52250-1-vincenzo.frascino@arm.com>

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

-- 
Mike Kravetz

  reply	other threads:[~2019-10-16 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 14:23 Vincenzo Frascino
2019-10-16 15:21 ` Mike Kravetz [this message]
2019-10-16 16:41   ` Vincenzo Frascino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29fdadee-2e0c-0886-73b3-358f983fd1fd@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vincenzo.frascino@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®