]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - init/do_mounts_rd.c
arm: imx6: defconfig: update tx6 defconfigs
[karo-tx-linux.git] / init / do_mounts_rd.c
index 6212586df29ace81e239b71d01b95826cb636507..6be2879cca66971859b1c51ff80451616ab13975 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Many of the syscalls used in this file expect some of the arguments
+ * to be __user pointers not __kernel pointers.  To limit the sparse
+ * noise, turn off sparse checking for this file.
+ */
+#ifdef __CHECKER__
+#undef __CHECKER__
+#warning "Sparse checking disabled for this file"
+#endif
 
 #include <linux/kernel.h>
 #include <linux/fs.h>
@@ -181,7 +190,7 @@ int __init rd_load_image(char *from)
        char rotator[4] = { '|' , '/' , '-' , '\\' };
 #endif
 
-       out_fd = sys_open((const char __user __force *) "/dev/ram", O_RDWR, 0);
+       out_fd = sys_open("/dev/ram", O_RDWR, 0);
        if (out_fd < 0)
                goto out;
 
@@ -280,7 +289,7 @@ noclose_input:
        sys_close(out_fd);
 out:
        kfree(buf);
-       sys_unlink((const char __user __force *) "/dev/ram");
+       sys_unlink("/dev/ram");
        return res;
 }