Commit 332bf98d authored by Alok Tiwari's avatar Alok Tiwari Committed by Wei Liu
Browse files

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: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: default avatarMichael Kelley <mhklinux@outlook.com>
Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent fd9be098
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);