* [U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning
@ 2012-10-23 11:45 Andreas Bießmann
2012-10-23 12:14 ` Marek Vasut
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bießmann @ 2012-10-23 11:45 UTC (permalink / raw)
To: u-boot
This fixes following warning only generated with eldk-4.2:
---8<---
lcd.c: In function 'bitmap_plot':
lcd.c:527: warning: dereferencing type-punned pointer will break strict-aliasing rules
--->8---
Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
Cc: Marek Vasut <marex@denx.de>
---
common/lcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/lcd.c b/common/lcd.c
index b6be800..9a4435f 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -524,7 +524,7 @@ static inline ushort *configuration_get_cmap(void)
void bitmap_plot(int x, int y)
{
#ifdef CONFIG_ATMEL_LCD
- uint *cmap = (uint *)bmp_logo_palette;
+ uint *cmap = (void *)bmp_logo_palette;
#else
ushort *cmap = (ushort *)bmp_logo_palette;
#endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning
2012-10-23 11:45 [U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning Andreas Bießmann
@ 2012-10-23 12:14 ` Marek Vasut
2012-10-23 12:37 ` Andreas Bießmann
0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2012-10-23 12:14 UTC (permalink / raw)
To: u-boot
Dear Andreas Bie?mann,
> This fixes following warning only generated with eldk-4.2:
>
> ---8<---
> lcd.c: In function 'bitmap_plot':
> lcd.c:527: warning: dereferencing type-punned pointer will break
> strict-aliasing rules --->8---
>
> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
> Cc: Marek Vasut <marex@denx.de>
> ---
> common/lcd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/lcd.c b/common/lcd.c
> index b6be800..9a4435f 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -524,7 +524,7 @@ static inline ushort *configuration_get_cmap(void)
> void bitmap_plot(int x, int y)
> {
> #ifdef CONFIG_ATMEL_LCD
> - uint *cmap = (uint *)bmp_logo_palette;
> + uint *cmap = (void *)bmp_logo_palette;
Are you _sure_ this is the right fix ? Why is the atmel LCD driver so separate
anyway?
Thanks!
> #else
> ushort *cmap = (ushort *)bmp_logo_palette;
> #endif
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning
2012-10-23 12:14 ` Marek Vasut
@ 2012-10-23 12:37 ` Andreas Bießmann
2012-10-23 22:09 ` Marek Vasut
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bießmann @ 2012-10-23 12:37 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
On 23.10.2012 14:14, Marek Vasut wrote:
> Dear Andreas Bie?mann,
>
>> This fixes following warning only generated with eldk-4.2:
>>
>> ---8<---
>> lcd.c: In function 'bitmap_plot':
>> lcd.c:527: warning: dereferencing type-punned pointer will break
>> strict-aliasing rules --->8---
>>
>> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
>> Cc: Marek Vasut <marex@denx.de>
>> ---
>> common/lcd.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/lcd.c b/common/lcd.c
>> index b6be800..9a4435f 100644
>> --- a/common/lcd.c
>> +++ b/common/lcd.c
>> @@ -524,7 +524,7 @@ static inline ushort *configuration_get_cmap(void)
>> void bitmap_plot(int x, int y)
>> {
>> #ifdef CONFIG_ATMEL_LCD
>> - uint *cmap = (uint *)bmp_logo_palette;
>> + uint *cmap = (void *)bmp_logo_palette;
>
> Are you _sure_ this is the right fix ?
yes, I am. This patch is runtime tested on an at91sam9263ek.
I first tried to consolidate the cmap and just use the ushort as in the
else path. But unfortunately this require some more rework of this driver.
> Why is the atmel LCD driver so separate
> anyway?
Sorry, I don't know. This should really be reworked some time.
But I think for now this quick fix can be applied to silence your
eldk-4.2 warning.
Best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning
2012-10-23 12:37 ` Andreas Bießmann
@ 2012-10-23 22:09 ` Marek Vasut
2012-10-24 7:57 ` Andreas Bießmann
0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2012-10-23 22:09 UTC (permalink / raw)
To: u-boot
Dear Andreas Bie?mann,
[..]
>
> yes, I am. This patch is runtime tested on an at91sam9263ek.
>
> I first tried to consolidate the cmap and just use the ushort as in the
> else path. But unfortunately this require some more rework of this driver.
Can you do such rework? You're the atmel guy afterall.
> > Why is the atmel LCD driver so separate
> > anyway?
>
> Sorry, I don't know. This should really be reworked some time.
> But I think for now this quick fix can be applied to silence your
> eldk-4.2 warning.
I don't like hiding problems, can we aim for a proper solution please?
[...]
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning
2012-10-23 22:09 ` Marek Vasut
@ 2012-10-24 7:57 ` Andreas Bießmann
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Bießmann @ 2012-10-24 7:57 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
On 24.10.2012 00:09, Marek Vasut wrote:
> Dear Andreas Bie?mann,
>
> [..]
>>
>> yes, I am. This patch is runtime tested on an at91sam9263ek.
>>
>> I first tried to consolidate the cmap and just use the ushort as in the
>> else path. But unfortunately this require some more rework of this driver.
>
> Can you do such rework? You're the atmel guy afterall.
I can do such rework, although I have currently not much time to work on
that issue. Until 2013.01 release in January this should be doable but
not in the next few days until MW closes.
>>> Why is the atmel LCD driver so separate
>>> anyway?
>>
>> Sorry, I don't know. This should really be reworked some time.
>> But I think for now this quick fix can be applied to silence your
>> eldk-4.2 warning.
>
> I don't like hiding problems, can we aim for a proper solution please?
You are right, we should do so.
Best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-24 7:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23 11:45 [U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning Andreas Bießmann
2012-10-23 12:14 ` Marek Vasut
2012-10-23 12:37 ` Andreas Bießmann
2012-10-23 22:09 ` Marek Vasut
2012-10-24 7:57 ` Andreas Bießmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox