Skip to content
Snippets Groups Projects
Commit 53862da9 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

board/linkstation/ide.c: Fix GCC 4.6 build warnings


Fix:
ide.c: In function 'ide_preinit':
ide.c:69:21: warning: array subscript is above array bounds
[-Warray-bounds]
ide.c:69:21: warning: array subscript is above array bounds
[-Warray-bounds]
ide.c:70:17: warning: array subscript is above array bounds
[-Warray-bounds]

Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
parent afb92010
No related branches found
No related tags found
No related merge requests found
...@@ -62,14 +62,16 @@ int ide_preinit (void) ...@@ -62,14 +62,16 @@ int ide_preinit (void)
&ide_bus_offset32); &ide_bus_offset32);
ide_bus_offset[0] = ide_bus_offset32 & 0xfffffffe; ide_bus_offset[0] = ide_bus_offset32 & 0xfffffffe;
ide_bus_offset[0] = pci_hose_bus_to_phys(&hose, ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
ide_bus_offset[0] & 0xfffffffe, ide_bus_offset[0] & 0xfffffffe,
PCI_REGION_IO); PCI_REGION_IO);
pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_2, if (CONFIG_SYS_IDE_MAXBUS > 1) {
(u32 *) &ide_bus_offset[1]); pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_2,
ide_bus_offset[1] &= 0xfffffffe; (u32 *) &ide_bus_offset[1]);
ide_bus_offset[1] = pci_hose_bus_to_phys(&hose, ide_bus_offset[1] &= 0xfffffffe;
ide_bus_offset[1] & 0xfffffffe, ide_bus_offset[1] = pci_hose_bus_to_phys(&hose,
PCI_REGION_IO); ide_bus_offset[1] & 0xfffffffe,
PCI_REGION_IO);
}
} }
if (pci_find_device (PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8212, 0) != -1) { if (pci_find_device (PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8212, 0) != -1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment