summaryrefslogtreecommitdiff
path: root/drivers/misc/lkdtm_core.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-07-15 16:04:39 -0700
committerKees Cook <keescook@chromium.org>2016-07-15 16:14:45 -0700
commit6d2e91a662256fd88ec0505567a59d21094ed415 (patch)
tree97c6a4c79a66ffa019f1c648e81fcef687e97fb1 /drivers/misc/lkdtm_core.c
parent2b271cb7203dd4dcea991119367df2ed7e66f3c7 (diff)
lkdtm: silence warnings about function declarations
When building under W=1, the lack of lkdtm.h in lkdtm_usercopy.c and lkdtm_rodata.c was discovered. This fixes the issue and consolidates the common header and the pr_fmt macro for simplicity and regularity across each test source file. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/misc/lkdtm_core.c')
-rw-r--r--drivers/misc/lkdtm_core.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/misc/lkdtm_core.c b/drivers/misc/lkdtm_core.c
index 717aad6d374b..f9154b8d67f6 100644
--- a/drivers/misc/lkdtm_core.c
+++ b/drivers/misc/lkdtm_core.c
@@ -30,9 +30,7 @@
*
* See Documentation/fault-injection/provoke-crashes.txt for instructions
*/
-#define pr_fmt(fmt) "lkdtm: " fmt
-
-#include <linux/kernel.h>
+#include "lkdtm.h"
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/buffer_head.h>
@@ -49,8 +47,6 @@
#include <linux/ide.h>
#endif
-#include "lkdtm.h"
-
#define DEFAULT_COUNT 10
static int lkdtm_debugfs_open(struct inode *inode, struct file *file);