compat: remove compat_printk()
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 Sep 2016 23:45:24 +0000 (09:45 +1000)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 28 Sep 2016 01:20:53 +0000 (21:20 -0400)
After 7e8e385aaf6e ("x86/compat: Remove sys32_vm86_warning"), this
function has become unused, so we can remove it as well.

Link: http://lkml.kernel.org/r/20160617142903.3070388-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/compat.c
include/linux/compat.h
kernel/sysctl.c

index 5bc3a4b245bbf59fb287ef7afc005610fa79cbfd..bd064a2c3550e41d510dae6ff6e1186af685af36 100644 (file)
 #include <asm/ioctls.h>
 #include "internal.h"
 
-int compat_log = 1;
-
-int compat_printk(const char *fmt, ...)
-{
-       va_list ap;
-       int ret;
-       if (!compat_log)
-               return 0;
-       va_start(ap, fmt);
-       ret = vprintk(fmt, ap);
-       va_end(ap);
-       return ret;
-}
-
 /*
  * Not all architectures have sys_utime, so implement this in terms
  * of sys_utimes.
index f964ef79e0adfc387c46026e05ba52c829c3baa1..63609398ef9f21bca890619d29be4329df4c079e 100644 (file)
@@ -432,7 +432,6 @@ asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv,
 
 asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
 
-extern __printf(1, 2) int compat_printk(const char *fmt, ...);
 extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat);
 extern void sigset_to_compat(compat_sigset_t *compat, const sigset_t *set);
 
index d66321036f211e251ee00b8f94d3f0b97e0d09b4..98ba312d1088906d850e2d254124f2ea64b830b9 100644 (file)
@@ -106,7 +106,6 @@ extern unsigned int core_pipe_limit;
 extern int pid_max;
 extern int pid_max_min, pid_max_max;
 extern int percpu_pagelist_fraction;
-extern int compat_log;
 extern int latencytop_enabled;
 extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
 #ifndef CONFIG_MMU
@@ -1084,15 +1083,6 @@ static struct ctl_table kern_table[] = {
                .extra1         = &neg_one,
        },
 #endif
-#ifdef CONFIG_COMPAT
-       {
-               .procname       = "compat-log",
-               .data           = &compat_log,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
-#endif
 #ifdef CONFIG_RT_MUTEXES
        {
                .procname       = "max_lock_depth",