Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Alok Tiwari and committed by
Wei Liu
fd9be098 4691db07

+1 -1
+1 -1
drivers/hv/vmbus_drv.c
··· 1742 1742 u32 target_cpu; 1743 1743 ssize_t ret; 1744 1744 1745 - if (sscanf(buf, "%uu", &target_cpu) != 1) 1745 + if (sscanf(buf, "%u", &target_cpu) != 1) 1746 1746 return -EIO; 1747 1747 1748 1748 cpus_read_lock();