diff options
| author | Alok Tiwari <alok.a.tiwari@oracle.com> | 2025-09-17 01:59:31 -0700 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2025-09-30 23:30:56 +0000 |
| commit | fd9be098f7eb4bb6b1768145fd48e74a292e3730 (patch) | |
| tree | 7d97afd592be682cbb280882c723a619f61dbaa3 | |
| parent | 4691db0704ac1c266377c99f00288a014fdb7af1 (diff) | |
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>
| -rw-r--r-- | drivers/hv/vmbus_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 2ed5a1e89d69..478c4a76896c 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1742,7 +1742,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel, u32 target_cpu; ssize_t ret; - if (sscanf(buf, "%uu", &target_cpu) != 1) + if (sscanf(buf, "%u", &target_cpu) != 1) return -EIO; cpus_read_lock(); |