diff mbox series

PCI/IOV: Make the display of vf_device more readble

Message ID 20250324131233.116341-1-kanie@linux.alibaba.com (mailing list archive)
State New
Delegated to: Bjorn Helgaas
Headers show
Series PCI/IOV: Make the display of vf_device more readble | expand

Commit Message

Guixin Liu March 24, 2025, 1:12 p.m. UTC
Add "0x" prefixes and set its print width to enhance formatting.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 drivers/pci/iov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 9e4770cdd4d5..df40663c1881 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -500,7 +500,7 @@  static ssize_t sriov_vf_device_show(struct device *dev,
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
 
-	return sysfs_emit(buf, "%x\n", pdev->sriov->vf_device);
+	return sysfs_emit(buf, "0x%04x\n", pdev->sriov->vf_device);
 }
 
 static ssize_t sriov_drivers_autoprobe_show(struct device *dev,