Re: linux-next: build warning after merge of the mm tree

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

 



Hi all,

On Wed, 22 Jun 2022 15:54:08 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx>
Date: Wed, 22 Jun 2022 17:04:46 +1000
Subject: [PATCH] hugetlb: fix an unused variable warning/error

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 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

Attachment: pgpgrFbeNOREo.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux