Commit f6a175cf authored by Yangbo Lu's avatar Yangbo Lu Committed by David S. Miller
Browse files

ptp: fix format string mismatch in ptp_sysfs.c



Fix format string mismatch in ptp_sysfs.c. Use %u for unsigned int.

Fixes: 73f37068 ("ptp: support ptp physical/virtual clocks conversion")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 55eac206
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}