Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Use unsinged when initialize the transmit complet...



details:   https://anonhg.NetBSD.org/src/rev/ae57909cae21
branches:  trunk
changeset: 458578:ae57909cae21
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Aug 01 15:21:09 2019 +0000

description:
Use unsinged when initialize the transmit completion ring to avoid undefined
behavior. Found by kUBSan.

diffstat:

 sys/dev/ic/aic6915reg.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 5bb412042822 -r ae57909cae21 sys/dev/ic/aic6915reg.h
--- a/sys/dev/ic/aic6915reg.h   Thu Aug 01 14:28:33 2019 +0000
+++ b/sys/dev/ic/aic6915reg.h   Thu Aug 01 15:21:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic6915reg.h,v 1.5 2008/04/28 20:23:49 martin Exp $    */
+/*     $NetBSD: aic6915reg.h,v 1.6 2019/08/01 15:21:09 msaitoh Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -194,7 +194,7 @@
        uint32_t        tcd_word0;      /* index, priority, flags */
 };
 
-#define        TCD_DMA_ID              (0x4 << 29)
+#define        TCD_DMA_ID              (0x4U << 29)
 #define        TCD_INDEX(x)            ((x) & 0x7fff)
 #define        TCD_PR                  (1U << 15)
 #define        TCD_TIMESTAMP(x)        (((x) >> 16) & 0x1fff)



Home | Main Index | Thread Index | Old Index