lkml.org 
[lkml]   [2022]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: linux-next: build warning after merge of the mm tree
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;
--
2.35.1
--
Cheers,
Stephen Rothwell
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-06-22 09:12    [W:0.047 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site