Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Use unsigned to avoid undefined behavior i...
details: https://anonhg.NetBSD.org/src/rev/b391d41f16e9
branches: trunk
changeset: 973248:b391d41f16e9
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Jun 25 06:45:10 2020 +0000
description:
Use unsigned to avoid undefined behavior in ixgbe_fc_enable_generic().
Same as ixgbe_common.c rev. 1.24. Found by KUBSan.
diffstat:
sys/dev/pci/ixgbe/ixgbe_82598.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r cc9a48d0ed89 -r b391d41f16e9 sys/dev/pci/ixgbe/ixgbe_82598.c
--- a/sys/dev/pci/ixgbe/ixgbe_82598.c Thu Jun 25 02:59:20 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_82598.c Thu Jun 25 06:45:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82598.c,v 1.14 2020/01/03 12:59:46 pgoyette Exp $ */
+/* $NetBSD: ixgbe_82598.c,v 1.15 2020/06/25 06:45:10 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -538,7 +538,7 @@
}
/* Configure pause time (2 TCs per register) */
- reg = hw->fc.pause_time * 0x00010001;
+ reg = (u32)hw->fc.pause_time * 0x00010001;
for (i = 0; i < (IXGBE_DCB_MAX_TRAFFIC_CLASS / 2); i++)
IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), reg);
Home |
Main Index |
Thread Index |
Old Index