Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Add explicit casts in bus_dmatag_subregion() cal...
details: https://anonhg.NetBSD.org/src/rev/d8ac481d172f
branches: trunk
changeset: 849423:d8ac481d172f
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Mar 01 16:31:01 2020 +0000
description:
Add explicit casts in bus_dmatag_subregion() calls to avoid overflow /
truncation warnings on 32-bit platforms.
diffstat:
sys/dev/pci/if_nfe.c | 6 +++---
sys/dev/pci/if_stge.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r c9f2b64752f8 -r d8ac481d172f sys/dev/pci/if_nfe.c
--- a/sys/dev/pci/if_nfe.c Sun Mar 01 15:54:18 2020 +0000
+++ b/sys/dev/pci/if_nfe.c Sun Mar 01 16:31:01 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_nfe.c,v 1.75 2020/03/01 15:43:58 thorpej Exp $ */
+/* $NetBSD: if_nfe.c,v 1.76 2020/03/01 16:31:01 thorpej Exp $ */
/* $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $ */
/*-
@@ -21,7 +21,7 @@
/* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.75 2020/03/01 15:43:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.76 2020/03/01 16:31:01 thorpej Exp $");
#include "opt_inet.h"
#include "vlan.h"
@@ -324,7 +324,7 @@
if (pci_dma64_available(pa) && (sc->sc_flags & NFE_40BIT_ADDR) != 0) {
if (bus_dmatag_subregion(pa->pa_dmat64,
0,
- (1ULL << 40),
+ (bus_addr_t)(1ULL << 40),
&sc->sc_dmat,
BUS_DMA_WAITOK) != 0) {
aprint_error_dev(self,
diff -r c9f2b64752f8 -r d8ac481d172f sys/dev/pci/if_stge.c
--- a/sys/dev/pci/if_stge.c Sun Mar 01 15:54:18 2020 +0000
+++ b/sys/dev/pci/if_stge.c Sun Mar 01 16:31:01 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_stge.c,v 1.81 2020/03/01 15:46:32 thorpej Exp $ */
+/* $NetBSD: if_stge.c,v 1.82 2020/03/01 16:31:01 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.81 2020/03/01 15:46:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.82 2020/03/01 16:31:01 thorpej Exp $");
#include <sys/param.h>
@@ -450,7 +450,7 @@
if (pci_dma64_available(pa)) {
if (bus_dmatag_subregion(pa->pa_dmat64,
0,
- FRAG_ADDR_MASK + 1ULL,
+ (bus_addr_t)(FRAG_ADDR_MASK + 1ULL),
&sc->sc_dmat,
BUS_DMA_WAITOK) != 0) {
aprint_error_dev(self,
Home |
Main Index |
Thread Index |
Old Index