Skip to content

Commit 6200857

Browse files
committed
PCI: Fix printk field formatting
Previously we used "%#08x" to print a 32-bit value. This fills an 8-character field with "0x...", but of course many 32-bit values require a 10-character field "0x12345678" for this format. Fix the formats to avoid confusion. Link: https://lore.kernel.org/r/20230824193712.542167-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent a49287d commit 6200857

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/setup-res.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno)
104104
pci_read_config_dword(dev, reg, &check);
105105

106106
if ((new ^ check) & mask) {
107-
pci_err(dev, "BAR %d: error updating (%#08x != %#08x)\n",
107+
pci_err(dev, "BAR %d: error updating (%#010x != %#010x)\n",
108108
resno, new, check);
109109
}
110110

@@ -113,7 +113,7 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno)
113113
pci_write_config_dword(dev, reg + 4, new);
114114
pci_read_config_dword(dev, reg + 4, &check);
115115
if (check != new) {
116-
pci_err(dev, "BAR %d: error updating (high %#08x != %#08x)\n",
116+
pci_err(dev, "BAR %d: error updating (high %#010x != %#010x)\n",
117117
resno, new, check);
118118
}
119119
}

0 commit comments

Comments
 (0)