]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: dw_hdmi: Fix compiler warnings with gcc-14
authorKhem Raj <raj.khem@gmail.com>
Sat, 27 Jan 2024 22:54:59 +0000 (14:54 -0800)
committerAnatolij Gustschin <agust@denx.de>
Sun, 21 Apr 2024 07:07:01 +0000 (09:07 +0200)
GCC-14 find more warnings like
"make pointer from integer without a cast"
fix them by adding a type cast.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Tom Rini <trini@konsulko.com>
drivers/video/dw_hdmi.c

index ab4811cfc769a960d6f036d78b2409c46f708e5f..c217af97878eabd4c85f3fa7364300d3a2cee896 100644 (file)
@@ -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;