Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Cast to make up for the difference in type betwe...



details:   https://anonhg.NetBSD.org/src/rev/b32726a50131
branches:  trunk
changeset: 969695:b32726a50131
user:      sevan <sevan%NetBSD.org@localhost>
date:      Thu Feb 27 23:15:34 2020 +0000

description:
Cast to make up for the difference in type between our bus_dma_map(9) and
theirs. Where we expect kvap to be of void **, they expect caddr_t (typedef char *).

diffstat:

 sys/dev/pci/if_rge.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 9a8511c582b3 -r b32726a50131 sys/dev/pci/if_rge.c
--- a/sys/dev/pci/if_rge.c      Thu Feb 27 22:58:57 2020 +0000
+++ b/sys/dev/pci/if_rge.c      Thu Feb 27 23:15:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_rge.c,v 1.7 2020/02/27 22:58:57 sevan Exp $ */
+/*     $NetBSD: if_rge.c,v 1.8 2020/02/27 23:15:34 sevan Exp $ */
 /*     $OpenBSD: if_rge.c,v 1.2 2020/01/02 09:00:45 kevlo Exp $        */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.7 2020/02/27 22:58:57 sevan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.8 2020/02/27 23:15:34 sevan Exp $");
 
 /* #include "vlan.h" Sevan */
 
@@ -968,7 +968,7 @@
        /* Load the map for the TX ring. */
        error = bus_dmamem_map(sc->sc_dmat, &sc->rge_ldata.rge_tx_listseg,
            sc->rge_ldata.rge_tx_listnseg, RGE_TX_LIST_SZ,
-           &sc->rge_ldata.rge_tx_list,
+           (void **) &sc->rge_ldata.rge_tx_list,
            BUS_DMA_NOWAIT); /* XXX OpenBSD adds BUS_DMA_COHERENT */
        if (error) {
                printf("%s: can't map TX dma buffers\n", sc->sc_dev.dv_xname);
@@ -1018,7 +1018,7 @@
        /* Load the map for the RX ring. */
        error = bus_dmamem_map(sc->sc_dmat, &sc->rge_ldata.rge_rx_listseg,
            sc->rge_ldata.rge_rx_listnseg, RGE_RX_LIST_SZ,
-           &sc->rge_ldata.rge_rx_list,
+           (void **) &sc->rge_ldata.rge_rx_list,
            BUS_DMA_NOWAIT);  /* XXX OpenBSD adds BUS_DMA_COHERENT */
        if (error) {
                printf("%s: can't map RX dma buffers\n", sc->sc_dev.dv_xname);



Home | Main Index | Thread Index | Old Index