Date: Wed, 13 Jun 2018 20:33:52 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335087 - stable/11/sys/dev/si Message-ID: <201806132033.w5DKXqXs055619@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Wed Jun 13 20:33:52 2018 New Revision: 335087 URL: https://svnweb.freebsd.org/changeset/base/335087 Log: Fix build of si with base gcc on i386 Casting from rman_res_t to a pointer results in "cast to pointer from integer of different size" warnings with base gcc on i386, so use intermediate casts to uintptr_t to suppress these. Direct commit to stable/11, since si(4) has been removed from head. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D15752 Modified: stable/11/sys/dev/si/si_isa.c stable/11/sys/dev/si/si_pci.c Modified: stable/11/sys/dev/si/si_isa.c ============================================================================== --- stable/11/sys/dev/si/si_isa.c Wed Jun 13 20:25:36 2018 (r335086) +++ stable/11/sys/dev/si/si_isa.c Wed Jun 13 20:33:52 2018 (r335087) @@ -65,7 +65,7 @@ si_isa_probe(device_t dev) device_printf(dev, "cannot allocate memory resource\n"); return ENXIO; } - paddr = (caddr_t)rman_get_start(sc->sc_mem_res);/* physical */ + paddr = (caddr_t)(uintptr_t)rman_get_start(sc->sc_mem_res);/* physical */ maddr = rman_get_virtual(sc->sc_mem_res); /* in kvm */ DPRINT((0, DBG_AUTOBOOT, "si%d: probe at virtual=0x%x physical=0x%x\n", @@ -279,7 +279,7 @@ si_isa_attach(device_t dev) device_printf(dev, "couldn't map memory\n"); goto fail; } - sc->sc_paddr = (caddr_t)rman_get_start(sc->sc_mem_res); + sc->sc_paddr = (caddr_t)(uintptr_t)rman_get_start(sc->sc_mem_res); sc->sc_maddr = rman_get_virtual(sc->sc_mem_res); sc->sc_irq_rid = 0; Modified: stable/11/sys/dev/si/si_pci.c ============================================================================== --- stable/11/sys/dev/si/si_pci.c Wed Jun 13 20:25:36 2018 (r335086) +++ stable/11/sys/dev/si/si_pci.c Wed Jun 13 20:33:52 2018 (r335087) @@ -86,7 +86,7 @@ si_pci_attach(device_t dev) device_printf(dev, "couldn't map memory\n"); goto fail; } - sc->sc_paddr = (caddr_t)rman_get_start(sc->sc_mem_res); + sc->sc_paddr = (caddr_t)(uintptr_t)rman_get_start(sc->sc_mem_res); sc->sc_maddr = rman_get_virtual(sc->sc_mem_res); sc->sc_irq_rid = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806132033.w5DKXqXs055619>