Page MenuHomeFreeBSD

D1212.diff
No OneTemporary

D1212.diff

Index: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
===================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
@@ -2605,6 +2605,12 @@
powInfo[ixlo].twicePwr54, powInfo[ixhi].twicePwr54);
}
+static uint32_t
+udiff(uint32_t u, uint32_t v)
+{
+ return (u >= v ? u - v : v - u);
+}
+
/*
* Search a list for a specified value v that is within
* EEP_DELTA of the search values. Return the closest
@@ -2639,7 +2645,7 @@
* If value is close to the current value of the list
* then target is not between values, it is one of the values
*/
- if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
+ if (udiff(lp[0] * EEP_SCALE, target) < EEP_DELTA) {
*vlo = *vhi = lp[0];
return;
}

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 6, 2:45 PM (8 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30977787
Default Alt Text
D1212.diff (818 B)

Event Timeline