summaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm_perms.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-07-16 01:04:39 +0200
committerKees Cook <keescook@chromium.org>2016-07-16 01:14:45 +0200
commit6d2e91a662256fd88ec0505567a59d21094ed415 (patch)
tree97c6a4c79a66ffa019f1c648e81fcef687e97fb1 /drivers/misc/lkdtm_perms.c
parentlkdtm: hide unused functions (diff)
downloadlinux-6d2e91a662256fd88ec0505567a59d21094ed415.tar.xz
linux-6d2e91a662256fd88ec0505567a59d21094ed415.zip
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_perms.c')
-rw-r--r--drivers/misc/lkdtm_perms.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/misc/lkdtm_perms.c b/drivers/misc/lkdtm_perms.c
index 8201006502e2..45f1c0f96612 100644
--- a/drivers/misc/lkdtm_perms.c
+++ b/drivers/misc/lkdtm_perms.c
@@ -3,17 +3,13 @@
* permissions: non-executable regions, non-writable regions, and
* even non-readable regions.
*/
-#define pr_fmt(fmt) "lkdtm: " fmt
-
-#include <linux/kernel.h>
+#include "lkdtm.h"
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/mman.h>
#include <linux/uaccess.h>
#include <asm/cacheflush.h>
-#include "lkdtm.h"
-
/* Whether or not to fill the target memory area with do_nothing(). */
#define CODE_WRITE true
#define CODE_AS_IS false