diff options
author | Yangbo Lu <yangbo.lu@nxp.com> | 2021-07-05 17:46:17 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-05 10:10:41 -0700 |
commit | f6a175cfcc8df578adfdf06b05c82b3b8c8b5cfd (patch) | |
tree | 589733e64d4e17fc9beb3d7500ac3e30d0c4e239 /drivers/ptp/ptp_sysfs.c | |
parent | 55eac20617ca84129273ab248f4d7bfe456967de (diff) |
ptp: fix format string mismatch in ptp_sysfs.c
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_sysfs.c')
-rw-r--r-- | drivers/ptp/ptp_sysfs.c | 4 |
1 files 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; } |