Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Avoid changing signedness bit with << in rtsx_rea...
details: https://anonhg.NetBSD.org/src/rev/d6db7e2a9c53
branches: trunk
changeset: 967724:d6db7e2a9c53
user: kamil <kamil%NetBSD.org@localhost>
date: Thu Dec 19 16:25:13 2019 +0000
description:
Avoid changing signedness bit with << in rtsx_read_cfg()
Reported by <prlw1>
diffstat:
sys/dev/ic/rtsx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 3e5c4beddc64 -r d6db7e2a9c53 sys/dev/ic/rtsx.c
--- a/sys/dev/ic/rtsx.c Thu Dec 19 16:12:21 2019 +0000
+++ b/sys/dev/ic/rtsx.c Thu Dec 19 16:25:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsx.c,v 1.3 2018/04/24 18:34:30 maya Exp $ */
+/* $NetBSD: rtsx.c,v 1.4 2019/12/19 16:25:13 kamil Exp $ */
/* $OpenBSD: rtsx.c,v 1.10 2014/08/19 17:55:03 phessler Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsx.c,v 1.3 2018/04/24 18:34:30 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsx.c,v 1.4 2019/12/19 16:25:13 kamil Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -1044,7 +1044,7 @@
RTSX_READ(sc, RTSX_CFGDATA1, &data1);
RTSX_READ(sc, RTSX_CFGDATA2, &data2);
RTSX_READ(sc, RTSX_CFGDATA3, &data3);
- *val = (data3 << 24) | (data2 << 16) | (data1 << 8) | data0;
+ *val = ((uint32_t)data3 << 24) | (data2 << 16) | (data1 << 8) | data0;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index