diff options
| author | Alok Tiwari <alok.a.tiwari@oracle.com> | 2025-09-13 12:24:42 -0700 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2025-09-30 23:31:00 +0000 |
| commit | 332bf98d6c5a198d3078110b9000841dac3fd7b2 (patch) | |
| tree | bd58f72fd1a64b9ac34929a642761c1f87901511 | |
| parent | fd9be098f7eb4bb6b1768145fd48e74a292e3730 (diff) | |
Drivers: hv: vmbus: Fix sysfs output format for ring buffer index
The sysfs attributes out_read_index and out_write_index in
vmbus_drv.c currently use %d to print outbound.current_read_index
and outbound.current_write_index.
These fields are u32 values, so printing them with %d (signed) is
not logically correct. Update the format specifier to %u to
correctly match their type.
No functional change, only fixes the sysfs output format.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
| -rw-r--r-- | drivers/hv/vmbus_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 478c4a76896c..fbab9f2d7fa6 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -322,7 +322,7 @@ static ssize_t out_read_index_show(struct device *dev, &outbound); if (ret < 0) return ret; - return sysfs_emit(buf, "%d\n", outbound.current_read_index); + return sysfs_emit(buf, "%u\n", outbound.current_read_index); } static DEVICE_ATTR_RO(out_read_index); @@ -341,7 +341,7 @@ static ssize_t out_write_index_show(struct device *dev, &outbound); if (ret < 0) return ret; - return sysfs_emit(buf, "%d\n", outbound.current_write_index); + return sysfs_emit(buf, "%u\n", outbound.current_write_index); } static DEVICE_ATTR_RO(out_write_index); |