All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning
@ 2009-09-11  9:49 Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11  9:49 UTC (permalink / raw)
  To: u-boot

Fix warning: ../common/flash.c:668: warning: dereferencing type-punned
pointer will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Andrea Marson <andrea.marson@dave-tech.it>
---
 board/dave/common/flash.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/board/dave/common/flash.c b/board/dave/common/flash.c
index b6af63b..29caf47 100644
--- a/board/dave/common/flash.c
+++ b/board/dave/common/flash.c
@@ -663,9 +663,10 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
  */
 static int write_word (flash_info_t *info, ulong dest, ulong data)
 {
+	ulong *data_ptr = &data;
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]);
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)&data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)data_ptr;
 	ulong start;
 	int flag;
 	int i;
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/common/flash.c: Fix compile warning
  2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
@ 2009-09-11  9:49 ` Wolfgang Denk
  2009-09-11 13:06   ` Stefan Roese
  2009-09-14 22:30   ` Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error Wolfgang Denk
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11  9:49 UTC (permalink / raw)
  To: u-boot

Fix warning: ../common/flash.c:917: warning: dereferencing type-punned
pointer will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
 board/amcc/common/flash.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/amcc/common/flash.c b/board/amcc/common/flash.c
index 9943c74..9aaf256 100644
--- a/board/amcc/common/flash.c
+++ b/board/amcc/common/flash.c
@@ -912,9 +912,10 @@ static int flash_erase_2(flash_info_t * info, int s_first, int s_last)
 
 static int write_word_2(flash_info_t * info, ulong dest, ulong data)
 {
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]);
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *) dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *) & data;
+	ulong *data_ptr = &data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]);
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)data_ptr;
 	ulong start;
 	int i;
 
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error
  2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
@ 2009-09-11  9:49 ` Wolfgang Denk
  2009-09-14 22:18   ` Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning Wolfgang Denk
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11  9:49 UTC (permalink / raw)
  To: u-boot

Fix build problem caused by commit e84aba13: "Replace BCD2BIN and
BIN2BCD macros with inline functions"

phantom.c:163: error: redefinition of 'bcd2bin'
/home/wd/git/u-boot/work/include/bcd.h:16: error: previous definition of 'bcd2bin' was here
phantom.c:168: error: redefinition of 'bin2bcd'
/home/wd/git/u-boot/work/include/bcd.h:21: error: previous definition of 'bin2bcd' was here

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Sangmoon Kim <dogoil@etinsys.com>
---
 board/etin/debris/phantom.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/board/etin/debris/phantom.c b/board/etin/debris/phantom.c
index fcb4c40..63feb7c 100644
--- a/board/etin/debris/phantom.c
+++ b/board/etin/debris/phantom.c
@@ -159,16 +159,6 @@ void rtc_reset(void)
 	}
 }
 
-inline unsigned bcd2bin (uchar n)
-{
-	return ((((n >> 4) & 0x0F) * 10) + (n & 0x0F));
-}
-
-inline unsigned char bin2bcd (unsigned int n)
-{
-	return (((n / 10) << 4) | (n % 10));
-}
-
 static int get_century_flag(void)
 {
 	int flag = 0;
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning
  2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error Wolfgang Denk
@ 2009-09-11  9:49 ` Wolfgang Denk
  2009-09-11 11:00   ` Guennadi Liakhovetski
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/taihu/flash.c: " Wolfgang Denk
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11  9:49 UTC (permalink / raw)
  To: u-boot

Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Guennadi Liakhovetski <lg@denx.de>
---
 board/linkstation/ide.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
index 2c89d62..5dd1d0e 100644
--- a/board/linkstation/ide.c
+++ b/board/linkstation/ide.c
@@ -54,10 +54,12 @@ int ide_preinit (void)
 	if (devbusfn == -1)
 		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
 	if (devbusfn != -1) {
+		ulong *ide_bus_offset_ptr = &ide_bus_offset[0];
+
 		status = 0;
 
 		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
-							   (u32 *) &ide_bus_offset[0]);
+							   (u32 *)ide_bus_offset_ptr);
 		ide_bus_offset[0] &= 0xfffffffe;
 		ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
 							 ide_bus_offset[0] & 0xfffffffe,
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/taihu/flash.c: Fix compile warning
  2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
                   ` (2 preceding siblings ...)
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning Wolfgang Denk
@ 2009-09-11  9:49 ` Wolfgang Denk
  2009-09-11 13:07   ` Stefan Roese
  2009-09-14 22:28   ` Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/yucca/flash.c: " Wolfgang Denk
  2009-09-14 22:16 ` [U-Boot] [PATCH] board/dave/common/flash.c: fix " Wolfgang Denk
  5 siblings, 2 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11  9:49 UTC (permalink / raw)
  To: u-boot

