linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the mm tree
Date: Wed, 22 Jun 2022 09:39:46 -0700	[thread overview]
Message-ID: <YrNF0i01rU/r3yQn@monkey> (raw)
In-Reply-To: <20220622171117.70850960@canb.auug.org.au>

On 06/22/22 17:11, Stephen Rothwell wrote:
> Hi all,
> 
> On Wed, 22 Jun 2022 15:54:08 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > After merging the mm tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > mm/hugetlb.c: In function 'hugetlb_mask_last_page':
> > mm/hugetlb.c:6908:23: warning: unused variable 'hp_size' [-Wunused-variable]
> >  6908 |         unsigned long hp_size = huge_page_size(h);
> >       |                       ^~~~~~~
> > 
> > Introduced by commit
> > 
> >   76005bedbc32 ("hugetlb: do not update address in huge_pmd_unshare")
> 
> This became a build failure in my powerpc allyesconfig build, so I
> applied this patch:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 22 Jun 2022 17:04:46 +1000
> Subject: [PATCH] hugetlb: fix an unused variable warning/error
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/hugetlb.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 2e4a92cebd9c..f338640fbe4a 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -6905,10 +6905,8 @@ unsigned long hugetlb_mask_last_page(struct hstate *h)
>  /* See description above.  Architectures can provide their own version. */
>  __weak unsigned long hugetlb_mask_last_page(struct hstate *h)
>  {
> -	unsigned long hp_size = huge_page_size(h);
> -
>  #ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
> -	if (hp_size == PMD_SIZE)
> +	if (huge_page_size(h) == PMD_SIZE)
>  		return PUD_SIZE - PMD_SIZE;
>  #endif
>  	return 0UL;
> -- 

Thanks Stephen,  my bad for not building !CONFIG_ARCH_WANT_HUGE_PMD_SHARE and,
the error is pretty obvious. :(

Andrew, do you want me to send an updated version of the patch?  Or,
would you prefer to include Stephen's fix?
-- 
Mike Kravetz

  reply	other threads:[~2022-06-22 16:40 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  5:54 linux-next: build warning after merge of the mm tree Stephen Rothwell
2022-06-22  7:11 ` Stephen Rothwell
2022-06-22 16:39   ` Mike Kravetz [this message]
2022-06-22 18:49     ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2024-05-07  6:26 Stephen Rothwell
2024-04-17  5:18 Stephen Rothwell
2024-04-17 15:57 ` Matthew Wilcox
2024-04-15  5:20 Stephen Rothwell
2024-04-15  5:45 ` Barry Song
2024-03-27 22:13 Stephen Rothwell
2024-03-28  1:59 ` Baoquan He
2024-03-28  4:29   ` Stephen Rothwell
2024-03-25  1:25 Stephen Rothwell
2024-03-26  2:21 ` Suren Baghdasaryan
2024-03-25  1:22 Stephen Rothwell
2024-03-25  8:56 ` David Hildenbrand
2024-03-13  4:07 Stephen Rothwell
2024-03-13  9:00 ` Uwe Kleine-König
2024-03-13 15:22   ` Masahiro Yamada
2024-03-13 21:11     ` Uwe Kleine-König
2024-01-02  5:40 Stephen Rothwell
2024-01-02 12:54 ` Kirill A. Shutemov
2023-12-04  4:54 Stephen Rothwell
2023-12-04 17:03 ` SeongJae Park
2023-11-28  2:33 Stephen Rothwell
2023-10-04  4:46 Stephen Rothwell
2023-09-25 23:27 Stephen Rothwell
2023-09-18  3:18 Stephen Rothwell
2023-09-12  5:20 Stephen Rothwell
2023-06-05  3:10 Stephen Rothwell
2023-06-05 14:57 ` Liam R. Howlett
2023-05-15 23:25 Stephen Rothwell
2023-05-08  1:19 Stephen Rothwell
2023-05-08 21:36 ` Nhat Pham
2023-03-20  3:47 Stephen Rothwell
2023-03-23  2:58 ` Stephen Rothwell
2023-03-23 19:38   ` Andrew Morton
2023-03-16  1:12 Stephen Rothwell
2023-03-01  0:36 Stephen Rothwell
2023-03-01  0:47 ` Suren Baghdasaryan
2023-03-01  2:29   ` Suren Baghdasaryan
2023-03-01  5:45     ` Stephen Rothwell
2023-01-17  3:51 Stephen Rothwell
2022-12-17 19:22 Stephen Rothwell
2022-11-10  7:36 Stephen Rothwell
2022-11-10  7:33 Stephen Rothwell
2022-11-10 16:27 ` Linus Torvalds
2022-11-10 20:20   ` Randy Dunlap
2022-11-10 20:43     ` Jonathan Corbet
2022-10-26  0:57 Stephen Rothwell
2022-10-26  1:13 ` Sergey Senozhatsky
2022-09-19  9:09 Stephen Rothwell
2022-09-19  9:30 ` Miaohe Lin
2022-07-21  9:55 Stephen Rothwell
2022-07-21 11:11 ` Zach O'Keefe
2022-07-18 10:28 Stephen Rothwell
2022-07-18 22:54 ` Andrew Morton
2022-05-25  5:54 Stephen Rothwell
2022-05-25 10:57 ` Zi Yan
2022-05-25 17:36   ` Andrew Morton
2022-05-12  9:46 Stephen Rothwell
2022-05-12 12:23 ` Johannes Weiner
2022-05-05 21:35 Stephen Rothwell
2022-05-05 21:38 ` Stephen Rothwell
2022-05-05 22:18 ` Matthew Wilcox
2022-04-28  7:44 Stephen Rothwell

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=YrNF0i01rU/r3yQn@monkey \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).