diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-10-18 06:05:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 17:37:22 -0400 |
commit | d8217f076b73441dd3869c0c880df000655084cc (patch) | |
tree | 279c6bda7b3ad8bc8cd8099681a93d59fd193f26 /include | |
parent | d32c4f2626acc385d5187bd5c0c24f442328dc60 (diff) |
sysctl core: Stop using the unnecessary ctl_table typedef
In sysctl.h the typedef struct ctl_table ctl_table violates coding style isn't
needed and is a bit of a nuisance because it makes it harder to recognize
ctl_table is a type name.
So this patch removes it from the generic sysctl code. Hopefully I will have
enough energy to send the rest of my patches will follow and to remove it from
the rest of the kernel.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sysctl.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 483050c924c3..f73be4cd662e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -937,37 +937,37 @@ extern int sysctl_perm(struct ctl_table *table, int op); | |||
937 | 937 | ||
938 | typedef struct ctl_table ctl_table; | 938 | typedef struct ctl_table ctl_table; |
939 | 939 | ||
940 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, | 940 | typedef int ctl_handler (struct ctl_table *table, int __user *name, int nlen, |
941 | void __user *oldval, size_t __user *oldlenp, | 941 | void __user *oldval, size_t __user *oldlenp, |
942 | void __user *newval, size_t newlen); | 942 | void __user *newval, size_t newlen); |
943 | 943 | ||
944 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, | 944 | typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp, |
945 | void __user *buffer, size_t *lenp, loff_t *ppos); | 945 | void __user *buffer, size_t *lenp, loff_t *ppos); |
946 | 946 | ||
947 | extern int proc_dostring(ctl_table *, int, struct file *, | 947 | extern int proc_dostring(struct ctl_table *, int, struct file *, |
948 | void __user *, size_t *, loff_t *); | 948 | void __user *, size_t *, loff_t *); |
949 | extern int proc_dointvec(ctl_table *, int, struct file *, | 949 | extern int proc_dointvec(struct ctl_table *, int, struct file *, |
950 | void __user *, size_t *, loff_t *); | 950 | void __user *, size_t *, loff_t *); |
951 | extern int proc_dointvec_bset(ctl_table *, int, struct file *, | 951 | extern int proc_dointvec_bset(struct ctl_table *, int, struct file *, |
952 | void __user *, size_t *, loff_t *); | 952 | void __user *, size_t *, loff_t *); |
953 | extern int proc_dointvec_minmax(ctl_table *, int, struct file *, | 953 | extern int proc_dointvec_minmax(struct ctl_table *, int, struct file *, |
954 | void __user *, size_t *, loff_t *); | 954 | void __user *, size_t *, loff_t *); |
955 | extern int proc_dointvec_jiffies(ctl_table *, int, struct file *, | 955 | extern int proc_dointvec_jiffies(struct ctl_table *, int, struct file *, |
956 | void __user *, size_t *, loff_t *); | 956 | void __user *, size_t *, loff_t *); |
957 | extern int proc_dointvec_userhz_jiffies(ctl_table *, int, struct file *, | 957 | extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, struct file *, |
958 | void __user *, size_t *, loff_t *); | 958 | void __user *, size_t *, loff_t *); |
959 | extern int proc_dointvec_ms_jiffies(ctl_table *, int, struct file *, | 959 | extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, struct file *, |
960 | void __user *, size_t *, loff_t *); | 960 | void __user *, size_t *, loff_t *); |
961 | extern int proc_doulongvec_minmax(ctl_table *, int, struct file *, | 961 | extern int proc_doulongvec_minmax(struct ctl_table *, int, struct file *, |
962 | void __user *, size_t *, loff_t *); | 962 | void __user *, size_t *, loff_t *); |
963 | extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, | 963 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, |
964 | struct file *, void __user *, size_t *, loff_t *); | 964 | struct file *, void __user *, size_t *, loff_t *); |
965 | 965 | ||
966 | extern int do_sysctl (int __user *name, int nlen, | 966 | extern int do_sysctl (int __user *name, int nlen, |
967 | void __user *oldval, size_t __user *oldlenp, | 967 | void __user *oldval, size_t __user *oldlenp, |
968 | void __user *newval, size_t newlen); | 968 | void __user *newval, size_t newlen); |
969 | 969 | ||
970 | extern int do_sysctl_strategy (ctl_table *table, | 970 | extern int do_sysctl_strategy (struct ctl_table *table, |
971 | int __user *name, int nlen, | 971 | int __user *name, int nlen, |
972 | void __user *oldval, size_t __user *oldlenp, | 972 | void __user *oldval, size_t __user *oldlenp, |
973 | void __user *newval, size_t newlen); | 973 | void __user *newval, size_t newlen); |
@@ -980,7 +980,7 @@ extern ctl_handler sysctl_ms_jiffies; | |||
980 | 980 | ||
981 | /* | 981 | /* |
982 | * Register a set of sysctl names by calling register_sysctl_table | 982 | * Register a set of sysctl names by calling register_sysctl_table |
983 | * with an initialised array of ctl_table's. An entry with zero | 983 | * with an initialised array of struct ctl_table's. An entry with zero |
984 | * ctl_name and NULL procname terminates the table. table->de will be | 984 | * ctl_name and NULL procname terminates the table. table->de will be |
985 | * set up by the registration and need not be initialised in advance. | 985 | * set up by the registration and need not be initialised in advance. |
986 | * | 986 | * |
@@ -1026,8 +1026,8 @@ struct ctl_table | |||
1026 | void *data; | 1026 | void *data; |
1027 | int maxlen; | 1027 | int maxlen; |
1028 | mode_t mode; | 1028 | mode_t mode; |
1029 | ctl_table *child; | 1029 | struct ctl_table *child; |
1030 | ctl_table *parent; /* Automatically set */ | 1030 | struct ctl_table *parent; /* Automatically set */ |
1031 | proc_handler *proc_handler; /* Callback for text formatting */ | 1031 | proc_handler *proc_handler; /* Callback for text formatting */ |
1032 | ctl_handler *strategy; /* Callback function for all r/w */ | 1032 | ctl_handler *strategy; /* Callback function for all r/w */ |
1033 | void *extra1; | 1033 | void *extra1; |
@@ -1035,16 +1035,16 @@ struct ctl_table | |||
1035 | }; | 1035 | }; |
1036 | 1036 | ||
1037 | /* struct ctl_table_header is used to maintain dynamic lists of | 1037 | /* struct ctl_table_header is used to maintain dynamic lists of |
1038 | ctl_table trees. */ | 1038 | struct ctl_table trees. */ |
1039 | struct ctl_table_header | 1039 | struct ctl_table_header |
1040 | { | 1040 | { |
1041 | ctl_table *ctl_table; | 1041 | struct ctl_table *ctl_table; |
1042 | struct list_head ctl_entry; | 1042 | struct list_head ctl_entry; |
1043 | int used; | 1043 | int used; |
1044 | struct completion *unregistering; | 1044 | struct completion *unregistering; |
1045 | }; | 1045 | }; |
1046 | 1046 | ||
1047 | struct ctl_table_header * register_sysctl_table(ctl_table * table); | 1047 | struct ctl_table_header *register_sysctl_table(struct ctl_table * table); |
1048 | 1048 | ||
1049 | void unregister_sysctl_table(struct ctl_table_header * table); | 1049 | void unregister_sysctl_table(struct ctl_table_header * table); |
1050 | 1050 | ||