From: Wolfgang Denk Date: Tue, 15 Sep 2009 23:16:02 +0200 Subject: [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning In-Reply-To: References: <20090911175411.GC13783@b07421-ec1.am.freescale.net> <1252967162-15935-1-git-send-email-wd@denx.de> Message-ID: <20090915211602.84B40832E864@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Guennadi Liakhovetski, In message 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.