Skip to content

Commit fd9be09

Browse files
aloktiwaliuw
authored andcommitted
Drivers: hv: vmbus: Clean up sscanf format specifier in target_cpu_store()
The target_cpu_store() function parses the target CPU from the sysfs buffer using sscanf(). The format string currently uses "%uu", which is redundant. The compiler ignores the extra "u", so there is no incorrect parsing at runtime. Update the format string to use "%u" for clarity and consistency. 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>
1 parent 4691db0 commit fd9be09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hv/vmbus_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel,
17421742
u32 target_cpu;
17431743
ssize_t ret;
17441744

1745-
if (sscanf(buf, "%uu", &target_cpu) != 1)
1745+
if (sscanf(buf, "%u", &target_cpu) != 1)
17461746
return -EIO;
17471747

17481748
cpus_read_lock();

0 commit comments

Comments
 (0)