[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202211282107437343474@zte.com.cn>
Date: Mon, 28 Nov 2022 21:07:43 +0800 (CST)
From: <zhang.songyi@....com.cn>
To: <akpm@...ux-foundation.org>
Cc: <yuzhao@...gle.com>, <peterz@...radead.org>, <david@...hat.com>,
<jgross@...e.com>, <tongtiangen@...wei.com>,
<liushixin2@...wei.com>, <anshuman.khandual@....com>,
<namit@...are.com>, <kunyu@...china.com>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH linux-next] mm: remove redundant pte variable
From: zhang songyi <zhang.songyi@....com.cn>
Return value from ptep_get_and_clear_full() directly instead of taking
this in another redundant variable.
Signed-off-by: zhang songyi <zhang.songyi@....com.cn>
---
include/linux/pgtable.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 576093de8b1c..1159b25b0542 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -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
Powered by blists - more mailing lists