• Xiaoming Ni's avatar
    printk: move printk sysctl to printk/sysctl.c · faaa357a
    Xiaoming Ni authored
    kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
    dishes, this makes it very difficult to maintain.
    
    To help with this maintenance let's start by moving sysctls to places
    where they actually belong.  The proc sysctl maintainers do not want to
    know what sysctl knobs you wish to add for your own piece of code, we
    just care about the core logic.
    
    So move printk sysctl from kernel/sysctl.c to kernel/printk/sysctl.c.
    Use register_sysctl() to register the sysctl interface.
    
    [mcgrof@kernel.org: fixed compile issues when PRINTK is not set, commit log update]
    
    Link: https://lkml.kernel.org/r/20211124231435.1445213-6-mcgrof@kernel.orgSigned-off-by: default avatarXiaoming Ni <nixiaoming@huawei.com>
    Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Amir Goldstein <amir73il@gmail.com>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Antti Palosaari <crope@iki.fi>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Benjamin LaHaise <bcrl@kvack.org>
    Cc: Clemens Ladisch <clemens@ladisch.de>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Douglas Gilbert <dgilbert@interlog.com>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Iurii Zaikin <yzaikin@google.com>
    Cc: James E.J. Bottomley <jejb@linux.ibm.com>
    Cc: Jani Nikula <jani.nikula@intel.com>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: John Ogness <john.ogness@linutronix.de>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Julia Lawall <julia.lawall@inria.fr>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Lukas Middendorf <kernel@tuxforce.de>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Martin K. Petersen <martin.petersen@oracle.com>
    Cc: Paul Turner <pjt@google.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Petr Mladek <pmladek@suse.com>
    Cc: Phillip Potter <phil@philpotter.co.uk>
    Cc: Qing Wang <wangqing@vivo.com>
    Cc: "Rafael J. Wysocki" <rafael@kernel.org>
    Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Cc: Sebastian Reichel <sre@kernel.org>
    Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Stephen Kitt <steve@sk2.org>
    Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    faaa357a
sysctl.c 74.6 KB