Skip to content

Commit f7386f5

Browse files
committed
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>
1 parent a2564d0 commit f7386f5

6 files changed

Lines changed: 1 addition & 8 deletions

File tree

include/linux/fs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3487,7 +3487,6 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
34873487
ssize_t simple_attr_write_signed(struct file *file, const char __user *buf,
34883488
size_t len, loff_t *ppos);
34893489

3490-
struct ctl_table;
34913490
int __init list_bdev_fs_names(char *buf, size_t size);
34923491

34933492
#define __FMODE_EXEC ((__force int) FMODE_EXEC)

include/linux/hugetlb.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#include <linux/userfaultfd_k.h>
1717
#include <linux/nodemask.h>
1818

19-
struct ctl_table;
20-
struct user_struct;
2119
struct mmu_gather;
2220
struct node;
2321

include/linux/printk.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ extern void console_verbose(void);
7878
/* strlen("ratelimit") + 1 */
7979
#define DEVKMSG_STR_MAX_SIZE 10
8080
extern char devkmsg_log_str[DEVKMSG_STR_MAX_SIZE];
81-
struct ctl_table;
8281

8382
extern int suppress_printk;
8483

include/net/ax25.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ typedef struct {
215215
unsigned short slave_timeout; /* when? */
216216
} ax25_dama_info;
217217

218-
struct ctl_table;
219-
220218
typedef struct ax25_dev {
221219
struct list_head list;
222220

kernel/printk/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
*/
55
#include <linux/console.h>
66
#include <linux/types.h>
7+
#include <linux/sysctl.h>
78

89
#if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
9-
struct ctl_table;
1010
void __init printk_sysctl_init(void);
1111
int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
1212
void *buffer, size_t *lenp, loff_t *ppos);

kernel/printk/sysctl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* sysctl.c: General linux system control interface
44
*/
55

6-
#include <linux/sysctl.h>
76
#include <linux/printk.h>
87
#include <linux/capability.h>
98
#include <linux/ratelimit.h>

0 commit comments

Comments
 (0)