starfive-tech / u-boot

44 stars 33 forks source link

misc: fix build errors in drivers/misc/starfive-otp.c #12

Closed xypron closed 3 years ago

xypron commented 3 years ago

GCC 10 shows multiple build errors:

In file included from drivers/misc/starfive-otp.c:22: drivers/misc/starfive-otp.c: In function ‘gpio_direction_output’: ./arch/riscv/include/asm/arch/global_reg.h:162:35: error: initialization of ‘volatile uint32_t ’ {aka ‘volatile unsigned int ’} from ‘long unsigned int’ makes pointer from integer without a cast [-Werror=int-conversion] 162 | #define EZGPIO_FULLMUX_BASE_ADDR 0x11910000UL | ^~~~ drivers/misc/starfive-otp.c:143:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 143 | u32 addr = (u32)regs; | ^

Correct the type of addr. Convert EZGPIO_FULLMUX_BASE_ADDR to void *.

Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de

Please do not submit a Pull Request via github. Our project makes use of mailing lists for patch submission and review. For more details please see https://www.denx.de/wiki/U-Boot/Patches

The only exception to this is in order to trigger a CI loop on Azure prior to posting of patches.

pdp7 commented 3 years ago

@xypron thank you