From 698dc74ebada21980781d9adb419b01de8f87d4b Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 8 Dec 2014 22:19:48 +1100 Subject: [PATCH] mainboard: Fix correct index variable usage in double loop construct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I672c532c3f7179038d41f269bba434b8703e254b Signed-off-by: Edward O'Callaghan Found-by: Clang Reviewed-on: http://review.coreboot.org/7718 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/mainboard/amd/dinar/rd890_cfg.c | 2 +- src/mainboard/supermicro/h8qgi/rd890_cfg.c | 2 +- src/mainboard/supermicro/h8scm/rd890_cfg.c | 2 +- src/mainboard/tyan/s8226/rd890_cfg.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mainboard/amd/dinar/rd890_cfg.c b/src/mainboard/amd/dinar/rd890_cfg.c index 783c130625..69c4d41831 100644 --- a/src/mainboard/amd/dinar/rd890_cfg.c +++ b/src/mainboard/amd/dinar/rd890_cfg.c @@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr) } if ((platform_config.PortHotplugMap & (1 << i)) != 0) { u16 j; - pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ + pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */ /* Set Hotplug descriptor info */ for (j = 0; j < 8; j++) { u32 PortDescriptor; diff --git a/src/mainboard/supermicro/h8qgi/rd890_cfg.c b/src/mainboard/supermicro/h8qgi/rd890_cfg.c index 9c91920d48..a5f6650956 100644 --- a/src/mainboard/supermicro/h8qgi/rd890_cfg.c +++ b/src/mainboard/supermicro/h8qgi/rd890_cfg.c @@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr) } if ((platform_config.PortHotplugMap & (1 << i)) != 0) { u16 j; - pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ + pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */ /* Set Hotplug descriptor info */ for (j = 0; j < 8; j++) { u32 PortDescriptor; diff --git a/src/mainboard/supermicro/h8scm/rd890_cfg.c b/src/mainboard/supermicro/h8scm/rd890_cfg.c index 9c91920d48..a5f6650956 100644 --- a/src/mainboard/supermicro/h8scm/rd890_cfg.c +++ b/src/mainboard/supermicro/h8scm/rd890_cfg.c @@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr) } if ((platform_config.PortHotplugMap & (1 << i)) != 0) { u16 j; - pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ + pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */ /* Set Hotplug descriptor info */ for (j = 0; j < 8; j++) { u32 PortDescriptor; diff --git a/src/mainboard/tyan/s8226/rd890_cfg.c b/src/mainboard/tyan/s8226/rd890_cfg.c index 9c91920d48..a5f6650956 100644 --- a/src/mainboard/tyan/s8226/rd890_cfg.c +++ b/src/mainboard/tyan/s8226/rd890_cfg.c @@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr) } if ((platform_config.PortHotplugMap & (1 << i)) != 0) { u16 j; - pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ + pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */ /* Set Hotplug descriptor info */ for (j = 0; j < 8; j++) { u32 PortDescriptor;