[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e8b98439-6e53-b3ac-af78-bb814292349e@arista.com>
Date: Mon, 21 Jun 2021 22:12:44 +0100
From: Dmitry Safonov <dima@...sta.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>,
linux-kernel@...r.kernel.org
Cc: Dmitry Safonov <0x7f454c46@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>,
Catalin Marinas <catalin.marinas@....com>,
Guo Ren <guoren@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
Ingo Molnar <mingo@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Russell King <linux@...linux.org.uk>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Thomas Gleixner <tglx@...utronix.de>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Will Deacon <will@...nel.org>, x86@...nel.org
Subject: Re: [PATCH v3 13/23] mm/mmap: Make vm_special_mapping::mremap return
void
On 6/17/21 8:20 AM, Christophe Leroy wrote:
>
>
> Le 11/06/2021 à 20:02, Dmitry Safonov a écrit :
>> Previously .mremap() callback had to return (int) to provide
>> a way to restrict resizing of a special mapping. Now it's
>> restricted by providing .may_split = special_mapping_split.
>>
>> Removing (int) return simplifies further changes to
>> special_mapping_mremap() as it won't need save ret code from the
>> callback. Also, it removes needless `return 0` from callbacks.
>>
>> Signed-off-by: Dmitry Safonov <dima@...sta.com>
>> ---
>> arch/arm/kernel/process.c | 3 +--
>> arch/arm64/kernel/vdso.c | 4 +---
>> arch/mips/vdso/genvdso.c | 3 +--
>> arch/x86/entry/vdso/vma.c | 4 +---
>> include/linux/mm_types.h | 4 ++--
>> mm/mmap.c | 2 +-
>> 6 files changed, 7 insertions(+), 13 deletions(-)
>>
>
> Build failure:
>
> CC arch/powerpc/kernel/vdso.o
> arch/powerpc/kernel/vdso.c:93:19: error: initialization of 'void
> (*)(const struct vm_special_mapping *, struct vm_area_struct *)' from
> incompatible pointer type 'int (*)(const struct vm_special_mapping *,
> struct vm_area_struct *)' [-Werror=incompatible-pointer-types]
> 93 | .mremap = vdso32_mremap,
> | ^~~~~~~~~~~~~
> arch/powerpc/kernel/vdso.c:93:19: note: (near initialization for
> 'vdso32_spec.mremap')
> arch/powerpc/kernel/vdso.c:98:19: error: initialization of 'void
> (*)(const struct vm_special_mapping *, struct vm_area_struct *)' from
> incompatible pointer type 'int (*)(const struct vm_special_mapping *,
> struct vm_area_struct *)' [-Werror=incompatible-pointer-types]
> 98 | .mremap = vdso64_mremap,
> | ^~~~~~~~~~~~~
> arch/powerpc/kernel/vdso.c:98:19: note: (near initialization for
> 'vdso64_spec.mremap')
> cc1: all warnings being treated as errors
> make[3]: *** [arch/powerpc/kernel/vdso.o] Error 1
> make[2]: *** [arch/powerpc/kernel] Error 2
> make[1]: *** [arch/powerpc] Error 2
> make: *** [__sub-make] Error 2
>
Thanks for reporting, Christophe, I'll fix that in v4.
Thanks,
Dmitry
Powered by blists - more mailing lists