summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-sunplus.c
Commit message (Collapse)AuthorAgeFilesLines
* rtc: sunplus: fix format string for printing resourceArnd Bergmann2023-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | [ Upstream commit 08279468a294d8c996a657ecc9e51bd5c084c75d ] On 32-bit architectures with 64-bit resource_size_t, sp_rtc_probe() causes a compiler warning: drivers/rtc/rtc-sunplus.c: In function 'sp_rtc_probe': drivers/rtc/rtc-sunplus.c:243:33: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] 243 | dev_dbg(&plat_dev->dev, "res = 0x%x, reg_base = 0x%lx\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The best way to print a resource is the special %pR format string, and similarly to print a pointer we can use %p and avoid the cast. Fixes: fad6cbe9b2b4 ("rtc: Add driver for RTC in Sunplus SP7021") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230117172450.2938962-1-arnd@kernel.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
* rtc: sunplus: fix return value in sp_rtc_probe()Yang Yingliang2022-01-161-1/+1
| | | | | | | | | | | If devm_ioremap_resource() fails, it should return error code from sp_rtc->reg_base in sp_rtc_probe(). Fixes: fad6cbe9b2b4 ("rtc: Add driver for RTC in Sunplus SP7021") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220106075711.3216468-1-yangyingliang@huawei.com
* rtc: Add driver for RTC in Sunplus SP7021Vincent Shih2022-01-051-0/+362
Add driver for RTC in Sunplus SP7021 Signed-off-by: Vincent Shih <vincent.sunplus@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1638517579-10316-2-git-send-email-vincent.sunplus@gamil.com