* [net] ptp: fix format string mismatch in ptp_sysfs.c
@ 2021-07-05 9:46 Yangbo Lu
2021-07-05 17:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yangbo Lu @ 2021-07-05 9:46 UTC (permalink / raw)
To: netdev
Cc: Yangbo Lu, linux-kernel, Richard Cochran, David S . Miller,
Rui Sousa, Sebastien Laveze
Fix format string mismatch in ptp_sysfs.c. Use %u for unsigned int.
Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
drivers/ptp/ptp_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ptp/ptp_sysfs.c b/drivers/ptp/ptp_sysfs.c
index 6a36590ca77a..b3d96b747292 100644
--- a/drivers/ptp/ptp_sysfs.c
+++ b/drivers/ptp/ptp_sysfs.c
@@ -179,7 +179,7 @@ static ssize_t n_vclocks_show(struct device *dev,
if (mutex_lock_interruptible(&ptp->n_vclocks_mux))
return -ERESTARTSYS;
- size = snprintf(page, PAGE_SIZE - 1, "%d\n", ptp->n_vclocks);
+ size = snprintf(page, PAGE_SIZE - 1, "%u\n", ptp->n_vclocks);
mutex_unlock(&ptp->n_vclocks_mux);
@@ -252,7 +252,7 @@ static ssize_t max_vclocks_show(struct device *dev,
struct ptp_clock *ptp = dev_get_drvdata(dev);
ssize_t size;
- size = snprintf(page, PAGE_SIZE - 1, "%d\n", ptp->max_vclocks);
+ size = snprintf(page, PAGE_SIZE - 1, "%u\n", ptp->max_vclocks);
return size;
}
base-commit: 6ff63a150b5556012589ae59efac1b5eeb7d32c3
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net] ptp: fix format string mismatch in ptp_sysfs.c
2021-07-05 9:46 [net] ptp: fix format string mismatch in ptp_sysfs.c Yangbo Lu
@ 2021-07-05 17:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-05 17:20 UTC (permalink / raw)
To: Yangbo Lu
Cc: netdev, linux-kernel, richardcochran, davem, rui.sousa, sebastien.laveze
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Mon, 5 Jul 2021 17:46:17 +0800 you wrote:
> Fix format string mismatch in ptp_sysfs.c. Use %u for unsigned int.
>
> Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
> drivers/ptp/ptp_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> [...]
Here is the summary with links:
- [net] ptp: fix format string mismatch in ptp_sysfs.c
https://git.kernel.org/netdev/net/c/f6a175cfcc8d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-05 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 9:46 [net] ptp: fix format string mismatch in ptp_sysfs.c Yangbo Lu
2021-07-05 17:20 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.