[PATCH v1] rtc: rv3028: Fix wrong format specifier in timestamp0_count_show

Zhu Jun posted 1 patch 1 month, 2 weeks ago
drivers/rtc/rtc-rv3028.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v1] rtc: rv3028: Fix wrong format specifier in timestamp0_count_show
Posted by Zhu Jun 1 month, 2 weeks ago
The format specifier of "int" in sprintf() should be "%d", not
"%u".

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
Changes:
v1:fix the subject line, it has to be in the subsystem style

 drivers/rtc/rtc-rv3028.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index 2f001c59c61d..c79fad316119 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -162,7 +162,7 @@ static ssize_t timestamp0_count_show(struct device *dev,
 	if (ret)
 		return ret;
 
-	return sprintf(buf, "%u\n", count);
+	return sprintf(buf, "%d\n", count);
 };
 
 static DEVICE_ATTR_RO(timestamp0_count);
-- 
2.17.1