Module Name:    src
Committed By:   msaitoh
Date:           Thu Aug  1 15:21:09 UTC 2019

Modified Files:
        src/sys/dev/ic: aic6915reg.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/aic6915reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/aic6915reg.h
diff -u src/sys/dev/ic/aic6915reg.h:1.5 src/sys/dev/ic/aic6915reg.h:1.6
--- src/sys/dev/ic/aic6915reg.h:1.5	Mon Apr 28 20:23:49 2008
+++ src/sys/dev/ic/aic6915reg.h	Thu Aug  1 15:21:09 2019
@@ -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 @@ struct sf_tcd {
 	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)

Reply via email to