From: Hauke M. <ha...@ha...> - 2013-01-03 15:21:48
|
These patches are fixing some warnings I got when compiling against various kernel versions. I test compiled this against kernel version 2.6.32 to 3.8-rc1, compilation against older kernel versions does not work. I do not have this hardware at hand now, so this was not runtime tested. Hauke Mehrtens (3): fix a section mismatch printk_ratelimited is available in kernel version 2.6.32 fix warning when building against kernel 2.6.32 acx_compat.h | 2 +- debug.c | 2 +- debug.h | 4 ++-- main.c | 4 ++-- main.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- 1.7.10.4 |
From: Hauke M. <ha...@ha...> - 2013-01-03 15:21:43
|
WARNING: /home/hauke/linux/acx-mac80211/acx-mac80211.o(.init.text+0x1bc): Section mismatch in reference from the function init_module() to the function .exit.text:acx_debugfs_exit() The function __init init_module() references a function __exit acx_debugfs_exit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __exit annotation of acx_debugfs_exit() so it may be used outside an exit section. Signed-off-by: Hauke Mehrtens <ha...@ha...> --- debug.c | 2 +- debug.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debug.c b/debug.c index ce9e4ca..5b5587d 100644 --- a/debug.c +++ b/debug.c @@ -951,7 +951,7 @@ int __init acx_debugfs_init(void) return 0; } -void __exit acx_debugfs_exit(void) +void acx_debugfs_exit(void) { debugfs_remove_recursive(acx_dbgfs_dir); } diff --git a/debug.h b/debug.h index ff4e3f4..5853c40 100644 --- a/debug.h +++ b/debug.h @@ -9,14 +9,14 @@ typedef ssize_t ((acx_dbgfs_write_t)(acx_device_t *adev, struct file *, const ch int acx_debugfs_add_adev(struct acx_device *adev); void acx_debugfs_remove_adev(struct acx_device *adev); int __init acx_debugfs_init(void); -void __exit acx_debugfs_exit(void); +void acx_debugfs_exit(void); #else static int acx_debugfs_add_adev(struct acx_device *adev) { return 0; } static void acx_debugfs_remove_adev(struct acx_device *adev) { } static int __init acx_debugfs_init(void) { return 0; } -static void __exit acx_debugfs_exit(void) { } +static void acx_debugfs_exit(void) { } #endif /* defined CONFIG_DEBUG_FS */ -- 1.7.10.4 |
From: Hauke M. <ha...@ha...> - 2013-01-03 15:21:48
|
printk_ratelimited was added to kernel version 2.6.32 later and it is not needed to use this backport any more. commit 74e8e01d2c9f10b4b1ae559e1fd281bd00741d79 Author: Joe Perches <jo...@pe...> Date: Tue Jan 17 04:06:18 2012 +0000 kernel.h: add printk_ratelimited and pr_<level>_rl commit 8a64f336bc1d4aa203b138d29d5a9c414a9fbb47 upstream. Signed-off-by: Hauke Mehrtens <ha...@ha...> --- acx_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acx_compat.h b/acx_compat.h index 41e705c..e599026 100644 --- a/acx_compat.h +++ b/acx_compat.h @@ -5,7 +5,7 @@ #include <linux/ratelimit.h> #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) #define printk_ratelimited(args...) \ do { \ -- 1.7.10.4 |
From: Hauke M. <ha...@ha...> - 2013-01-03 15:22:22
|
This fixes the following warning: acx-mac80211/main.c: In function ‘acx_recover_hw’: acx-mac80211/main.c:1115:2: warning: passing argument 2 of ‘acx_remove_interface’ from incompatible pointer type [enabled by default] acx-mac80211/main.c:629:6: note: expected ‘struct ieee80211_if_init_conf *’ but argument is of type ‘struct ieee80211_vif *’ LD [M] acx-mac80211/acx-mac80211.o Signed-off-by: Hauke Mehrtens <ha...@ha...> --- main.c | 4 ++-- main.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 6c80479..7f6f449 100644 --- a/main.c +++ b/main.c @@ -626,7 +626,7 @@ out_unlock: return err; } -void acx_remove_interface(acx_device_t *adev, struct ieee80211_VIF *vif) +void acx_remove_interface(acx_device_t *adev, struct ieee80211_vif *vif) { if (vif->type == NL80211_IFTYPE_MONITOR) adev->vif_monitor--; @@ -647,7 +647,7 @@ void acx_op_remove_interface(struct ieee80211_hw *hw, struct ieee80211_VIF *vif) mac_vif = VIF_addr(vif); - acx_remove_interface(adev, vif); + acx_remove_interface(adev, VIF_vif(vif)); log(L_ANY, "Virtual interface removed: type=%d, MAC=%s\n", vif->type, acx_print_mac(mac, mac_vif)); diff --git a/main.h b/main.h index 3df808c..293f5c8 100644 --- a/main.h +++ b/main.h @@ -24,7 +24,7 @@ void acx_schedule_task(acx_device_t *adev, unsigned int set_flag); void acx_timer(unsigned long address); int acx_op_add_interface(struct ieee80211_hw *ieee, struct ieee80211_VIF *vif); -void acx_remove_interface(acx_device_t *adev, struct ieee80211_VIF *vif); +void acx_remove_interface(acx_device_t *adev, struct ieee80211_vif *vif); void acx_op_remove_interface(struct ieee80211_hw *hw, struct ieee80211_VIF *vif); int acx_op_config(struct ieee80211_hw *hw, u32 changed); void acx_op_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- 1.7.10.4 |