]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
hugetlb: fix an unused variable warning/error
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 22 Jun 2022 07:04:46 +0000 (17:04 +1000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:11 +0000 (20:15 -0400)
Link: https://lkml.kernel.org/r/20220622171117.70850960@canb.auug.org.au
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c

index b8d2dbf5b9109028513d387dcbad6482730aa56b..128ade3ee4ae813d4c43a1422aa249e3f1b15fe2 100644 (file)
@@ -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;