aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Granados <joel.granados@kernel.org>2025-11-03 22:29:08 +0100
committerJoel Granados <joel.granados@kernel.org>2026-01-05 13:54:41 +0100
commitf7386f545e49e5e6229a14d92b39340d155b0b3f (patch)
treee04bcf94045569d50d7429864b347ac5e2cbd491
parenta2564d0688db20a1ee1660f45d7823075feb12a7 (diff)
sysctl: Remove unused ctl_table forward declarations
Remove superfluous forward declarations of ctl_table from header files where they are no longer needed. These declarations were left behind after sysctl code refactoring and cleanup. Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Muchun Song <muchun.song@linux.dev> Reviewed-by: Petr Mladek <pmladek@suse.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Joel Granados <joel.granados@kernel.org>
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/hugetlb.h2
-rw-r--r--include/linux/printk.h1
-rw-r--r--include/net/ax25.h2
-rw-r--r--kernel/printk/internal.h2
-rw-r--r--kernel/printk/sysctl.c1
6 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 04ceeca12a0d..77f6302fdced 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3487,7 +3487,6 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
ssize_t simple_attr_write_signed(struct file *file, const char __user *buf,
size_t len, loff_t *ppos);
-struct ctl_table;
int __init list_bdev_fs_names(char *buf, size_t size);
#define __FMODE_EXEC ((__force int) FMODE_EXEC)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 019a1c5281e4..18d1c4ecc4f9 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -16,8 +16,6 @@
#include <linux/userfaultfd_k.h>
#include <linux/nodemask.h>
-struct ctl_table;
-struct user_struct;
struct mmu_gather;
struct node;
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 45c663124c9b..63d516c873b4 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -78,7 +78,6 @@ extern void console_verbose(void);
/* strlen("ratelimit") + 1 */
#define DEVKMSG_STR_MAX_SIZE 10
extern char devkmsg_log_str[DEVKMSG_STR_MAX_SIZE];
-struct ctl_table;
extern int suppress_printk;
diff --git a/include/net/ax25.h b/include/net/ax25.h
index a7bba42dde15..beec9712e9c7 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -215,8 +215,6 @@ typedef struct {
unsigned short slave_timeout; /* when? */
} ax25_dama_info;
-struct ctl_table;
-
typedef struct ax25_dev {
struct list_head list;
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
index 5f5f626f4279..29a3bd1799d4 100644
--- a/kernel/printk/internal.h
+++ b/kernel/printk/internal.h
@@ -4,9 +4,9 @@
*/
#include <linux/console.h>
#include <linux/types.h>
+#include <linux/sysctl.h>
#if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
-struct ctl_table;
void __init printk_sysctl_init(void);
int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos);
diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c
index da77f3f5c1fe..f15732e93c2e 100644
--- a/kernel/printk/sysctl.c
+++ b/kernel/printk/sysctl.c
@@ -3,7 +3,6 @@
* sysctl.c: General linux system control interface
*/
-#include <linux/sysctl.h>
#include <linux/printk.h>
#include <linux/capability.h>
#include <linux/ratelimit.h>