diff options
author | zhang songyi <zhang.songyi@zte.com.cn> | 2022-11-28 16:07:43 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-12-12 05:12:11 +0300 |
commit | d3a89233583bf8edab18ac09732759c71dbe0173 (patch) | |
tree | d24c374ad0c118484077ece5c77c02d64af9390c /include/linux/pgtable.h | |
parent | 3cd629e5775397103e0428f62ce64747741dbfe5 (diff) | |
download | linux-d3a89233583bf8edab18ac09732759c71dbe0173.tar.xz |
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 <zhang.songyi@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/pgtable.h')
-rw-r--r-- | include/linux/pgtable.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index c74cce67eec8..dfabd549d2e7 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 |