Fix warnings:
flash.c: In function 'write_word_1':
flash.c:696: warning: dereferencing type-punned pointer will break strict-aliasing rules
flash.c: In function 'write_word_2':
flash.c:1044: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
 board/amcc/taihu/flash.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/board/amcc/taihu/flash.c b/board/amcc/taihu/flash.c
index 110cbe5..497fdb9 100644
--- a/board/amcc/taihu/flash.c
+++ b/board/amcc/taihu/flash.c
@@ -691,9 +691,10 @@ static int write_word_1(flash_info_t * info, ulong dest, ulong data)
 static int write_word(flash_info_t * info, ulong dest, ulong data)
 #endif
 {
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]);
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *) dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *) & data;
+	ulong *data_ptr = &data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]);
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)data_ptr;
 	ulong start;
 	int i;
 
@@ -1039,9 +1040,10 @@ static int flash_erase_2(flash_info_t * info, int s_first, int s_last)
 
 static int write_word_2(flash_info_t * info, ulong dest, ulong data)
 {
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]);
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *) dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *) & data;
+	ulong *data_ptr = &data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]);
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)data_ptr;
 	ulong start;
 	int i;
 
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/yucca/flash.c: Fix compile warning
  2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
                   ` (3 preceding siblings ...)
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/taihu/flash.c: " Wolfgang Denk
@ 2009-09-11  9:49 ` Wolfgang Denk
  2009-09-11 13:08   ` Stefan Roese
  2009-09-14 22:29   ` Wolfgang Denk
  2009-09-14 22:16 ` [U-Boot] [PATCH] board/dave/common/flash.c: fix " Wolfgang Denk
  5 siblings, 2 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11  9:49 UTC (permalink / raw)
  To: u-boot

Fix warning: flash.c:919: warning: dereferencing type-punned pointer
will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
 board/amcc/yucca/flash.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/amcc/yucca/flash.c b/board/amcc/yucca/flash.c
index eda49eb..d8c3b32 100644
--- a/board/amcc/yucca/flash.c
+++ b/board/amcc/yucca/flash.c
@@ -914,9 +914,10 @@ static int flash_erase_2(flash_info_t * info, int s_first, int s_last)
 
 static int write_word_2(flash_info_t * info, ulong dest, ulong data)
 {
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]);
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *) dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *) & data;
+	ulong *data_ptr = &data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]);
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)data_ptr;
 	ulong start;
 	int i;
 
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning Wolfgang Denk
@ 2009-09-11 11:00   ` Guennadi Liakhovetski
  2009-09-11 12:00     ` Wolfgang Denk
  0 siblings, 1 reply; 26+ messages in thread
From: Guennadi Liakhovetski @ 2009-09-11 11:00 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang

On Fri, 11 Sep 2009, Wolfgang Denk wrote:

> Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Guennadi Liakhovetski <lg@denx.de>
> ---
>  board/linkstation/ide.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
> index 2c89d62..5dd1d0e 100644
> --- a/board/linkstation/ide.c
> +++ b/board/linkstation/ide.c
> @@ -54,10 +54,12 @@ int ide_preinit (void)
>  	if (devbusfn == -1)
>  		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
>  	if (devbusfn != -1) {
> +		ulong *ide_bus_offset_ptr = &ide_bus_offset[0];
> +
>  		status = 0;
>  
>  		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
> -							   (u32 *) &ide_bus_offset[0]);
> +							   (u32 *)ide_bus_offset_ptr);

Can we also use this occasion to get rid of this typecast?

>  		ide_bus_offset[0] &= 0xfffffffe;
>  		ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
>  							 ide_bus_offset[0] & 0xfffffffe,
> -- 
> 1.6.0.6

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning
  2009-09-11 11:00   ` Guennadi Liakhovetski
