Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Explicitly cast a 40-bit mask to bus_addr_t in a...
details: https://anonhg.NetBSD.org/src/rev/8604c8751993
branches: trunk
changeset: 359789:8604c8751993
user: martin <martin%NetBSD.org@localhost>
date: Sat Jan 22 19:01:56 2022 +0000
description:
Explicitly cast a 40-bit mask to bus_addr_t in a dead branch (gcc apparently
is not clever enough and warns about the truncation)
diffstat:
sys/dev/pci/if_bge.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 740cad7dc6b2 -r 8604c8751993 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Sat Jan 22 18:59:23 2022 +0000
+++ b/sys/dev/pci/if_bge.c Sat Jan 22 19:01:56 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.350 2022/01/22 15:10:32 skrll Exp $ */
+/* $NetBSD: if_bge.c,v 1.351 2022/01/22 19:01:56 martin Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.350 2022/01/22 15:10:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.351 2022/01/22 19:01:56 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -3735,8 +3735,9 @@
if ((sc->bge_flags & BGEF_40BIT_BUG) != 0) {
bus_dma_tag_t olddmatag = sc->bge_dmatag; /* save */
- if (bus_dmatag_subregion(olddmatag, 0, __MASK(40),
- &(sc->bge_dmatag), BUS_DMA_NOWAIT) != 0) {
+ if (bus_dmatag_subregion(olddmatag, 0,
+ (bus_addr_t)__MASK(40),
+ &(sc->bge_dmatag), BUS_DMA_NOWAIT) != 0) {
aprint_error_dev(self,
"WARNING: failed to restrict dma range,"
" falling back to parent bus dma range\n");
Home |
Main Index |
Thread Index |
Old Index