
On Tue, Jul 04, 2023 at 11:14:39AM +0200, Dario Binacchi wrote:
On Tue, Jul 4, 2023 at 10:11 AM Grzegorz Szymaszek gszymaszek@short.pl wrote:
ulong logo =
(ulong)stmicroelectronics_uboot_logo_8bit_rle;
bmp_display(logo, BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
Technically logo is const.
int bmp_display(ulong addr, int x, int y); And throughout the code, I only find ulong parameters being passed to this function. Perhaps I can replace "logo" with "addr".
I'm afraid my comment was perhaps too terse: I wanted to point out that your "ulong logo" variable is assigned to only once, its value is never changed, so instead of plain "ulong", you could declare its type as "const ulong". I won't insist on this change since the code is trivial.
Consider simply removing the new variable and just passing "(ulong)stmicroelectronics_uboot_logo_8bit_rle" directly as the bmp_display()'s argument, like in board/st/stm32f746-disco/stm32f746-disco.c.