@ 2009-09-11 12:00     ` Wolfgang Denk
  2009-09-11 12:03       ` Guennadi Liakhovetski
  2009-09-11 17:54       ` Scott Wood
  0 siblings, 2 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11 12:00 UTC (permalink / raw)
  To: u-boot

Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0909111259280.6139@axis700.grange> you wrote:
> Hi Wolfgang
> 
> On Fri, 11 Sep 2009, Wolfgang Denk wrote:
> 
> > Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
> > break strict-aliasing rules
> > 
> > Signed-off-by: Wolfgang Denk <wd@denx.de>
> > Cc: Guennadi Liakhovetski <lg@denx.de>
> > ---
> >  board/linkstation/ide.c |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> > 
> > diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
> > index 2c89d62..5dd1d0e 100644
> > --- a/board/linkstation/ide.c
> > +++ b/board/linkstation/ide.c
> > @@ -54,10 +54,12 @@ int ide_preinit (void)
> >  	if (devbusfn == -1)
> >  		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
> >  	if (devbusfn != -1) {
> > +		ulong *ide_bus_offset_ptr = &ide_bus_offset[0];
> > +
> >  		status = 0;
> >  
> >  		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
> > -							   (u32 *) &ide_bus_offset[0]);
> > +							   (u32 *)ide_bus_offset_ptr);
> 
> Can we also use this occasion to get rid of this typecast?

No, as this would result in

ide.c:62: warning: passing argument 3 of 'pci_read_config_dword' from
incompatible pointer type

OK, we can declare ide_bus_offset_ptr as u32 8, but then we need the
cast there to avoid a "initialization from incompatible pointer type"
warning - so this isn't exactly an improvement.

I suggest we leave it as is, as this is the minimal-invasive change.

If you want to submit a more general cleanup patch (unifying data
types) you are welcome (but that would be a separate action in any
case).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If I had to live my life again,  I'd  make  the  same  mistakes, only
sooner.                                          -- Tallulah Bankhead

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning
  2009-09-11 12:00     ` Wolfgang Denk
@ 2009-09-11 12:03       ` Guennadi Liakhovetski
  2009-09-11 17:54       ` Scott Wood
  1 sibling, 0 replies; 26+ messages in thread
From: Guennadi Liakhovetski @ 2009-09-11 12:03 UTC (permalink / raw)
  To: u-boot

On Fri, 11 Sep 2009, Wolfgang Denk wrote:

> Dear Guennadi Liakhovetski,
> 
> In message <Pine.LNX.4.64.0909111259280.6139@axis700.grange> you wrote:
> > Hi Wolfgang
> > 
> > On Fri, 11 Sep 2009, Wolfgang Denk wrote:
> > 
> > > Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
> > > break strict-aliasing rules
> > > 
> > > Signed-off-by: Wolfgang Denk <wd@denx.de>
> > > Cc: Guennadi Liakhovetski <lg@denx.de>
> > > ---
> > >  board/linkstation/ide.c |    4 +++-
> > >  1 files changed, 3 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
> > > index 2c89d62..5dd1d0e 100644
> > > --- a/board/linkstation/ide.c
> > > +++ b/board/linkstation/ide.c
> > > @@ -54,10 +54,12 @@ int ide_preinit (void)
> > >  	if (devbusfn == -1)
> > >  		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
> > >  	if (devbusfn != -1) {
> > > +		ulong *ide_bus_offset_ptr = &ide_bus_offset[0];
> > > +
> > >  		status = 0;
> > >  
> > >  		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
> > > -							   (u32 *) &ide_bus_offset[0]);
> > > +							   (u32 *)ide_bus_offset_ptr);
> > 
> > Can we also use this occasion to get rid of this typecast?
> 
> No, as this would result in
> 
> ide.c:62: warning: passing argument 3 of 'pci_read_config_dword' from
> incompatible pointer type
> 
> OK, we can declare ide_bus_offset_ptr as u32 8, but then we need the
> cast there to avoid a "initialization from incompatible pointer type"
> warning - so this isn't exactly an improvement.

Ok, understand.

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

> 
> I suggest we leave it as is, as this is the minimal-invasive change.
> 
> If you want to submit a more general cleanup patch (unifying data
> types) you are welcome (but that would be a separate action in any
> case).
> 
> Best regards,
> 
> Wolfgang Denk

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/common/flash.c: Fix compile warning
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
@ 2009-09-11 13:06   ` Stefan Roese
  2009-09-14 22:30   ` Wolfgang Denk
  1 sibling, 0 replies; 26+ messages in thread
