Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b08cbcd4 authored by Adrian Bunk's avatar Adrian Bunk Committed by John W. Linville
Browse files

ath9k: work around gcc ICEs



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: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f078f209
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4801,7 +4801,11 @@ static void ath9k_hw_9280_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;