Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151039927
D1212.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
818 B
Referenced Files
None
Subscribers
None
D1212.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D1212: Fix clang 3.5.0 warning in ath's ar5212_reset.c
Attached
Detach File
Event Timeline
Log In to Comment