From: Stefan Roese @ 2009-09-11 13:06 UTC (permalink / raw)
  To: u-boot

On Friday 11 September 2009 11:49:19 Wolfgang Denk wrote:
> Fix warning: ../common/flash.c:917: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>

Acked-by: Stefan Roese <sr@denx.de>

Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/taihu/flash.c: Fix compile warning
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/taihu/flash.c: " Wolfgang Denk
@ 2009-09-11 13:07   ` Stefan Roese
  2009-09-14 22:28   ` Wolfgang Denk
  1 sibling, 0 replies; 26+ messages in thread
From: Stefan Roese @ 2009-09-11 13:07 UTC (permalink / raw)
  To: u-boot

On Friday 11 September 2009 11:49:22 Wolfgang Denk wrote:
> Fix warnings:
> flash.c: In function 'write_word_1':
> flash.c:696: warning: dereferencing type-punned pointer will break
>  strict-aliasing rules flash.c: In function 'write_word_2':
> flash.c:1044: warning: dereferencing type-punned pointer will break
>  strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>

Acked-by: Stefan Roese <sr@denx.de>

Thanks.
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/yucca/flash.c: Fix compile warning
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/yucca/flash.c: " Wolfgang Denk
@ 2009-09-11 13:08   ` Stefan Roese
  2009-09-14 22:29   ` Wolfgang Denk
  1 sibling, 0 replies; 26+ messages in thread
From: Stefan Roese @ 2009-09-11 13:08 UTC (permalink / raw)
  To: u-boot

On Friday 11 September 2009 11:49:23 Wolfgang Denk wrote:
> Fix warning: flash.c:919: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>

Acked-by: Stefan Roese <sr@denx.de>

Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning
  2009-09-11 12:00     ` Wolfgang Denk
  2009-09-11 12:03       ` Guennadi Liakhovetski
@ 2009-09-11 17:54       ` Scott Wood
  2009-09-14 22:26         ` [U-Boot] [PATCH v2] " Wolfgang Denk
  1 sibling, 1 reply; 26+ messages in thread
From: Scott Wood @ 2009-09-11 17:54 UTC (permalink / raw)
  To: u-boot

On Fri, Sep 11, 2009 at 02:00:06PM +0200, Wolfgang Denk wrote:
> In message <Pine.LNX.4.64.0909111259280.6139@axis700.grange> you wrote:
> > On Fri, 11 Sep 2009, Wolfgang Denk wrote:
> > > Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
> > > break strict-aliasing rules
> > > 
> > > Signed-off-by: Wolfgang Denk <wd@denx.de>
> > > Cc: Guennadi Liakhovetski <lg@denx.de>
> > > ---
> > >  board/linkstation/ide.c |    4 +++-
> > >  1 files changed, 3 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
> > > index 2c89d62..5dd1d0e 100644
> > > --- a/board/linkstation/ide.c
> > > +++ b/board/linkstation/ide.c
> > > @@ -54,10 +54,12 @@ int ide_preinit (void)
> > >  	if (devbusfn == -1)
> > >  		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
> > >  	if (devbusfn != -1) {
> > > +		ulong *ide_bus_offset_ptr = &ide_bus_offset[0];
> > > +
> > >  		status = 0;
> > >  
> > >  		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
> > > -							   (u32 *) &ide_bus_offset[0]);
> > > +							   (u32 *)ide_bus_offset_ptr);
> > 
> > Can we also use this occasion to get rid of this typecast?
> 
> No, as this would result in
> 
> ide.c:62: warning: passing argument 3 of 'pci_read_config_dword' from
> incompatible pointer type

What about something like:

u32 ide_bus_offset32;
pci_read_config_dword(..., &ide_bus_offset32);
ide_bus_offset[0] = ide_bus_offset32;

-Scott

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning
  2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
                   ` (4 preceding siblings ...)
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/yucca/flash.c: " Wolfgang Denk
@ 2009-09-14 22:16 ` Wolfgang Denk
  5 siblings, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-14 22:16 UTC (permalink / raw)
  To: u-boot

