On Mon, 9 May 2022 09:20:35 +0200 Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > > 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? Because the p4d one doesn't return anything, whereas the others do? Any code which tests the p4d_clear_huge() return value is probably buggy, so making p4d_clear_huge() return void permits us to detect such a bug with the C type system.