Skip to contentSkip to conversation

video: dw_hdmi: Fix compiler warnings with gcc-14

PATCH In review Khem Raj 2 participants 2 messages Jan 27, 2024 – Apr 20, 2024 Framebuffer layer

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 video: dw_hdmi: Fix compiler warnings with gcc-14

GCC-14 find more warnings like
"make pointer from integer without a cast" fix them by adding a type cast.

Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
---
 drivers/video/dw_hdmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/video/dw_hdmi.c +4 -4
index c4fbb18294..9294d9a82a 100644
@@ -78,10 +78,10 @@ static void dw_hdmi_write(struct dw_hdmi *hdmi, u8 val, int offset)
 {
 	switch (hdmi->reg_io_width) {
 	case 1:
-		writeb(val, hdmi->ioaddr + offset);
+		writeb(val, (void *)(hdmi->ioaddr + offset));
 		break;
 	case 4:
-		writel(val, hdmi->ioaddr + (offset << 2));
+		writel(val, (void *)(hdmi->ioaddr + (offset << 2)));
 		break;
 	default:
 		debug("reg_io_width has unsupported width!\n");
@@ -93,9 +93,9 @@ static u8 dw_hdmi_read(struct dw_hdmi *hdmi, int offset)
 {
 	switch (hdmi->reg_io_width) {
 	case 1:
-		return readb(hdmi->ioaddr + offset);
+		return readb((void *)(hdmi->ioaddr + offset));
 	case 4:
-		return readl(hdmi->ioaddr + (offset << 2));
+		return readl((void *)(hdmi->ioaddr + (offset << 2)));
 	default:
 		debug("reg_io_width has unsupported width!\n");
 		break;
Signature · 1 line
2.43.0