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

Russell King (Oracle) linux at armlinux.org.uk
Tue Sep 26 10:28:32 PDT 2023


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!



More information about the linux-arm-kernel mailing list