summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlegacy/common.c
diff options
context:
space:
mode:
authorArnd Bergmann2015-12-09 17:42:41 +0100
committerKalle Valo2015-12-11 12:50:14 +0100
commit31ced24d88f1f8cfb420a25ddfc6eeda1a38d471 (patch)
treeb98822a0765f89e4bc3f0fd8eb40c19d4f4c6325 /drivers/net/wireless/intel/iwlegacy/common.c
parentrtlwifi: fix memory leak for USB device (diff)
downloadkernel-qcow2-linux-31ced24d88f1f8cfb420a25ddfc6eeda1a38d471.tar.gz
kernel-qcow2-linux-31ced24d88f1f8cfb420a25ddfc6eeda1a38d471.tar.xz
kernel-qcow2-linux-31ced24d88f1f8cfb420a25ddfc6eeda1a38d471.zip
iwlegacy: mark il_adjust_beacon_interval as noinline
With the new optimized do_div() code, some versions of gcc produce obviously incorrect code that leads to a link error in iwlegacy/common.o: drivers/built-in.o: In function `il_send_rxon_timing': :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN' :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod' In a few thousand randconfig builds, I have seen this problem a couple of times in this file, but never anywhere else in the kernel, so we can try to work around this in the only file that shows the behavior, by marking the il_adjust_beacon_interval function as noinline, which convinces gcc to use the unoptimized do_div() all the time. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy/common.c')
-rw-r--r--drivers/net/wireless/intel/iwlegacy/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index e49bad261a76..eb5cb603bc52 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -3602,7 +3602,7 @@ il_is_ht40_tx_allowed(struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)
}
EXPORT_SYMBOL(il_is_ht40_tx_allowed);
-static u16
+static u16 noinline
il_adjust_beacon_interval(u16 beacon_val, u16 max_beacon_val)
{
u16 new_val;