OSDN Git Service

MIPS: fix vdso different address spaces
authorSunguoyun <sunguoyun@loongson.cn>
Tue, 14 Jul 2020 06:07:47 +0000 (14:07 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 16 Jul 2020 08:53:46 +0000 (10:53 +0200)
sparse report build warning as follows:
arch/mips/vdso/vdso-n32-image.c:13:35:
incorrect type in assignment (different address spaces) @@
expected void *[usertype] vdso @@     got void [noderef] <asn:1> * @@

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sunguoyun <sunguoyun@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/vdso/genvdso.c

index be57b83..94f9538 100644 (file)
@@ -260,7 +260,7 @@ int main(int argc, char **argv)
        fprintf(out_file, "     if (vdso_image.size != new_size)\n");
        fprintf(out_file, "             return -EINVAL;\n");
        fprintf(out_file, "     current->mm->context.vdso =\n");
-       fprintf(out_file, "     (void __user *)(new_vma->vm_start);\n");
+       fprintf(out_file, "     (void *)(new_vma->vm_start);\n");
        fprintf(out_file, "     return 0;\n");
        fprintf(out_file, "}\n");