Skip to content

Commit bb3d498

Browse files
rtc: rv3028: fix RV3028_TS_COUNT type
Read RV3028_TS_COUNT in an unsigned int so static checkers stop reporting a mismatch between the format specifier and the type. Reported-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241111104711.3170865-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 1f7a0c6 commit bb3d498

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/rtc/rtc-rv3028.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ static ssize_t timestamp0_show(struct device *dev,
120120
{
121121
struct rv3028_data *rv3028 = dev_get_drvdata(dev->parent);
122122
struct rtc_time tm;
123-
int ret, count;
123+
unsigned int count;
124124
u8 date[6];
125+
int ret;
125126

126127
ret = regmap_read(rv3028->regmap, RV3028_TS_COUNT, &count);
127128
if (ret)
@@ -156,7 +157,8 @@ static ssize_t timestamp0_count_show(struct device *dev,
156157
struct device_attribute *attr, char *buf)
157158
{
158159
struct rv3028_data *rv3028 = dev_get_drvdata(dev->parent);
159-
int ret, count;
160+
unsigned int count;
161+
int ret;
160162

161163
ret = regmap_read(rv3028->regmap, RV3028_TS_COUNT, &count);
162164
if (ret)

0 commit comments

Comments
 (0)