* [PATCH linux-next] mm: remove redundant pte variable
@ 2022-11-28 13:07 zhang.songyi
0 siblings, 0 replies; only message in thread
From: zhang.songyi @ 2022-11-28 13:07 UTC (permalink / raw)
To: akpm
Cc: yuzhao, peterz, david, jgross, tongtiangen, liushixin2,
anshuman.khandual, namit, kunyu, linux-kernel
From: zhang songyi <zhang.songyi@zte.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@zte.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-28 13:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 13:07 [PATCH linux-next] mm: remove redundant pte variable zhang.songyi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).