[coreboot] New patch to review for coreboot: 0f446f7 printf: Remove some L modifier uses

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Sun Mar 11 20:48:54 CET 2012


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/781

-gerrit

commit 0f446f71c39bd8bff9a399826e584a2863217ca7
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Sun Mar 11 19:31:03 2012 +0100

    printf: Remove some L modifier uses
    
    We use the L modifier in a non-standard way (for
    long long instead of long double, which we have no
    business with).
    clang complains, to reduce its use, to make
    emulation/qemu-x86 happier.
    Long term, we should consider eliminating public uses
    of 'L' (but internal use in vtxprintf to denote
    long long is fine)
    
    Change-Id: If9a17d9ae9925cdc8736445e7d5eedc59c7028c6
    Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
 src/devices/device.c      |    8 ++++----
 src/devices/device_util.c |    4 ++--
 src/devices/pnp_device.c  |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/devices/device.c b/src/devices/device.c
index a2619bf..0d2bf8f 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -322,7 +322,7 @@ static void compute_resources(struct bus *bus, struct resource *bridge,
 		    (resource->flags & IORESOURCE_ASSIGNED)) {
 			printk(BIOS_ERR,
 			       "Resource limit looks wrong! (no APIC?)\n");
-			printk(BIOS_ERR, "%s %02lx limit %08Lx\n",
+			printk(BIOS_ERR, "%s %02lx limit %08llx\n",
 			       dev_path(dev), resource->index, resource->limit);
 		}
 
@@ -627,7 +627,7 @@ static void avoid_fixed_resources(struct device *dev)
 	for (res = dev->resource_list; res; res = res->next) {
 		if ((res->flags & IORESOURCE_FIXED))
 			continue;
-		printk(BIOS_SPEW, "%s:@%s %02lx limit %08Lx\n", __func__,
+		printk(BIOS_SPEW, "%s:@%s %02lx limit %08llx\n", __func__,
 		       dev_path(dev), res->index, res->limit);
 		if ((res->flags & MEM_MASK) == PREF_TYPE &&
 		    (res->limit < limits.pref.limit))
@@ -660,9 +660,9 @@ static void avoid_fixed_resources(struct device *dev)
 		else
 			continue;
 
-		printk(BIOS_SPEW, "%s2: %s@%02lx limit %08Lx\n", __func__,
+		printk(BIOS_SPEW, "%s2: %s@%02lx limit %08llx\n", __func__,
 			     dev_path(dev), res->index, res->limit);
-		printk(BIOS_SPEW, "\tlim->base %08Lx lim->limit %08Lx\n",
+		printk(BIOS_SPEW, "\tlim->base %08llx lim->limit %08llx\n",
 			     lim->base, lim->limit);
 
 		/* Is the resource outside the limits? */
diff --git a/src/devices/device_util.c b/src/devices/device_util.c
index 5b182e1..526490a 100644
--- a/src/devices/device_util.c
+++ b/src/devices/device_util.c
@@ -571,7 +571,7 @@ void report_resource_stored(device_t dev, struct resource *resource,
 		sprintf(buf, "bus %02x ", dev->link_list->secondary);
 #endif
 	}
-	printk(BIOS_DEBUG, "%s %02lx <- [0x%010Lx - 0x%010Lx] size 0x%08Lx "
+	printk(BIOS_DEBUG, "%s %02lx <- [0x%010llx - 0x%010llx] size 0x%08llx "
 	       "gran 0x%02x %s%s%s\n", dev_path(dev), resource->index,
 		base, end, resource->size, resource->gran, buf,
 		resource_type(resource), comment);
@@ -786,7 +786,7 @@ void show_one_resource(int debug_level, struct device *dev,
 */
 
 	do_printk(debug_level, "%s %02lx <- [0x%010llx - 0x%010llx] "
-		  "size 0x%08Lx gran 0x%02x %s%s%s\n", dev_path(dev),
+		  "size 0x%08llx gran 0x%02x %s%s%s\n", dev_path(dev),
 		  resource->index, base, end, resource->size, resource->gran,
 		  buf, resource_type(resource), comment);
 }
diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c
index a6d428a..fb6c9d6 100644
--- a/src/devices/pnp_device.c
+++ b/src/devices/pnp_device.c
@@ -107,7 +107,7 @@ void pnp_read_resources(device_t dev)
 static void pnp_set_resource(device_t dev, struct resource *resource)
 {
 	if (!(resource->flags & IORESOURCE_ASSIGNED)) {
-		printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010Lx "
+		printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx "
 		       "not assigned\n", dev_path(dev), resource->index,
 		       resource_type(resource), resource->size);
 		return;




More information about the coreboot mailing list