[PATCH 3/3] rtc: pl031: Correct function type of pl031_write_reg

Tom Rini trini at konsulko.com
Mon Aug 4 23:57:12 CEST 2025


When calling writel we do not have a return value to check or pass
along. This function should therefore be void and not return what writel
gives us.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 drivers/rtc/pl031.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c
index 855ee9134168..6f189bc503ef 100644
--- a/drivers/rtc/pl031.c
+++ b/drivers/rtc/pl031.c
@@ -39,11 +39,11 @@ static inline u32 pl031_read_reg(struct udevice *dev, int reg)
 	return readl(pdata->base + reg);
 }
 
-static inline u32 pl031_write_reg(struct udevice *dev, int reg, u32 value)
+static inline void pl031_write_reg(struct udevice *dev, int reg, u32 value)
 {
 	struct pl031_plat *pdata = dev_get_plat(dev);
 
-	return writel(value, pdata->base + reg);
+	writel(value, pdata->base + reg);
 }
 
 /*
-- 
2.43.0



More information about the U-Boot mailing list