PCI: Add 0x prefix to BAR register position in __pci_read_base()
authorKevin Hao <haokexin@gmail.com>
Sat, 25 May 2013 11:36:25 +0000 (19:36 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 25 May 2013 17:58:01 +0000 (11:58 -0600)
We print the BAR register's position in hexadecimal format, so it
is more readable if 0x prefix is added.

[bhelgaas: keep dev_printk(), not dev_dbg(), so this is always in dmesg]
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c

index 70f10fa3c1b216ab88e04471c171d8404f107770..d40cd05bbf6485aca1231c2d5d416daf89c167df 100644 (file)
@@ -278,9 +278,9 @@ out:
                pci_write_config_word(dev, PCI_COMMAND, orig_cmd);
 
        if (bar_too_big)
-               dev_err(&dev->dev, "reg %x: can't handle 64-bit BAR\n", pos);
+               dev_err(&dev->dev, "reg 0x%x: can't handle 64-bit BAR\n", pos);
        if (res->flags && !bar_disabled)
-               dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res);
+               dev_printk(KERN_DEBUG, &dev->dev, "reg 0x%x: %pR\n", pos, res);
 
        return (res->flags & IORESOURCE_MEM_64) ? 1 : 0;
 }