[LinuxBIOS] [PATCH] v3: printk: change %L to %ll

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Aug 24 04:09:53 CEST 2007


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 <c-d.hailfinger.devel.2006 at gmx.net>

Index: device/device.c
===================================================================
--- device/device.c	(Revision 476)
+++ device/device.c	(Arbeitskopie)
@@ -402,7 +402,11 @@
 	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 @@
 			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 @@
 	 */
 	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
Index: device/pnp_device.c
===================================================================
--- device/pnp_device.c	(Revision 476)
+++ device/pnp_device.c	(Arbeitskopie)
@@ -87,7 +87,7 @@
 {
 	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;
Index: device/pci_device.c
===================================================================
--- device/pci_device.c	(Revision 476)
+++ device/pci_device.c	(Arbeitskopie)
@@ -252,10 +252,10 @@
 		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 @@
 	/* 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 @@
 			       (*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. */
Index: device/device_util.c
===================================================================
--- device/device_util.c	(Revision 476)
+++ device/device_util.c	(Arbeitskopie)
@@ -229,7 +229,7 @@
 			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 @@
 				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 @@
 #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 @@
 		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. */
Index: lib/elfboot.c
===================================================================
--- lib/elfboot.c	(Revision 476)
+++ lib/elfboot.c	(Arbeitskopie)
@@ -61,7 +61,7 @@
 	}
 	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 @@
 			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");
 			
 		}
Index: northbridge/intel/i440bxemulation/i440bx.c
===================================================================
--- northbridge/intel/i440bxemulation/i440bx.c	(Revision 476)
+++ northbridge/intel/i440bxemulation/i440bx.c	(Arbeitskopie)
@@ -79,7 +79,7 @@
 	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);
 }
 
Index: arch/x86/linuxbios_table.c
===================================================================
--- arch/x86/linuxbios_table.c	(Revision 476)
+++ arch/x86/linuxbios_table.c	(Arbeitskopie)
@@ -177,7 +177,7 @@
 {
 	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]);





More information about the coreboot mailing list