linux-mips
[Top] [All Lists]

[PATCH] MIPS: TXx9: Fix quirk_slc90e66_ide

To: linux-mips@linux-mips.org
Subject: [PATCH] MIPS: TXx9: Fix quirk_slc90e66_ide
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sat, 28 Jun 2014 23:56:00 +0900
Cc: ralf@linux-mips.org
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Fix wrong code spotted by -Werror=array-bounds:
        arch/mips/txx9/generic/pci.c:334:23: error: array subscript is above 
array bounds [-Werror=array-bounds]
          pci_write_config_byte(dev, regs[i], dat);

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 arch/mips/txx9/generic/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index 2871327..3c5f180 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -331,7 +331,7 @@ static void quirk_slc90e66_ide(struct pci_dev *dev)
         * !!! DO NOT REMOVE THIS COMMENT IT IS REQUIRED BY SMSC !!!
         */
        dat |= 0x01;
-       pci_write_config_byte(dev, regs[i], dat);
+       pci_write_config_byte(dev, 0x5c, dat);
        pci_read_config_byte(dev, 0x5c, &dat);
        printk(KERN_CONT " REG5C %02x", dat);
        printk(KERN_CONT "\n");
-- 
1.7.9.5


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] MIPS: TXx9: Fix quirk_slc90e66_ide, Atsushi Nemoto <=