Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -2
+4 -2
drivers/rtc/rtc-rv3028.c
··· 120 120 { 121 121 struct rv3028_data *rv3028 = dev_get_drvdata(dev->parent); 122 122 struct rtc_time tm; 123 - int ret, count; 123 + unsigned int count; 124 124 u8 date[6]; 125 + int ret; 125 126 126 127 ret = regmap_read(rv3028->regmap, RV3028_TS_COUNT, &count); 127 128 if (ret) ··· 157 156 struct device_attribute *attr, char *buf) 158 157 { 159 158 struct rv3028_data *rv3028 = dev_get_drvdata(dev->parent); 160 - int ret, count; 159 + unsigned int count; 160 + int ret; 161 161 162 162 ret = regmap_read(rv3028->regmap, RV3028_TS_COUNT, &count); 163 163 if (ret)