* [PATCH] common: splash_source: fix -Wint-to-pointer-cast warning
[not found] <CGME20201207081826epcas1p1043b2d41fa47108a9f2f1182884b6c4e@epcas1p1.samsung.com>
@ 2020-12-07 8:18 ` Jaehoon Chung
2020-12-12 15:39 ` Simon Glass
2021-02-22 18:44 ` Anatolij Gustschin
0 siblings, 2 replies; 4+ messages in thread
From: Jaehoon Chung @ 2020-12-07 8:18 UTC (permalink / raw)
To: u-boot
Fix -Wint-to-pointer-cast warning
common/splash_source.c: In function 'splash_load_raw':
common/splash_source.c:100:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
100 | bmp_hdr = (struct bmp_header *)bmp_load_addr;
| ^
common/splash_source.c: In function 'splash_sf_read_raw':
common/splash_source.c:39:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
39 | return spi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
| ^
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
common/splash_source.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/splash_source.c b/common/splash_source.c
index f51ca5ddf37c..e50bdfe99c6a 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -36,7 +36,7 @@ static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
return -ENODEV;
}
- return spi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
+ return spi_flash_read(sf, offset, read_size, (void *)(uintptr_t)bmp_load_addr);
}
#else
static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
@@ -97,7 +97,7 @@ static int splash_load_raw(struct splash_location *location, u32 bmp_load_addr)
if (res < 0)
return res;
- bmp_hdr = (struct bmp_header *)bmp_load_addr;
+ bmp_hdr = (struct bmp_header *)(uintptr_t)bmp_load_addr;
bmp_size = le32_to_cpu(bmp_hdr->file_size);
if (bmp_load_addr + bmp_size >= gd->start_addr_sp)
--
2.29.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] common: splash_source: fix -Wint-to-pointer-cast warning
2020-12-07 8:18 ` [PATCH] common: splash_source: fix -Wint-to-pointer-cast warning Jaehoon Chung
@ 2020-12-12 15:39 ` Simon Glass
2021-02-18 0:18 ` Jaehoon Chung
2021-02-22 18:44 ` Anatolij Gustschin
1 sibling, 1 reply; 4+ messages in thread
From: Simon Glass @ 2020-12-12 15:39 UTC (permalink / raw)
To: u-boot
On Mon, 7 Dec 2020 at 01:18, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>
> Fix -Wint-to-pointer-cast warning
>
> common/splash_source.c: In function 'splash_load_raw':
> common/splash_source.c:100:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 100 | bmp_hdr = (struct bmp_header *)bmp_load_addr;
> | ^
> common/splash_source.c: In function 'splash_sf_read_raw':
> common/splash_source.c:39:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 39 | return spi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
> | ^
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> common/splash_source.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] common: splash_source: fix -Wint-to-pointer-cast warning
2020-12-12 15:39 ` Simon Glass
@ 2021-02-18 0:18 ` Jaehoon Chung
0 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2021-02-18 0:18 UTC (permalink / raw)
To: u-boot
On 12/13/20 12:39 AM, Simon Glass wrote:
> On Mon, 7 Dec 2020 at 01:18, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>
>> Fix -Wint-to-pointer-cast warning
>>
>> common/splash_source.c: In function 'splash_load_raw':
>> common/splash_source.c:100:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>> 100 | bmp_hdr = (struct bmp_header *)bmp_load_addr;
>> | ^
>> common/splash_source.c: In function 'splash_sf_read_raw':
>> common/splash_source.c:39:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>> 39 | return spi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
>> | ^
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> ---
>> common/splash_source.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Ping. Is there any progress about this patch?
Best Regards,
Jaehoon Chung
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] common: splash_source: fix -Wint-to-pointer-cast warning
2020-12-07 8:18 ` [PATCH] common: splash_source: fix -Wint-to-pointer-cast warning Jaehoon Chung
2020-12-12 15:39 ` Simon Glass
@ 2021-02-22 18:44 ` Anatolij Gustschin
1 sibling, 0 replies; 4+ messages in thread
From: Anatolij Gustschin @ 2021-02-22 18:44 UTC (permalink / raw)
To: u-boot
On Mon, 7 Dec 2020 17:18:51 +0900
Jaehoon Chung jh80.chung at samsung.com wrote:
...
> ---
> common/splash_source.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-video/master, thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-22 18:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20201207081826epcas1p1043b2d41fa47108a9f2f1182884b6c4e@epcas1p1.samsung.com>
2020-12-07 8:18 ` [PATCH] common: splash_source: fix -Wint-to-pointer-cast warning Jaehoon Chung
2020-12-12 15:39 ` Simon Glass
2021-02-18 0:18 ` Jaehoon Chung
2021-02-22 18:44 ` Anatolij Gustschin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.