In message <1252662563-18284-1-git-send-email-wd@denx.de> you wrote:
> Fix warning: ../common/flash.c:668: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Andrea Marson <andrea.marson@dave-tech.it>
> ---
>  board/dave/common/flash.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied.

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Veni, Vidi, VISA:
        I came, I saw, I did a little shopping.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error Wolfgang Denk
@ 2009-09-14 22:18   ` Wolfgang Denk
  0 siblings, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-14 22:18 UTC (permalink / raw)
  To: u-boot

In message <1252662563-18284-3-git-send-email-wd@denx.de> you wrote:
> Fix build problem caused by commit e84aba13: "Replace BCD2BIN and
> BIN2BCD macros with inline functions"
> 
> phantom.c:163: error: redefinition of 'bcd2bin'
> /home/wd/git/u-boot/work/include/bcd.h:16: error: previous definition of 'bcd2bin' was here
> phantom.c:168: error: redefinition of 'bin2bcd'
> /home/wd/git/u-boot/work/include/bcd.h:21: error: previous definition of 'bin2bcd' was here
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Sangmoon Kim <dogoil@etinsys.com>
> ---
>  board/etin/debris/phantom.c |   10 ----------
>  1 files changed, 0 insertions(+), 10 deletions(-)

Applied.

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Plan to throw one away.  You will anyway."
                              - Fred Brooks, "The Mythical Man Month"

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-11 17:54       ` Scott Wood
@ 2009-09-14 22:26         ` Wolfgang Denk
  2009-09-15 20:42           ` Guennadi Liakhovetski
  2009-09-22 21:54           ` Wolfgang Denk
  0 siblings, 2 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-14 22:26 UTC (permalink / raw)
  To: u-boot

Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Guennadi Liakhovetski <lg@denx.de>

---
v2: Better implementation as suggested by Scott Wood in
    http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/67840/focus=67891

 board/linkstation/ide.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
index 2c89d62..568fdf5 100644
--- a/board/linkstation/ide.c
+++ b/board/linkstation/ide.c
@@ -54,11 +54,13 @@ int ide_preinit (void)
 	if (devbusfn == -1)
 		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
 	if (devbusfn != -1) {
+		u32 ide_bus_offset32;
+
 		status = 0;
 
 		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
-							   (u32 *) &ide_bus_offset[0]);
-		ide_bus_offset[0] &= 0xfffffffe;
+							   &ide_bus_offset32);
+		ide_bus_offset[0] = ide_bus_offset32 & 0xfffffffe;
 		ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
 							 ide_bus_offset[0] & 0xfffffffe,
 							 PCI_REGION_IO);
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/taihu/flash.c: Fix compile warning
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/taihu/flash.c: " Wolfgang Denk
  2009-09-11 13:07   ` Stefan Roese
@ 2009-09-14 22:28   ` Wolfgang Denk
  1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-14 22:28 UTC (permalink / raw)
  To: u-boot

In message <1252662563-18284-5-git-send-email-wd@denx.de> you wrote:
> Fix warnings:
> flash.c: In function 'write_word_1':
> flash.c:696: warning: dereferencing type-punned pointer will break strict-aliasing rules
> flash.c: In function 'write_word_2':
> flash.c:1044: warning: dereferencing type-punned pointer will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> ---
>  board/amcc/taihu/flash.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)

Applied.

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Alan Turing thought about criteria to settle the question of  whether
machines  can think, a question of which we now know that it is about
as relevant as the question of whether submarines can swim.
                                                   -- Edsger Dijkstra

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/yucca/flash.c: Fix compile warning
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/yucca/flash.c: " Wolfgang Denk
  2009-09-11 13:08   ` Stefan Roese
@ 2009-09-14 22:29   ` Wolfgang Denk
  1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-14 22:29 UTC (permalink / raw)
  To: u-boot

In message <1252662563-18284-6-git-send-email-wd@denx.de> you wrote:
> Fix warning: flash.c:919: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> ---
>  board/amcc/yucca/flash.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)

Applied.

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Do not underestimate the value of print statements for debugging.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH] board/amcc/common/flash.c: Fix compile warning
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
  2009-09-11 13:06   ` Stefan Roese
@ 2009-09-14 22:30   ` Wolfgang Denk
  1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-14 22:30 UTC (permalink / raw)
  To: u-boot

In message <1252662563-18284-2-git-send-email-wd@denx.de> you wrote:
> Fix warning: ../common/flash.c:917: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> ---
>  board/amcc/common/flash.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)

Applied.

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In the beginning there was nothing.
And the Lord said "Let There Be Light!"
And still there was nothing, but at least now you could see it.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-14 22:26         ` [U-Boot] [PATCH v2] " Wolfgang Denk
@ 2009-09-15 20:42           ` Guennadi Liakhovetski
  2009-09-15 21:16             ` Wolfgang Denk
  2009-09-22 21:54           ` Wolfgang Denk
  1 sibling, 1 reply; 26+ messages in thread
From: Guennadi Liakhovetski @ 2009-09-15 20:42 UTC (permalink / raw)
  To: u-boot

On Tue, 15 Sep 2009, Wolfgang Denk wrote:

> Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Guennadi Liakhovetski <lg@denx.de>
> 
> ---
> v2: Better implementation as suggested by Scott Wood in
>     http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/67840/focus=67891
> 
>  board/linkstation/ide.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
> index 2c89d62..568fdf5 100644
> --- a/board/linkstation/ide.c
> +++ b/board/linkstation/ide.c
> @@ -54,11 +54,13 @@ int ide_preinit (void)
>  	if (devbusfn == -1)
>  		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
>  	if (devbusfn != -1) {
> +		u32 ide_bus_offset32;
> +
>  		status = 0;
>  
>  		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
> -							   (u32 *) &ide_bus_offset[0]);
> -		ide_bus_offset[0] &= 0xfffffffe;
> +							   &ide_bus_offset32);
> +		ide_bus_offset[0] = ide_bus_offset32 & 0xfffffffe;
>  		ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
>  							 ide_bus_offset[0] & 0xfffffffe,
>  							 PCI_REGION_IO);

Ok, yes, this looks much better now without casts, but - the double " & 
0xfffffffe" above seems completely redundant to me. I understand, that 
that's not the problem you're fixing with this patch, and I will perfectly 
understand if you refuse to mix these two fixes, but... Another thing - 
why doesn't the compiler complain about exactly identical cast (ok, 
almost) a couple of lines down for ide_bus_offset[1]? So, how about this 
diff instead (only compile-tested) (not for submission yet, so, no Sob's, 
no patch header):

diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
index 2c89d62..f96af74 100644
--- a/board/linkstation/ide.c
+++ b/board/linkstation/ide.c
@@ -54,20 +54,23 @@ int ide_preinit (void)
 	if (devbusfn == -1)
 		devbusfn = pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
 	if (devbusfn != -1) {
+		u32 ide_bus_offset32;
+
 		status = 0;
 
-		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
-							   (u32 *) &ide_bus_offset[0]);
-		ide_bus_offset[0] &= 0xfffffffe;
+		pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0,
+				      &ide_bus_offset32);
+		ide_bus_offset[0] = ide_bus_offset32 & 0xfffffffe;
 		ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
-							 ide_bus_offset[0] & 0xfffffffe,
-							 PCI_REGION_IO);
-		pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_2,
-				      (u32 *) &ide_bus_offset[1]);
-		ide_bus_offset[1] &= 0xfffffffe;
-		ide_bus_offset[1] = pci_hose_bus_to_phys(&hose,
-							 ide_bus_offset[1] & 0xfffffffe,
-							 PCI_REGION_IO);
+					ide_bus_offset[0], PCI_REGION_IO);
+
+		if (CONFIG_SYS_IDE_MAXBUS > 1) {
+			pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_2,
+					      &ide_bus_offset32);
+			ide_bus_offset[1] = ide_bus_offset32 & 0xfffffffe;
+			ide_bus_offset[1] = pci_hose_bus_to_phys(&hose,
+					ide_bus_offset[1], PCI_REGION_IO);
+		}
 	}
 
 	if (pci_find_device (PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8212, 0) != -1) {

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-15 20:42           ` Guennadi Liakhovetski
@ 2009-09-15 21:16             ` Wolfgang Denk
  2009-09-16 20:42               ` Guennadi Liakhovetski
  0 siblings, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-15 21:16 UTC (permalink / raw)
  To: u-boot

Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0909152214370.4640@axis700.grange> you wrote:
> 
> >  		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
> > -							   (u32 *) &ide_bus_offset[0]);
> > -		ide_bus_offset[0] &= 0xfffffffe;
> > +							   &ide_bus_offset32);
> > +		ide_bus_offset[0] = ide_bus_offset32 & 0xfffffffe;
> >  		ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
> >  							 ide_bus_offset[0] & 0xfffffffe,
> >  							 PCI_REGION_IO);
> 
> Ok, yes, this looks much better now without casts, but - the double " & 
> 0xfffffffe" above seems completely redundant to me. I understand, that 
> that's not the problem you're fixing with this patch, and I will perfectly 
> understand if you refuse to mix these two fixes, but... Another thing - 

