Skip to content

Commit 70516b9

Browse files
Qian Caitorvalds
authored andcommitted
mm/huge_memory.c: fix "orig_pud" set but not used
Commit a00cc7d ("mm, x86: add support for PUD-sized transparent hugepages") introduced pudp_huge_get_and_clear_full() but no one uses its return code. In order to not diverge from pmdp_huge_get_and_clear_full(), just change zap_huge_pud() to not assign the return value from pudp_huge_get_and_clear_full(). mm/huge_memory.c: In function 'zap_huge_pud': mm/huge_memory.c:1982:8: warning: variable 'orig_pud' set but not used [-Wunused-but-set-variable] pud_t orig_pud; ^~~~~~~~ Link: http://lkml.kernel.org/r/20190301221956.97493-1-cai@lca.pw Signed-off-by: Qian Cai <cai@lca.pw> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent cd02cf1 commit 70516b9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mm/huge_memory.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,6 @@ spinlock_t *__pud_trans_huge_lock(pud_t *pud, struct vm_area_struct *vma)
19821982
int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma,
19831983
pud_t *pud, unsigned long addr)
19841984
{
1985-
pud_t orig_pud;
19861985
spinlock_t *ptl;
19871986

19881987
ptl = __pud_trans_huge_lock(pud, vma);
@@ -1994,8 +1993,7 @@ int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma,
19941993
* pgtable_trans_huge_withdraw after finishing pudp related
19951994
* operations.
19961995
*/
1997-
orig_pud = pudp_huge_get_and_clear_full(tlb->mm, addr, pud,
1998-
tlb->fullmm);
1996+
pudp_huge_get_and_clear_full(tlb->mm, addr, pud, tlb->fullmm);
19991997
tlb_remove_pud_tlb_entry(tlb, pud, addr);
20001998
if (vma_is_dax(vma)) {
20011999
spin_unlock(ptl);

0 commit comments

Comments
 (0)