Skip to content

[scarthgap] compile error for uboot-starfive #6

@mark-bchoi

Description

@mark-bchoi

Hi,

There are compile error which is invalid type cast.

| /home/bchoi/work/kas4ros/build/tmp-glibc/work/starfive_visionfive2-oe-linux/u-boot-starfive/1.0/git/drivers/video/dw_hdmi.c:84:42: error: passing argument 2 of 'writel' makes pointer from integer without a cast [-Wint-conversion]
|    84 |                 writel(val, hdmi->ioaddr + (offset << 2));
|       |                             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
|       |                                          |
|       |                                          ulong {aka long unsigned int}
| In file included from /home/bchoi/work/kas4ros/build/tmp-glibc/work/starfive_visionfive2-oe-linux/u-boot-starfive/1.0/git/drivers/video/dw_hdmi.c:11:
| /home/bchoi/work/kas4ros/build/tmp-glibc/work/starfive_visionfive2-oe-linux/u-boot-starfive/1.0/git/arch/riscv/include/asm/io.h:83:59: note: expected 'volatile void *' but argument is of type 'ulong' {aka 'long unsigned int'}
|    83 | static inline void writel(u32 val, volatile void __iomem *addr)
|       |                                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~
| /home/bchoi/work/kas4ros/build/tmp-glibc/work/starfive_visionfive2-oe-linux/u-boot-starfive/1.0/git/drivers/video/dw_hdmi.c: In function 'dw_hdmi_read':
| /home/bchoi/work/kas4ros/build/tmp-glibc/work/starfive_visionfive2-oe-linux/u-boot-starfive/1.0/git/drivers/video/dw_hdmi.c:96:43: error: passing argument 1 of 'readb' makes pointer from integer without a cast [-Wint-conversion]
|    96 |                 return readb(hdmi->ioaddr + offset);
|       |                              ~~~~~~~~~~~~~^~~~~~~~
|       |                                           |
|       |                                           ulong {aka long unsigned int}
| /home/bchoi/work/kas4ros/build/tmp-glibc/work/starfive_visionfive2-oe-linux/u-boot-starfive/1.0/git/arch/riscv/include/asm/io.h:95:53: note: expected 'const volatile void *' but argument is of type 'ulong' {aka 'long unsigned int'}
|    95 | static inline u8 readb(const volatile void __iomem *addr)
|       |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
| /home/bchoi/work/kas4ros/build/tmp-glibc/work/starfive_visionfive2-oe-linux/u-boot-starfive/1.0/git/drivers/video/dw_hdmi.c:98:43: error: passing argument 1 of 'readl' makes pointer from integer without a cast [-Wint-conversion]
|    98 |                 return readl(hdmi->ioaddr + (offset << 2));
|       |                              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~

BR,
Mark

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions