Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jun 2020 06:21:01 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r362295 - head/sys/dev/pci
Message-ID:  <202006180621.05I6L1IR015017@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Thu Jun 18 06:21:00 2020
New Revision: 362295
URL: https://svnweb.freebsd.org/changeset/base/362295

Log:
  Stop assuming we can print rman_res_t with %lx
  
  This is not the case on armv6 and armv7, where we also build this driver.
  Fix by casting through uintmax_t and using %jx.
  
  Sponsored by:	Innovate UK

Modified:
  head/sys/dev/pci/pci_host_generic.c

Modified: head/sys/dev/pci/pci_host_generic.c
==============================================================================
--- head/sys/dev/pci/pci_host_generic.c	Thu Jun 18 06:12:06 2020	(r362294)
+++ head/sys/dev/pci/pci_host_generic.c	Thu Jun 18 06:21:00 2020	(r362295)
@@ -386,9 +386,10 @@ pci_host_generic_core_alloc_resource(device_t dev, dev
 		}
 		if (!found) {
 			device_printf(dev,
-			    "Failed to allocate %s resource %lx-%lx for %s\n",
+			    "Failed to allocate %s resource %jx-%jx for %s\n",
 			    type == SYS_RES_IOPORT ? "IOPORT" : "MEMORY",
-			    start, end, device_get_nameunit(child));
+			    (uintmax_t)start, (uintmax_t)end,
+			    device_get_nameunit(child));
 			return (NULL);
 		}
 		break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006180621.05I6L1IR015017>