summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzhang songyi <zhang.songyi@zte.com.cn>2022-11-28 16:07:43 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-12-12 05:12:11 +0300
commitd3a89233583bf8edab18ac09732759c71dbe0173 (patch)
treed24c374ad0c118484077ece5c77c02d64af9390c /include
parent3cd629e5775397103e0428f62ce64747741dbfe5 (diff)
downloadlinux-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')
-rw-r--r--include/linux/pgtable.h4
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