Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/isc/atheros_hal/dist/ar5210 Replace left shifts...
details: https://anonhg.NetBSD.org/src/rev/fb5201ae1bdc
branches: trunk
changeset: 811956:fb5201ae1bdc
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Nov 23 23:46:33 2015 +0000
description:
Replace left shifts of negative values with appropiate unsigned values.
diffstat:
sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r 4456e8e826b1 -r fb5201ae1bdc sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c
--- a/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c Mon Nov 23 23:45:44 2015 +0000
+++ b/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c Mon Nov 23 23:46:33 2015 +0000
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ar5210_reset.c,v 1.5 2011/03/07 11:25:42 cegger Exp $
+ * $Id: ar5210_reset.c,v 1.6 2015/11/23 23:46:33 joerg Exp $
*/
#include "opt_ah.h"
@@ -500,11 +500,11 @@
reg9868 = OS_REG_READ(ah, 0x9868);
OS_REG_WRITE(ah, 0x9858, (reg9858 & ~FIRPWR_M) |
- ((-1 << FIRPWR_S) & FIRPWR_M));
+ ((~0U << FIRPWR_S) & FIRPWR_M));
OS_REG_WRITE(ah, 0x985c,
(reg985c & ~(KCOARSEHIGH_M | KCOARSELOW_M)) |
- ((-1 << KCOARSEHIGH_S) & KCOARSEHIGH_M) |
- ((-127 << KCOARSELOW_S) & KCOARSELOW_M));
+ ((~0U << KCOARSEHIGH_S) & KCOARSEHIGH_M) |
+ ((((~0U << 7) + 1) << KCOARSELOW_S)) & KCOARSELOW_M));
OS_REG_WRITE(ah, 0x9868,
(reg9868 & ~(ADCSAT_ICOUNT_M | ADCSAT_THRESH_M)) |
((2 << ADCSAT_ICOUNT_S) & ADCSAT_ICOUNT_M) |
Home |
Main Index |
Thread Index |
Old Index