Skip to contentSkip to conversation

mm: remove redundant pte variable

PATCH Applied [email protected] 1 participant 1 message Nov 28, 2022 MM core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: remove redundant pte variable

From: zhang songyi <[email protected]>

Return value from ptep_get_and_clear_full() directly instead of taking this in another redundant variable.

---
 include/linux/pgtable.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
include/linux/pgtable.h +1 -3
index 576093de8b1c..1159b25b0542 100644
@@ -456,9 +456,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
                                            unsigned long address, pte_t *ptep,
                                            int full)
 {
-       pte_t pte;
-       pte = ptep_get_and_clear(mm, address, ptep);
-       return pte;
+       return ptep_get_and_clear(mm, address, ptep);
 }
 #endif
 

--
2.15.2