[U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning

Guennadi Liakhovetski g.liakhovetski at gmx.de
Wed Sep 16 22:42:33 CEST 2009


On Tue, 15 Sep 2009, Wolfgang Denk wrote:

> Dear Guennadi Liakhovetski,
> 
> In message <Pine.LNX.4.64.0909152214370.4640 at 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


More information about the U-Boot mailing list