Module Name: src
Committed By: martin
Date: Sat Jan 22 19:01:56 UTC 2022
Modified Files:
src/sys/dev/pci: if_bge.c
Log Message:
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)
To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/sys/dev/pci/if_bge.c
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/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.350 src/sys/dev/pci/if_bge.c:1.351
--- src/sys/dev/pci/if_bge.c:1.350 Sat Jan 22 15:10:32 2022
+++ src/sys/dev/pci/if_bge.c Sat Jan 22 19:01:56 2022
@@ -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 @@ bge_attach(device_t parent, device_t sel
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");