From: Stephen Rothwell Date: Wed, 22 Jun 2022 07:04:46 +0000 (+1000) Subject: hugetlb: fix an unused variable warning/error X-Git-Tag: maple_v12_fixes~32 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4f31d2ff85724ba1a4e7b385f23ca53f69589df0;p=users%2Fjedix%2Flinux-maple.git hugetlb: fix an unused variable warning/error Link: https://lkml.kernel.org/r/20220622171117.70850960@canb.auug.org.au Signed-off-by: Stephen Rothwell Cc: Mike Kravetz Signed-off-by: Andrew Morton --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index b8d2dbf5b910..128ade3ee4ae 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -6899,10 +6899,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;