Skip to content

Commit

Permalink
ath9k: work around gcc ICEs (again)
Browse files Browse the repository at this point in the history
(I missed the fact that the original post said to apply this patch
twice... -- JWL)

Original commit log message:

This patch works around an internal compiler error (gcc bug #37014) in
all gcc 4.2 compilers and the gcc 4.3 series up to at least 4.3.1
on at least powerpc and mips.

Many thanks to Andrew Pinski for analyzing the gcc bug.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Adrian Bunk authored and John W. Linville committed Aug 18, 2008
1 parent 2319791 commit 88b9e2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5017,7 +5017,11 @@ static void ath9k_hw_spur_mitigate(struct ath_hal *ah,

for (i = 0; i < 123; i++) {
if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) {
if ((abs(cur_vit_mask - bin)) < 75)

/* workaround for gcc bug #37014 */
volatile int tmp = abs(cur_vit_mask - bin);

if (tmp < 75)
mask_amt = 1;
else
mask_amt = 0;
Expand Down

0 comments on commit 88b9e2b

Please sign in to comment.