Skip to content

Commit 6ad018e

Browse files
lucvootorvalds
authored andcommitted
init/: remove ineffective sparse disabling
Sparse checking used to be disabled on init/do_mounts.c and a few related files because "Many of the syscalls used in this file expect some of the arguments to be __user pointers not __kernel pointers". However since 28128c6 ("kconfig.h: Include compiler types to avoid missed struct attributes") the checks are, in fact, not disabled anymore because of the more early include of "linux/compiler_types.h" So remove the now ineffective #undefery that was done to disable these warnings, as well as the associated comment. Link: http://lkml.kernel.org/r/20180617115355.53799-1-luc.vanoostenryck@gmail.com Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 992991c commit 6ad018e

5 files changed

Lines changed: 0 additions & 50 deletions

File tree

‎init/do_mounts.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/*
2-
* Many of the syscalls used in this file expect some of the arguments
3-
* to be __user pointers not __kernel pointers. To limit the sparse
4-
* noise, turn off sparse checking for this file.
5-
*/
6-
#ifdef __CHECKER__
7-
#undef __CHECKER__
8-
#warning "Sparse checking disabled for this file"
9-
#endif
10-
111
#include <linux/module.h>
122
#include <linux/sched.h>
133
#include <linux/ctype.h>

‎init/do_mounts_initrd.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
// SPDX-License-Identifier: GPL-2.0
2-
/*
3-
* Many of the syscalls used in this file expect some of the arguments
4-
* to be __user pointers not __kernel pointers. To limit the sparse
5-
* noise, turn off sparse checking for this file.
6-
*/
7-
#ifdef __CHECKER__
8-
#undef __CHECKER__
9-
#warning "Sparse checking disabled for this file"
10-
#endif
11-
122
#include <linux/unistd.h>
133
#include <linux/kernel.h>
144
#include <linux/fs.h>

‎init/do_mounts_md.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
// SPDX-License-Identifier: GPL-2.0
2-
/*
3-
* Many of the syscalls used in this file expect some of the arguments
4-
* to be __user pointers not __kernel pointers. To limit the sparse
5-
* noise, turn off sparse checking for this file.
6-
*/
7-
#ifdef __CHECKER__
8-
#undef __CHECKER__
9-
#warning "Sparse checking disabled for this file"
10-
#endif
11-
122
#include <linux/delay.h>
133
#include <linux/raid/md_u.h>
144
#include <linux/raid/md_p.h>

‎init/do_mounts_rd.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
// SPDX-License-Identifier: GPL-2.0
2-
/*
3-
* Many of the syscalls used in this file expect some of the arguments
4-
* to be __user pointers not __kernel pointers. To limit the sparse
5-
* noise, turn off sparse checking for this file.
6-
*/
7-
#ifdef __CHECKER__
8-
#undef __CHECKER__
9-
#warning "Sparse checking disabled for this file"
10-
#endif
11-
122
#include <linux/kernel.h>
133
#include <linux/fs.h>
144
#include <linux/minix_fs.h>

‎init/initramfs.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
// SPDX-License-Identifier: GPL-2.0
2-
/*
3-
* Many of the syscalls used in this file expect some of the arguments
4-
* to be __user pointers not __kernel pointers. To limit the sparse
5-
* noise, turn off sparse checking for this file.
6-
*/
7-
#ifdef __CHECKER__
8-
#undef __CHECKER__
9-
#warning "Sparse checking disabled for this file"
10-
#endif
11-
122
#include <linux/init.h>
133
#include <linux/fs.h>
144
#include <linux/slab.h>

0 commit comments

Comments
 (0)