From: zhang songyi Date: Mon, 28 Nov 2022 13:07:43 +0000 (+0800) Subject: include/linux/pgtable.h: : remove redundant pte variable X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d3a89233583bf8edab18ac09732759c71dbe0173;p=linux.git include/linux/pgtable.h: : remove redundant pte variable Return value from ptep_get_and_clear_full() directly instead of taking this in another redundant variable. Link: https://lkml.kernel.org/r/202211282107437343474@zte.com.cn Signed-off-by: zhang songyi Signed-off-by: Andrew Morton --- diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index c74cce67eec85..dfabd549d2e71 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -425,9 +425,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