From 19e85c5f13306aa06b442fa0460b353b81599f94 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 17 Jun 2014 11:28:06 -0400 Subject: [PATCH] Don't rely on typedef for struct ctl_table, it's going away --- ath/if_ath.c | 8 ++++---- ath/if_athvar.h | 4 ++-- ath_hal/ah_os.c | 12 ++++++------ ath_rate/amrr/amrr.c | 8 ++++---- ath_rate/onoe/onoe.c | 8 ++++---- net80211/ieee80211_linux.c | 2 +- net80211/ieee80211_linux.h | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ath/if_ath.c b/ath/if_ath.c index 015ee80..73ab465 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -11150,7 +11150,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos) return ret; } -static const ctl_table ath_sysctl_template[] = { +static const struct ctl_table ath_sysctl_template[] = { { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "distance", .mode = 0644, @@ -11480,7 +11480,7 @@ ath_announce(struct net_device *dev) * Static (i.e. global) sysctls. Note that the HAL sysctls * are located under ours by sharing the setting for DEV_ATH. */ -static ctl_table ath_static_sysctls[] = { +static struct ctl_table ath_static_sysctls[] = { #ifdef AR_DEBUG { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "debug", @@ -11520,14 +11520,14 @@ static ctl_table ath_static_sysctls[] = { }, { } }; -static ctl_table ath_ath_table[] = { +static struct ctl_table ath_ath_table[] = { { ATH_INIT_CTL_NAME(DEV_ATH) .procname = "ath", .mode = 0555, .child = ath_static_sysctls }, { } }; -static ctl_table ath_root_table[] = { +static struct ctl_table ath_root_table[] = { { ATH_INIT_CTL_NAME(CTL_DEV) .procname = "dev", .mode = 0555, diff --git a/ath/if_athvar.h b/ath/if_athvar.h index 512a9f7..dbc84af 100644 --- a/ath/if_athvar.h +++ b/ath/if_athvar.h @@ -117,13 +117,13 @@ typedef void irqreturn_t; */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) #define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ - f(ctl_table *ctl, int write, struct file *filp, \ + f(struct ctl_table *ctl, int write, struct file *filp, \ void __user *buffer, size_t *lenp, loff_t *ppos) #define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, filp, buffer, lenp, ppos) #else /* Linux 2.6.32+ */ #define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ - f(ctl_table *ctl, int write, \ + f(struct ctl_table *ctl, int write, \ void __user *buffer, size_t *lenp, loff_t *ppos) #define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, buffer, lenp, ppos) diff --git a/ath_hal/ah_os.c b/ath_hal/ah_os.c index b2aa32f..a4be962 100644 --- a/ath_hal/ah_os.c +++ b/ath_hal/ah_os.c @@ -183,12 +183,12 @@ ath_hal_setlogging(int enable) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) #define AH_SYSCTL_ARGS_DECL \ - ctl_table *ctl, int write, struct file *filp, void *buffer, \ + struct ctl_table *ctl, int write, struct file *filp, void *buffer, \ size_t *lenp #define AH_SYSCTL_ARGS ctl, write, filp, buffer, lenp #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8) */ #define AH_SYSCTL_ARGS_DECL \ - ctl_table *ctl, int write, struct file *filp, void *buffer,\ + struct ctl_table *ctl, int write, struct file *filp, void *buffer,\ size_t *lenp, loff_t *ppos #define AH_SYSCTL_ARGS ctl, write, filp, buffer, lenp, ppos #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8) */ @@ -973,7 +973,7 @@ ath_hal_memcmp(const void *a, const void *b, size_t n) } EXPORT_SYMBOL(ath_hal_memcmp); -static ctl_table ath_hal_sysctls[] = { +static struct ctl_table ath_hal_sysctls[] = { #ifdef AH_DEBUG { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "debug", @@ -1027,21 +1027,21 @@ static ctl_table ath_hal_sysctls[] = { #endif /* AH_DEBUG_ALQ */ { } }; -static ctl_table ath_hal_table[] = { +static struct ctl_table ath_hal_table[] = { { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "hal", .mode = 0555, .child = ath_hal_sysctls }, { } }; -static ctl_table ath_ath_table[] = { +static struct ctl_table ath_ath_table[] = { { ATH_INIT_CTL_NAME(DEV_ATH) .procname = "ath", .mode = 0555, .child = ath_hal_table }, { } }; -static ctl_table ath_root_table[] = { +static struct ctl_table ath_root_table[] = { { ATH_INIT_CTL_NAME(CTL_DEV) .procname = "dev", .mode = 0555, diff --git a/ath_rate/amrr/amrr.c b/ath_rate/amrr/amrr.c index 5af14d8..c40a1c0 100644 --- a/ath_rate/amrr/amrr.c +++ b/ath_rate/amrr/amrr.c @@ -500,7 +500,7 @@ static int min_threshold = 1; * Static (i.e. global) sysctls. */ -static ctl_table ath_rate_static_sysctls[] = { +static struct ctl_table ath_rate_static_sysctls[] = { { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "interval", .mode = 0644, @@ -530,21 +530,21 @@ static ctl_table ath_rate_static_sysctls[] = { }, { } }; -static ctl_table ath_rate_table[] = { +static struct ctl_table ath_rate_table[] = { { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "rate_amrr", .mode = 0555, .child = ath_rate_static_sysctls }, { } }; -static ctl_table ath_ath_table[] = { +static struct ctl_table ath_ath_table[] = { { ATH_INIT_CTL_NAME(DEV_ATH) .procname = "ath", .mode = 0555, .child = ath_rate_table }, { } }; -static ctl_table ath_root_table[] = { +static struct ctl_table ath_root_table[] = { { ATH_INIT_CTL_NAME(CTL_DEV) .procname = "dev", .mode = 0555, diff --git a/ath_rate/onoe/onoe.c b/ath_rate/onoe/onoe.c index 1b61b88..b03eb02 100644 --- a/ath_rate/onoe/onoe.c +++ b/ath_rate/onoe/onoe.c @@ -448,7 +448,7 @@ static int maxint = 0x7fffffff; /* 32-bit big */ /* * Static (i.e. global) sysctls. */ -static ctl_table ath_rate_static_sysctls[] = { +static struct ctl_table ath_rate_static_sysctls[] = { { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "interval", .mode = 0644, @@ -476,21 +476,21 @@ static ctl_table ath_rate_static_sysctls[] = { }, { } }; -static ctl_table ath_rate_table[] = { +static struct ctl_table ath_rate_table[] = { { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "rate_onoe", .mode = 0555, .child = ath_rate_static_sysctls }, { } }; -static ctl_table ath_ath_table[] = { +static struct ctl_table ath_ath_table[] = { { ATH_INIT_CTL_NAME(DEV_ATH) .procname = "ath", .mode = 0555, .child = ath_rate_table }, { } }; -static ctl_table ath_root_table[] = { +static struct ctl_table ath_root_table[] = { { ATH_INIT_CTL_NAME(CTL_DEV) .procname = "dev", .mode = 0555, diff --git a/net80211/ieee80211_linux.c b/net80211/ieee80211_linux.c index d954b3b..97b143f 100644 --- a/net80211/ieee80211_linux.c +++ b/net80211/ieee80211_linux.c @@ -889,7 +889,7 @@ IEEE80211_SYSCTL_DECL(ieee80211_sysctl_monitor_crc_errors, ctl, write, filp, buf return ret; } -static const ctl_table ieee80211_sysctl_template[] = { +static const struct ctl_table ieee80211_sysctl_template[] = { #ifdef IEEE80211_DEBUG { ATH_INIT_CTL_NAME(CTL_AUTO) .procname = "debug", diff --git a/net80211/ieee80211_linux.h b/net80211/ieee80211_linux.h index 4bb8dcd..6440098 100644 --- a/net80211/ieee80211_linux.h +++ b/net80211/ieee80211_linux.h @@ -538,13 +538,13 @@ extern void skb_queue_drain(struct sk_buff_head *q); */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) #define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ - f(ctl_table *ctl, int write, struct file *filp, \ + f(struct ctl_table *ctl, int write, struct file *filp, \ void __user *buffer, size_t *lenp, loff_t *ppos) #define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, filp, buffer, lenp, ppos) #else /* Linux 2.6.32+ */ #define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ - f(ctl_table *ctl, int write, \ + f(struct ctl_table *ctl, int write, \ void __user *buffer, size_t *lenp, loff_t *ppos) #define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ proc_dointvec(ctl, write, buffer, lenp, ppos)