Ah, I see. Sorry I missed that. It's easy to fix.

> why doesn't the compiler complain about exactly identical cast (ok, 
> almost) a couple of lines down for ide_bus_offset[1]? So, how about this 

Good question. Please post it on a gcc mailing ist and report back the
results you get.

> diff instead (only compile-tested) (not for submission yet, so, no Sob's, 
> no patch header):

Hm, this is much more intrusive - do you have a way to test in on real
hardware?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If God wanted me to touch my toes, he'd have put them on my knees.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-15 21:16             ` Wolfgang Denk
@ 2009-09-16 20:42               ` Guennadi Liakhovetski
  2009-09-22 20:26                 ` Wolfgang Denk
  0 siblings, 1 reply; 26+ messages in thread
From: Guennadi Liakhovetski @ 2009-09-16 20:42 UTC (permalink / raw)
  To: u-boot

On Tue, 15 Sep 2009, Wolfgang Denk wrote:

> Dear Guennadi Liakhovetski,
> 
> In message <Pine.LNX.4.64.0909152214370.4640@axis700.grange> you wrote:
> > 
> > >  		pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
> > > -							   (u32 *) &ide_bus_offset[0]);
> > > -		ide_bus_offset[0] &= 0xfffffffe;
> > > +							   &ide_bus_offset32);
> > > +		ide_bus_offset[0] = ide_bus_offset32 & 0xfffffffe;
> > >  		ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
> > >  							 ide_bus_offset[0] & 0xfffffffe,
> > >  							 PCI_REGION_IO);
> > 
> > Ok, yes, this looks much better now without casts, but - the double " & 
> > 0xfffffffe" above seems completely redundant to me. I understand, that 
> > that's not the problem you're fixing with this patch, and I will perfectly 
> > understand if you refuse to mix these two fixes, but... Another thing - 
> 
> Ah, I see. Sorry I missed that. It's easy to fix.
> 
> > why doesn't the compiler complain about exactly identical cast (ok, 
> > almost) a couple of lines down for ide_bus_offset[1]? So, how about this 
> 
> Good question. Please post it on a gcc mailing ist and report back the
> results you get.
> 
> > diff instead (only compile-tested) (not for submission yet, so, no Sob's, 
> > no patch header):
> 
> Hm, this is much more intrusive - do you have a way to test in on real
> hardware?

I have the hardware, yes, and I even have something, that should be a Jtag 
cable for it... But I don't have near 100% certainty, that if I brick it I 
will be able in reasonable time to recover it... But, hey, that's what I 
have that hardware for... So, yes, I would be able to test, just not 
immediately.

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-16 20:42               ` Guennadi Liakhovetski
@ 2009-09-22 20:26                 ` Wolfgang Denk
  2009-09-22 20:51                   ` Guennadi Liakhovetski
  0 siblings, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-22 20:26 UTC (permalink / raw)
  To: u-boot

Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0909162240120.19291@axis700.grange> you wrote:
> 
> I have the hardware, yes, and I even have something, that should be a Jtag 
> cable for it... But I don't have near 100% certainty, that if I brick it I 
> will be able in reasonable time to recover it... But, hey, that's what I 
> have that hardware for... So, yes, I would be able to test, just not 
> immediately.

Do you think you can submit this patch before the end of the current
merge window? Otherwise I'd check in my previous clean up patch now,
and then wait for your rework in the next (?) version.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A modem is a baudy house.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-22 20:26                 ` Wolfgang Denk
@ 2009-09-22 20:51                   ` Guennadi Liakhovetski
  2009-09-22 21:54                     ` Wolfgang Denk
  0 siblings, 1 reply; 26+ messages in thread
