diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2011-11-09 06:21:10 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-11-16 21:00:54 +0100 |
commit | 7625dd68e30e7782afce37c8d5e259fcb8d669ec (patch) | |
tree | 9affb5a67566a7e54a519dce0e67df763b6223ab /drivers/block/sata_sil3114.c | |
parent | 755cf792bd6c599febfcac23814dee55074aa23c (diff) | |
download | u-boot-imx-7625dd68e30e7782afce37c8d5e259fcb8d669ec.zip u-boot-imx-7625dd68e30e7782afce37c8d5e259fcb8d669ec.tar.gz u-boot-imx-7625dd68e30e7782afce37c8d5e259fcb8d669ec.tar.bz2 |
drivers/block/sata_sil3114.c: Fix GCC 4.6 build warning
Fix:
sata_sil3114.c: In function 'scan_sata':
sata_sil3114.c:793:7: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:794:7: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:795:39: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:795:7: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:797:7: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:800:7: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:801:7: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:802:39: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:802:7: warning: array subscript is above array bounds [-Warray-bounds]
sata_sil3114.c:804:7: warning: array subscript is above array bounds [-Warray-bounds]
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/block/sata_sil3114.c')
-rw-r--r-- | drivers/block/sata_sil3114.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/sata_sil3114.c b/drivers/block/sata_sil3114.c index 1e60636..34fe038 100644 --- a/drivers/block/sata_sil3114.c +++ b/drivers/block/sata_sil3114.c @@ -782,6 +782,7 @@ int scan_sata (int dev) (iobase[5] + VND_TF2_CH0) | ATA_PCI_CTL_OFS; port[0].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH0; break; +#if (CONFIG_SYS_SATA_MAX_DEVICE >= 1) case 1: port[1].port_no = 0; port[1].ioaddr.cmd_addr = iobase[5] + VND_TF0_CH1; @@ -789,6 +790,7 @@ int scan_sata (int dev) (iobase[5] + VND_TF2_CH1) | ATA_PCI_CTL_OFS; port[1].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH1; break; +#elif (CONFIG_SYS_SATA_MAX_DEVICE >= 2) case 2: port[2].port_no = 0; port[2].ioaddr.cmd_addr = iobase[5] + VND_TF0_CH2; @@ -796,6 +798,7 @@ int scan_sata (int dev) (iobase[5] + VND_TF2_CH2) | ATA_PCI_CTL_OFS; port[2].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH2; break; +#elif (CONFIG_SYS_SATA_MAX_DEVICE >= 3) case 3: port[3].port_no = 0; port[3].ioaddr.cmd_addr = iobase[5] + VND_TF0_CH3; @@ -803,6 +806,7 @@ int scan_sata (int dev) (iobase[5] + VND_TF2_CH3) | ATA_PCI_CTL_OFS; port[3].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH3; break; +#endif default: printf ("Tried to scan unknown port: ata%d\n", dev); return 1; |