Re: [PATCH] ARM: make <linux/uaccess.h> self-contained for ARM

From: Russell King (Oracle)
Date: Tue Sep 26 2023 - 13:28:48 EST


On Wed, Sep 27, 2023 at 02:22:53AM +0900, Masahiro Yamada wrote:
> When I compiled the following code for ARM, I encountered numerous
> errors.
>
> [Test Code]
>
> #include <linux/compiler.h>
> #include <linux/uaccess.h>
>
> int foo(int *x, int __user *ptr)
> {
> return get_user(*x, ptr);
> }
>
> To fix them, make some asm headers self-contained:
>
> 1. In arch/arm/include/asm/traps.h, include <linux/init.h> for __init,
> and <linux/linkage.h> for asmlinkage.

Please drop the __init marking instead of adding linux/init.h, it's
not necessary.

Thanks.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!