freebsd-dev/sys/dev/ath/ath_hal
Dimitry Andric d41b89cca5 Fix the following -Werror warning from clang 3.5.0, while building the
ath kernel module:

sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
                    ^
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
1 error generated.

This warning occurs because both lp[0] and target are unsigned, so the
subtraction expression is also unsigned, and calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by:	adrian
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1212
2014-11-23 18:31:55 +00:00
..
ah_regdomain PicoStation M2HP presents reg domain 0x2a which is not found in atheros or linux 2014-02-23 18:07:17 +00:00
ar5210 Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ar5211 Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ar5212 Fix the following -Werror warning from clang 3.5.0, while building the 2014-11-23 18:31:55 +00:00
ar5312 Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ar5416 Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ar9001 Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ar9002 Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ar9003 Add device identification and probe/attach support for the QCA9565. 2013-05-02 00:59:39 +00:00
ah_debug.h HAL additions to enable MCI Bluetooth coexistence in the AR9300 HAL. 2013-04-05 07:41:47 +00:00
ah_decode.h Add two new debug mark entries for chip power configuration. 2014-08-09 09:13:10 +00:00
ah_desc.h Document the AR9285/AR9485 LNA configuration information that's 2013-06-05 00:39:20 +00:00
ah_devid.h Add Atheros AR1111 support to the HAL. 2014-05-05 07:58:05 +00:00
ah_diagcodes.h Add some more diagnostic codes. 2012-08-24 00:17:39 +00:00
ah_eeprom_9287.c Move this magic check to only occur if no eeprom data is given. 2012-08-26 04:26:49 +00:00
ah_eeprom_9287.h
ah_eeprom_v1.c
ah_eeprom_v1.h
ah_eeprom_v3.c
ah_eeprom_v3.h
ah_eeprom_v4k.c "Upgrade" the AR9285 code to support PCI/ART EEPROM on flash. 2012-04-20 21:56:13 +00:00
ah_eeprom_v4k.h
ah_eeprom_v14.c Introduce the FRAC_5G EEPROM parameter. 2011-07-30 13:45:12 +00:00
ah_eeprom_v14.h Introduce the FRAC_5G EEPROM parameter. 2011-07-30 13:45:12 +00:00
ah_eeprom.h Bring over some new EEPROM regulatory domain flags. 2012-08-24 01:14:00 +00:00
ah_internal.h Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ah_regdomain.c PicoStation M2HP presents reg domain 0x2a which is not found in atheros or linux 2014-02-23 18:07:17 +00:00
ah_regdomain.h
ah_soc.h
ah.c Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
ah.h Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00