watchdog/core: remove sysctl handlers from public header
The functions are only used in the file where they are defined. Remove them from the header and make them static. Also guard proc_soft_watchdog with a #define-guard as it is not used otherwise. Link: https://lkml.kernel.org/r/20240306-const-sysctl-prep-watchdog-v1-1-bd45da3a41cf@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
adc2c8d0b3
commit
75060b6ead
@ -216,13 +216,6 @@ void watchdog_update_hrtimer_threshold(u64 period);
|
|||||||
static inline void watchdog_update_hrtimer_threshold(u64 period) { }
|
static inline void watchdog_update_hrtimer_threshold(u64 period) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct ctl_table;
|
|
||||||
int proc_watchdog(struct ctl_table *, int, void *, size_t *, loff_t *);
|
|
||||||
int proc_nmi_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
|
|
||||||
int proc_soft_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
|
|
||||||
int proc_watchdog_thresh(struct ctl_table *, int , void *, size_t *, loff_t *);
|
|
||||||
int proc_watchdog_cpumask(struct ctl_table *, int, void *, size_t *, loff_t *);
|
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_ACPI_APEI_NMI
|
#ifdef CONFIG_HAVE_ACPI_APEI_NMI
|
||||||
#include <asm/nmi.h>
|
#include <asm/nmi.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -796,7 +796,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write,
|
|||||||
/*
|
/*
|
||||||
* /proc/sys/kernel/watchdog
|
* /proc/sys/kernel/watchdog
|
||||||
*/
|
*/
|
||||||
int proc_watchdog(struct ctl_table *table, int write,
|
static int proc_watchdog(struct ctl_table *table, int write,
|
||||||
void *buffer, size_t *lenp, loff_t *ppos)
|
void *buffer, size_t *lenp, loff_t *ppos)
|
||||||
{
|
{
|
||||||
return proc_watchdog_common(WATCHDOG_HARDLOCKUP_ENABLED |
|
return proc_watchdog_common(WATCHDOG_HARDLOCKUP_ENABLED |
|
||||||
@ -807,7 +807,7 @@ int proc_watchdog(struct ctl_table *table, int write,
|
|||||||
/*
|
/*
|
||||||
* /proc/sys/kernel/nmi_watchdog
|
* /proc/sys/kernel/nmi_watchdog
|
||||||
*/
|
*/
|
||||||
int proc_nmi_watchdog(struct ctl_table *table, int write,
|
static int proc_nmi_watchdog(struct ctl_table *table, int write,
|
||||||
void *buffer, size_t *lenp, loff_t *ppos)
|
void *buffer, size_t *lenp, loff_t *ppos)
|
||||||
{
|
{
|
||||||
if (!watchdog_hardlockup_available && write)
|
if (!watchdog_hardlockup_available && write)
|
||||||
@ -816,20 +816,22 @@ int proc_nmi_watchdog(struct ctl_table *table, int write,
|
|||||||
table, write, buffer, lenp, ppos);
|
table, write, buffer, lenp, ppos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SOFTLOCKUP_DETECTOR
|
||||||
/*
|
/*
|
||||||
* /proc/sys/kernel/soft_watchdog
|
* /proc/sys/kernel/soft_watchdog
|
||||||
*/
|
*/
|
||||||
int proc_soft_watchdog(struct ctl_table *table, int write,
|
static int proc_soft_watchdog(struct ctl_table *table, int write,
|
||||||
void *buffer, size_t *lenp, loff_t *ppos)
|
void *buffer, size_t *lenp, loff_t *ppos)
|
||||||
{
|
{
|
||||||
return proc_watchdog_common(WATCHDOG_SOFTOCKUP_ENABLED,
|
return proc_watchdog_common(WATCHDOG_SOFTOCKUP_ENABLED,
|
||||||
table, write, buffer, lenp, ppos);
|
table, write, buffer, lenp, ppos);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* /proc/sys/kernel/watchdog_thresh
|
* /proc/sys/kernel/watchdog_thresh
|
||||||
*/
|
*/
|
||||||
int proc_watchdog_thresh(struct ctl_table *table, int write,
|
static int proc_watchdog_thresh(struct ctl_table *table, int write,
|
||||||
void *buffer, size_t *lenp, loff_t *ppos)
|
void *buffer, size_t *lenp, loff_t *ppos)
|
||||||
{
|
{
|
||||||
int err, old;
|
int err, old;
|
||||||
@ -852,7 +854,7 @@ int proc_watchdog_thresh(struct ctl_table *table, int write,
|
|||||||
* user to specify a mask that will include cpus that have not yet
|
* user to specify a mask that will include cpus that have not yet
|
||||||
* been brought online, if desired.
|
* been brought online, if desired.
|
||||||
*/
|
*/
|
||||||
int proc_watchdog_cpumask(struct ctl_table *table, int write,
|
static int proc_watchdog_cpumask(struct ctl_table *table, int write,
|
||||||
void *buffer, size_t *lenp, loff_t *ppos)
|
void *buffer, size_t *lenp, loff_t *ppos)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user