On Sat, May 07, 2022 at 10:50:26AM -0700, Andrew Morton wrote: > > The patch titled > Subject: mm: functions may simplify the use of return values > has been added to the -mm mm-unstable branch. Its filename is > mm-functions-may-simplify-the-use-of-return-values.patch > > This patch should soon appear in the mm-unstable branch at > git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > > Before you just go and hit "reply", please: > a) Consider who else should be cc'ed > b) Prefer to cc a suitable mailing list as well > c) Ideally: find the original patch on the mailing list and do a > reply-to-all to that, adding suitable additional cc's > > *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** > > The -mm tree is included into linux-next via the mm-everything > branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > and is updated there every 2-3 working days > > ------------------------------------------------------ > From: Li kunyu <kunyu@xxxxxxxxxxxx> > Subject: mm: functions may simplify the use of return values > > p4d_clear_huge may be optimized for void return type and function usage. > vunmap_p4d_range function saves a few steps here. > > Link: https://lkml.kernel.org/r/20220507150630.90399-1-kunyu@xxxxxxxxxxxx > Signed-off-by: Li kunyu <kunyu@xxxxxxxxxxxx> > Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> > Cc: Andy Lutomirski <luto@xxxxxxxxxx> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > Cc: Ingo Molnar <mingo@xxxxxxxxxx> > Cc: Borislav Petkov <bp@xxxxxxxxx> > Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Please, no: arch/x86/mm/pgtable.c: * p4d_clear_huge - clear kernel P4D mapping when it is set arch/x86/mm/pgtable.c:int p4d_clear_huge(p4d_t *p4d) arch/x86/mm/pgtable.c: * pud_clear_huge - clear kernel PUD mapping when it is set arch/x86/mm/pgtable.c:int pud_clear_huge(pud_t *pud) arch/x86/mm/pgtable.c: * pmd_clear_huge - clear kernel PMD mapping when it is set arch/x86/mm/pgtable.c:int pmd_clear_huge(pmd_t *pmd) why would the p4d one need to be different from the rest?