Skip to content

Commit f6a175c

Browse files
yangbolu1991davem330
authored andcommitted
ptp: fix format string mismatch in ptp_sysfs.c
Fix format string mismatch in ptp_sysfs.c. Use %u for unsigned int. Fixes: 73f3706 ("ptp: support ptp physical/virtual clocks conversion") Reported-by: kernel test robot <[email protected]> Signed-off-by: Yangbo Lu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 55eac20 commit f6a175c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ptp/ptp_sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static ssize_t n_vclocks_show(struct device *dev,
179179
if (mutex_lock_interruptible(&ptp->n_vclocks_mux))
180180
return -ERESTARTSYS;
181181

182-
size = snprintf(page, PAGE_SIZE - 1, "%d\n", ptp->n_vclocks);
182+
size = snprintf(page, PAGE_SIZE - 1, "%u\n", ptp->n_vclocks);
183183

184184
mutex_unlock(&ptp->n_vclocks_mux);
185185

@@ -252,7 +252,7 @@ static ssize_t max_vclocks_show(struct device *dev,
252252
struct ptp_clock *ptp = dev_get_drvdata(dev);
253253
ssize_t size;
254254

255-
size = snprintf(page, PAGE_SIZE - 1, "%d\n", ptp->max_vclocks);
255+
size = snprintf(page, PAGE_SIZE - 1, "%u\n", ptp->max_vclocks);
256256

257257
return size;
258258
}

0 commit comments

Comments
 (0)