mainboard: Fix correct index variable usage in double loop construct

Change-Id: I672c532c3f7179038d41f269bba434b8703e254b
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Found-by: Clang
Reviewed-on: http://review.coreboot.org/7718
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Edward O'Callaghan 2014-12-08 22:19:48 +11:00
parent b713d93525
commit 698dc74eba
4 changed files with 4 additions and 4 deletions

View File

@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr)
} }
if ((platform_config.PortHotplugMap & (1 << i)) != 0) { if ((platform_config.PortHotplugMap & (1 << i)) != 0) {
u16 j; u16 j;
pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */
/* Set Hotplug descriptor info */ /* Set Hotplug descriptor info */
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
u32 PortDescriptor; u32 PortDescriptor;

View File

@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr)
} }
if ((platform_config.PortHotplugMap & (1 << i)) != 0) { if ((platform_config.PortHotplugMap & (1 << i)) != 0) {
u16 j; u16 j;
pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */
/* Set Hotplug descriptor info */ /* Set Hotplug descriptor info */
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
u32 PortDescriptor; u32 PortDescriptor;

View File

@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr)
} }
if ((platform_config.PortHotplugMap & (1 << i)) != 0) { if ((platform_config.PortHotplugMap & (1 << i)) != 0) {
u16 j; u16 j;
pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */
/* Set Hotplug descriptor info */ /* Set Hotplug descriptor info */
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
u32 PortDescriptor; u32 PortDescriptor;

View File

@ -82,7 +82,7 @@ static void nb_platform_config(device_t nb_dev, AMD_NB_CONFIG *NbConfigPtr)
} }
if ((platform_config.PortHotplugMap & (1 << i)) != 0) { if ((platform_config.PortHotplugMap & (1 << i)) != 0) {
u16 j; u16 j;
pPcieConfig->PortConfiguration[j].PortHotplug = ON; /* Enable Hotplug */ pPcieConfig->PortConfiguration[i].PortHotplug = ON; /* Enable Hotplug */
/* Set Hotplug descriptor info */ /* Set Hotplug descriptor info */
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
u32 PortDescriptor; u32 PortDescriptor;