From: Guennadi Liakhovetski @ 2009-09-22 20:51 UTC (permalink / raw)
  To: u-boot

On Tue, 22 Sep 2009, Wolfgang Denk wrote:

> Dear Guennadi Liakhovetski,
> 
> In message <Pine.LNX.4.64.0909162240120.19291@axis700.grange> you wrote:
> > 
> > I have the hardware, yes, and I even have something, that should be a Jtag 
> > cable for it... But I don't have near 100% certainty, that if I brick it I 
> > will be able in reasonable time to recover it... But, hey, that's what I 
> > have that hardware for... So, yes, I would be able to test, just not 
> > immediately.
> 
> Do you think you can submit this patch before the end of the current
> merge window? Otherwise I'd check in my previous clean up patch now,
> and then wait for your rework in the next (?) version.

don't think so, very unlikely I'll have time for this in the next month.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-14 22:26         ` [U-Boot] [PATCH v2] " Wolfgang Denk
  2009-09-15 20:42           ` Guennadi Liakhovetski
@ 2009-09-22 21:54           ` Wolfgang Denk
  1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:54 UTC (permalink / raw)
  To: u-boot


In message <1252967162-15935-1-git-send-email-wd@denx.de> you wrote:
> Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Guennadi Liakhovetski <lg@denx.de>
> 
> ---
> v2: Better implementation as suggested by Scott Wood in
>     http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/67840/focus=67891
> 
>  board/linkstation/ide.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

Applied.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
...computer hardware progress is so fast. No other  technology  since
civilization  began  has seen six orders of magnitude in performance-
price gain in 30 years.                             - Fred Brooks, Jr.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning
  2009-09-22 20:51                   ` Guennadi Liakhovetski
@ 2009-09-22 21:54                     ` Wolfgang Denk
  0 siblings, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:54 UTC (permalink / raw)
  To: u-boot

Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0909222249420.6690@axis700.grange> you wrote:
> On Tue, 22 Sep 2009, Wolfgang Denk wrote:
> 
> > Dear Guennadi Liakhovetski,
> > 
> > In message <Pine.LNX.4.64.0909162240120.19291@axis700.grange> you wrote:
> > > 
> > > I have the hardware, yes, and I even have something, that should be a Jtag 
> > > cable for it... But I don't have near 100% certainty, that if I brick it I 
> > > will be able in reasonable time to recover it... But, hey, that's what I 
> > > have that hardware for... So, yes, I would be able to test, just not 
> > > immediately.
> > 
> > Do you think you can submit this patch before the end of the current
> > merge window? Otherwise I'd check in my previous clean up patch now,
> > and then wait for your rework in the next (?) version.
> 
> don't think so, very unlikely I'll have time for this in the next month.

OK, so please submit an incremental patch whenever you find time.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"An open mind has but one disadvantage: it collects dirt."
                                                    - a saying at RPI

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2009-09-22 21:54 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
2009-09-11 13:06   ` Stefan Roese
2009-09-14 22:30   ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error Wolfgang Denk
2009-09-14 22:18   ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning Wolfgang Denk
2009-09-11 11:00   ` Guennadi Liakhovetski
2009-09-11 12:00     ` Wolfgang Denk
2009-09-11 12:03       ` Guennadi Liakhovetski
2009-09-11 17:54       ` Scott Wood
2009-09-14 22:26         ` [U-Boot] [PATCH v2] " Wolfgang Denk
2009-09-15 20:42           ` Guennadi Liakhovetski
2009-09-15 21:16             ` Wolfgang Denk
2009-09-16 20:42               ` Guennadi Liakhovetski
2009-09-22 20:26                 ` Wolfgang Denk
2009-09-22 20:51                   ` Guennadi Liakhovetski
2009-09-22 21:54                     ` Wolfgang Denk
2009-09-22 21:54           ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/taihu/flash.c: " Wolfgang Denk
2009-09-11 13:07   ` Stefan Roese
2009-09-14 22:28   ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/yucca/flash.c: " Wolfgang Denk
2009-09-11 13:08   ` Stefan Roese
2009-09-14 22:29   ` Wolfgang Denk
2009-09-14 22:16 ` [U-Boot] [PATCH] board/dave/common/flash.c: fix " Wolfgang Denk

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.