freebsd-dev/sys/dev/ath
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
..
ath_dfs/null The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
ath_hal Fix the following -Werror warning from clang 3.5.0, while building the 2014-11-23 18:31:55 +00:00
ath_rate The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
ah_osdep.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
ah_osdep.h Migrate the ath_hal_filltxdesc() API to take a list of buffer/seglen values. 2012-08-05 10:12:27 +00:00
if_ath_ahb.c Remove ia64. 2014-07-07 00:27:09 +00:00
if_ath_alq.c Support sending ATH_ALQ messages with no payload. 2013-05-13 21:17:27 +00:00
if_ath_alq.h Add ALQ beacon debugging. 2013-05-13 21:18:00 +00:00
if_ath_beacon.c Shut down RX before TX - in theory, this should make the chip less likely 2014-08-23 18:55:51 +00:00
if_ath_beacon.h Bring over some initial power save management support, reset path 2014-04-30 02:19:41 +00:00
if_ath_btcoex.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
if_ath_btcoex.h Bring over the initial static bluetooth coexistence configuration 2013-06-07 09:02:02 +00:00
if_ath_debug.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
if_ath_debug.h Bring over some initial power save management support, reset path 2014-04-30 02:19:41 +00:00
if_ath_keycache.c Bring over some initial power save management support, reset path 2014-04-30 02:19:41 +00:00
if_ath_keycache.h
if_ath_led.c Bring over some initial power save management support, reset path 2014-04-30 02:19:41 +00:00
if_ath_led.h
if_ath_lna_div.c Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
if_ath_lna_div.h Initial AR9485/AR933x 1x1 LNA diversity work. 2013-06-14 03:42:10 +00:00
if_ath_misc.h Add tracking for self-generated frames when the VAP is in sleep state. 2014-05-02 00:48:09 +00:00
if_ath_pci_devlist.h Add a missing file from the last commit. 2014-09-30 05:50:34 +00:00
if_ath_pci.c Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00
if_ath_rx_edma.c Fix up the EDMA RX setup path to correctly initialise and reset the RX FIFO. 2014-09-20 01:22:17 +00:00
if_ath_rx_edma.h Begin abstracting out the RX path in preparation for RX EDMA support. 2012-07-03 06:59:12 +00:00
if_ath_rx.c Mechanically convert to if_inc_counter(). 2014-09-18 20:47:39 +00:00
if_ath_rx.h Fix the busdma logic to work with EDMA chipsets when using bounce 2013-04-04 08:21:56 +00:00
if_ath_spectral.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
if_ath_spectral.h Add a new (skeleton) spectral mode manager module. 2013-01-02 03:59:02 +00:00
if_ath_sysctl.c Modify the RX path to keep the previous RX descriptor around once it's 2014-05-06 01:15:42 +00:00
if_ath_sysctl.h
if_ath_tdma.c Add casts to have it compile on amd64 without complaining about 2014-05-07 19:07:45 +00:00
if_ath_tdma.h Migrate the TDMA management functions out of if_ath.c into if_ath_tdma.c. 2012-05-20 02:49:42 +00:00
if_ath_tsf.h Migrate the bulk of the RX routines out from if_ath.c to if_ath_rx.[ch]. 2012-05-20 02:05:10 +00:00
if_ath_tx_edma.c Quieten the RX/TX descriptor and FIFO setup debugging. 2014-05-05 08:00:50 +00:00
if_ath_tx_edma.h Begin separating out the TX DMA setup in preparation for TX EDMA support. 2012-07-23 03:52:18 +00:00
if_ath_tx_ht.c Implement my first cut at "correct" node power-save and 2013-05-15 18:33:05 +00:00
if_ath_tx_ht.h Implement my first cut at "correct" node power-save and 2013-05-15 18:33:05 +00:00
if_ath_tx.c Mechanically convert to if_inc_counter(). 2014-09-18 20:47:39 +00:00
if_ath_tx.h Implement a separate hardware queue threshold for aggregate and non-aggr 2013-05-21 18:13:57 +00:00
if_ath.c Convert the callouts back to using mutexes. 2014-11-15 01:18:49 +00:00
if_athdfs.h Add a method to explicitly disable radar reporting if required. 2013-01-02 01:36:10 +00:00
if_athioctl.h Implement my first cut at "correct" node power-save and 2013-05-15 18:33:05 +00:00
if_athrate.h Update the rate series setup code to use the decisions already made in 2013-04-17 07:21:30 +00:00
if_athvar.h Add initial support for the AR9485 CUS198 / CUS230 variants. 2014-09-30 03:19:29 +00:00