From: Wolfgang Denk Date: Mon, 14 Sep 2009 22:26:02 +0000 (+0200) Subject: board/linkstation/ide.c: Fix compile warning X-Git-Tag: v2010.09-rc1~28^2~7^2~42^2~66 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7893d471945e45ed94bd250e03fa5bd70c178e06;p=karo-tx-uboot.git board/linkstation/ide.c: Fix compile warning Fix warning: ide.c:60: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Wolfgang Denk Cc: Guennadi Liakhovetski --- diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c index 2c89d62f61..568fdf5f2e 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);