svn commit: r335289 - in stable: 10/sys/dev/bxe 11/sys/dev/bxe

Dimitry Andric dim at FreeBSD.org
Sun Jun 17 17:28:28 UTC 2018


Author: dim
Date: Sun Jun 17 17:28:27 2018
New Revision: 335289
URL: https://svnweb.freebsd.org/changeset/base/335289

Log:
  MFC r334948:
  
  Fix build of bxe 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 print
  these without casting.  The kva field of struct bxe_bar is of type
  vm_offset_t, which can be 32 or 64 bit, so cast it to uintmax_t before
  printing.
  
  Reviewed by:	markj
  Differential Revision: https://reviews.freebsd.org/D15733

Modified:
  stable/11/sys/dev/bxe/bxe.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/bxe/bxe.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/sys/dev/bxe/bxe.c
==============================================================================
--- stable/11/sys/dev/bxe/bxe.c	Sun Jun 17 17:24:57 2018	(r335288)
+++ stable/11/sys/dev/bxe/bxe.c	Sun Jun 17 17:28:27 2018	(r335289)
@@ -12819,12 +12819,12 @@ bxe_allocate_bars(struct bxe_softc *sc)
         sc->bar[i].handle = rman_get_bushandle(sc->bar[i].resource);
         sc->bar[i].kva    = (vm_offset_t)rman_get_virtual(sc->bar[i].resource);
 
-        BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %p-%p (%jd) -> %p\n",
+        BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %#jx-%#jx (%jd) -> %#jx\n",
               i, PCIR_BAR(i),
-              (void *)rman_get_start(sc->bar[i].resource),
-              (void *)rman_get_end(sc->bar[i].resource),
+              rman_get_start(sc->bar[i].resource),
+              rman_get_end(sc->bar[i].resource),
               rman_get_size(sc->bar[i].resource),
-              (void *)sc->bar[i].kva);
+              (uintmax_t)sc->bar[i].kva);
     }
 
     return (0);


More information about the svn-src-stable-11 mailing list