got this error when enabling 'CONFIG_TEE' and 'CONFIG_OPTEE':
/home/morello/workspace/linux/drivers/tee/tee_core.c:851:20: error: incompatible function pointer types initializing 'long (*)(struct file *, unsigned int, user_uintptr_t)' (aka 'long (*)(struct file *, unsigned int, unsigned __intcap)') with an expression of type 'long (struct file *, unsigned int, unsigned long)' [-Werror,-Wincompatible-function-pointer-types] .unlocked_ioctl = tee_ioctl, ^~~~~~~~~ 1 error generated. make[4]: *** [/home/morello/workspace/linux/scripts/Makefile.build:250: drivers/tee/tee_core.o] Error 1 make[3]: *** [/home/morello/workspace/linux/scripts/Makefile.build:500: drivers/tee] Error 2 make[2]: *** [/home/morello/workspace/linux/scripts/Makefile.build:500: drivers] Error 2 make[1]: *** [/home/morello/workspace/linux/Makefile:1999: .] Error 2 make[1]: Leaving directory '/home/morello/workspace/linux-out' make: *** [Makefile:231: __sub-make] Error 2
fix it by changing type 'unsigned long' to 'user_uintptr_t'.
Signed-off-by: Menna Mahmoud eng.mennamahmoud.mm@gmail.com --- drivers/tee/tee_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 98da206cd761..780a094f16ac 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -815,7 +815,7 @@ static int tee_ioctl_supp_send(struct tee_context *ctx, return rc; }
-static long tee_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +static long tee_ioctl(struct file *filp, unsigned int cmd, user_uintptr_t arg) { struct tee_context *ctx = filp->private_data; void __user *uarg = (void __user *)arg;