Skip to content

Commit

Permalink
init/: remove ineffective sparse disabling
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Luc Van Oostenryck <[email protected]>
Cc: Dominik Brodowski <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
lucvoo authored and torvalds committed Aug 22, 2018
1 parent 992991c commit 6ad018e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 50 deletions.
10 changes: 0 additions & 10 deletions init/do_mounts.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
* 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/module.h>
#include <linux/sched.h>
#include <linux/ctype.h>
Expand Down
10 changes: 0 additions & 10 deletions init/do_mounts_initrd.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* 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/unistd.h>
#include <linux/kernel.h>
#include <linux/fs.h>
Expand Down
10 changes: 0 additions & 10 deletions init/do_mounts_md.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* 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/delay.h>
#include <linux/raid/md_u.h>
#include <linux/raid/md_p.h>
Expand Down
10 changes: 0 additions & 10 deletions init/do_mounts_rd.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* 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>
#include <linux/minix_fs.h>
Expand Down
10 changes: 0 additions & 10 deletions init/initramfs.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* 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/init.h>
#include <linux/fs.h>
#include <linux/slab.h>
Expand Down

0 comments on commit 6ad018e

Please sign in to comment.