From: Bjorn Helgaas Date: Fri, 15 Jan 2021 23:18:36 +0000 (-0600) Subject: PCI: Fix printk field formatting X-Git-Tag: v6.6.17~4058^2^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62008578b73f16e274070a232b939ba5933bb8ba;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Ilpo Järvinen --- diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 967f9a7..ceaa694 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -104,7 +104,7 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno) pci_read_config_dword(dev, reg, &check); if ((new ^ check) & mask) { - pci_err(dev, "BAR %d: error updating (%#08x != %#08x)\n", + pci_err(dev, "BAR %d: error updating (%#010x != %#010x)\n", resno, new, check); } @@ -113,7 +113,7 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno) pci_write_config_dword(dev, reg + 4, new); pci_read_config_dword(dev, reg + 4, &check); if (check != new) { - pci_err(dev, "BAR %d: error updating (high %#08x != %#08x)\n", + pci_err(dev, "BAR %d: error updating (high %#010x != %#010x)\n", resno, new, check); } }