From d73c7038bae241b9d756a5bc4d21b09f31859771 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 26 Aug 2007 12:06:51 +0000 Subject: [PATCH] This patch changes all occurences of (working) %Lx to (standards conformant, working) %llx in printk/printf. While I'm at it, affected lines with 271 characters can be broken into smaller chunks. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Uwe Hermann git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@479 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/linuxbios_table.c | 2 +- device/device.c | 14 +++++++++++--- device/device_util.c | 8 ++++---- device/pci_device.c | 8 ++++---- device/pnp_device.c | 2 +- lib/elfboot.c | 4 ++-- northbridge/intel/i440bxemulation/i440bx.c | 2 +- 7 files changed, 24 insertions(+), 16 deletions(-) diff --git a/arch/x86/linuxbios_table.c b/arch/x86/linuxbios_table.c index 9bfa3f4081..9ed2d7f42b 100644 --- a/arch/x86/linuxbios_table.c +++ b/arch/x86/linuxbios_table.c @@ -177,7 +177,7 @@ static void lb_memory_range(struct lb_memory *mem, { int entries; - printk(BIOS_DEBUG, "%s: start 0x%Lx size 0x%Lx\n", + printk(BIOS_DEBUG, "%s: start 0x%llx size 0x%llx\n", __func__, start, size); entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); diff --git a/device/device.c b/device/device.c index 5e373d7f0e..1cff9c40ce 100644 --- a/device/device.c +++ b/device/device.c @@ -402,7 +402,11 @@ void compute_allocate_resource(struct bus *bus, struct resource *bridge, min_align = 0; base = bridge->base; - printk(BIOS_SPEW, "%s compute_allocate_%s: base: %08Lx size: %08Lx align: %d gran: %d\n", dev_path(bus->dev), (bridge->flags & IORESOURCE_IO) ? "io" : (bridge->flags & IORESOURCE_PREFETCH) ? "prefmem" : "mem", base, bridge->size, bridge->align, bridge->gran); + printk(BIOS_SPEW, + "%s compute_allocate_%s: base: %08llx size: %08llx align: %d gran: %d\n", + dev_path(bus->dev), + (bridge->flags & IORESOURCE_IO) ? "io" : (bridge->flags & IORESOURCE_PREFETCH) ? "prefmem" : "mem", + base, bridge->size, bridge->align, bridge->gran); /* We want different minimum alignments for different kinds of * resources. These minimums are not device type specific but @@ -485,7 +489,7 @@ void compute_allocate_resource(struct bus *bus, struct resource *bridge, base += size; printk(BIOS_SPEW, - "%s %02lx * [0x%08Lx - 0x%08Lx] %s\n", + "%s %02lx * [0x%08llx - 0x%08llx] %s\n", dev_path(dev), resource->index, resource->base, @@ -503,7 +507,11 @@ void compute_allocate_resource(struct bus *bus, struct resource *bridge, */ bridge->size = align_up(base, bridge->gran) - bridge->base; - printk(BIOS_SPEW, "%s compute_allocate_%s: base: %08Lx size: %08Lx align: %d gran: %d done\n", dev_path(bus->dev), (bridge->flags & IORESOURCE_IO) ? "io" : (bridge->flags & IORESOURCE_PREFETCH) ? "prefmem" : "mem", base, bridge->size, bridge->align, bridge->gran); + printk(BIOS_SPEW, + "%s compute_allocate_%s: base: %08llx size: %08llx align: %d gran: %d done\n", + dev_path(bus->dev), + (bridge->flags & IORESOURCE_IO) ? "io" : (bridge->flags & IORESOURCE_PREFETCH) ? "prefmem" : "mem", + base, bridge->size, bridge->align, bridge->gran); } #if defined(CONFIG_PCI_OPTION_ROM_RUN) && CONFIG_PCI_OPTION_ROM_RUN == 1 diff --git a/device/device_util.c b/device/device_util.c index 0436873ae7..3951e64544 100644 --- a/device/device_util.c +++ b/device/device_util.c @@ -229,7 +229,7 @@ const char *dev_id_string(struct device_id *id) memcpy(buffer, "Root Device", 12); break; case DEVICE_ID_PCI: - sprintf(buffer, "PCI: %02x:%02x", id->u.pci.vendor, + sprintf(buffer, "PCI: %04x:%04x", id->u.pci.vendor, id->u.pci.device); break; case DEVICE_ID_PNP: @@ -243,7 +243,7 @@ const char *dev_id_string(struct device_id *id) id->u.apic.device); break; case DEVICE_ID_PCI_DOMAIN: - sprintf(buffer, "PCI_DOMAIN: %02x:%02x", + sprintf(buffer, "PCI_DOMAIN: %04x:%04x", id->u.pci_domain.vendor, id->u.pci_domain.device); break; @@ -602,7 +602,7 @@ void report_resource_stored(struct device *dev, struct resource *resource, #endif } printk(BIOS_DEBUG, - "%s %02lx <- [0x%010Lx - 0x%010Lx] %s%s%s\n", + "%s %02lx <- [0x%010llx - 0x%010llx] %s%s%s\n", dev_path(dev), resource->index, base, end, buf, resource_type(resource), comment); @@ -656,7 +656,7 @@ void search_global_resources(unsigned long type_mask, unsigned long type, for (i = 0; i < curdev->resources; i++) { struct resource *resource = &curdev->resource[i]; printk(BIOS_SPEW, - "%s: dev %s, resource %d, flags %lx base 0x%Lx size 0x%Lx\n", + "%s: dev %s, resource %d, flags %lx base 0x%llx size 0x%llx\n", __func__, curdev->dtsname, i, resource->flags, resource->base, resource->size); /* If it isn't the right kind of resource ignore it. */ diff --git a/device/pci_device.c b/device/pci_device.c index 7f1b3696f7..2b09e3301f 100644 --- a/device/pci_device.c +++ b/device/pci_device.c @@ -252,10 +252,10 @@ struct resource *pci_get_resource(struct device *dev, unsigned long index) printk(BIOS_DEBUG, "%s %02x ->", dev_path(dev), resource->index); printk(BIOS_DEBUG, - " value: 0x%08Lx zeroes: 0x%08Lx ones: 0x%08Lx attr: %08lx\n", + " value: 0x%08llx zeroes: 0x%08llx ones: 0x%08llx attr: %08lx\n", value, zeroes, ones, attr); printk(BIOS_DEBUG, - "%s %02x -> size: 0x%08Lx max: 0x%08Lx %s\n ", + "%s %02x -> size: 0x%08llx max: 0x%08llx %s\n ", dev_path(dev), resource->index, resource->size, resource->limit, resource_type(resource)); } @@ -456,7 +456,7 @@ static void pci_set_resource(struct device *dev, struct resource *resource) /* Make certain the resource has actually been set. */ if (!(resource->flags & IORESOURCE_ASSIGNED)) { printk(BIOS_ERR, - "ERROR: %s %02lx %s size: 0x%010Lx not assigned\n", + "ERROR: %s %02lx %s size: 0x%010llx not assigned\n", dev_path(dev), resource->index, resource_type(resource), resource->size); return; @@ -863,7 +863,7 @@ static struct device *pci_scan_get_dev(struct device **list, unsigned int devfn) (*list)->path.type); continue; } - printk(BIOS_SPEW, "%s: check dev %s it has devfn 0x%x\n", + printk(BIOS_SPEW, "%s: check dev %s it has devfn 0x%02x\n", __func__, (*list)->dtsname, (*list)->path.u.pci.devfn); if ((*list)->path.u.pci.devfn == devfn) { /* Unlink from the list. */ diff --git a/device/pnp_device.c b/device/pnp_device.c index ff00fb9502..5c644277c9 100644 --- a/device/pnp_device.c +++ b/device/pnp_device.c @@ -87,7 +87,7 @@ static void pnp_set_resource(struct device *dev, struct resource *resource) { if (!(resource->flags & IORESOURCE_ASSIGNED)) { printk(BIOS_ERR, - "ERROR: %s %02lx %s size: 0x%010Lx not assigned\n", + "ERROR: %s %02lx %s size: 0x%010llx not assigned\n", dev_path(dev), resource->index, resource_type(resource), resource->size); return; diff --git a/lib/elfboot.c b/lib/elfboot.c index dd372614b3..bdb48f5b23 100644 --- a/lib/elfboot.c +++ b/lib/elfboot.c @@ -61,7 +61,7 @@ static int valid_area(struct lb_memory *mem, } if (i == mem_entries) { printk(BIOS_ERR, "No matching RAM area found for range:\n"); - printk(BIOS_ERR, " [0x%016Lx, 0x%016Lx)\n", start, end); + printk(BIOS_ERR, " [0x%016llx, 0x%016llx)\n", start, end); printk(BIOS_ERR, "RAM areas\n"); for(i = 0; i < mem_entries; i++) { u64 mstart, mend; @@ -69,7 +69,7 @@ static int valid_area(struct lb_memory *mem, mtype = mem->map[i].type; mstart = unpack_lb64(mem->map[i].start); mend = mstart + unpack_lb64(mem->map[i].size); - printk(BIOS_ERR, " [0x%016Lx, 0x%016Lx) %s\n", + printk(BIOS_ERR, " [0x%016llx, 0x%016llx) %s\n", mstart, mend, (mtype == LB_MEM_RAM)?"RAM":"Reserved"); } diff --git a/northbridge/intel/i440bxemulation/i440bx.c b/northbridge/intel/i440bxemulation/i440bx.c index bd4f29c4c8..9bb0d62ffd 100644 --- a/northbridge/intel/i440bxemulation/i440bx.c +++ b/northbridge/intel/i440bxemulation/i440bx.c @@ -79,7 +79,7 @@ static void ram_resource(struct device *dev, unsigned long index, resource->size = ((resource_t) sizek) << 10; resource->flags = IORESOURCE_MEM | IORESOURCE_CACHEABLE | IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; - printk(BIOS_DEBUG, "%s: add ram resoource %Ld bytes\n", __func__, + printk(BIOS_DEBUG, "%s: add ram resource %lld bytes\n", __func__, resource->size); }