Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62094 )
Change subject: nb/amd/amdfam10/bootblock.c: Simplify IF condition ......................................................................
nb/amd/amdfam10/bootblock.c: Simplify IF condition
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: I484f9995cb2732336aca9e3e2c1324208e1e36dc --- M src/northbridge/amd/amdfam10/bootblock.c 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/62094/1
diff --git a/src/northbridge/amd/amdfam10/bootblock.c b/src/northbridge/amd/amdfam10/bootblock.c index 59ae732..07f3d6b 100644 --- a/src/northbridge/amd/amdfam10/bootblock.c +++ b/src/northbridge/amd/amdfam10/bootblock.c @@ -18,6 +18,7 @@ #include <arch/bootblock.h> #include <device/pci_ops.h> #include <device/pci_def.h> +#include <limits.h>
// For SB HT chain only static void set_bsp_node_CHtExtNodeCfgEn(void) @@ -75,9 +76,7 @@
id = pci_read_config32(PCI_DEV(0,0,0), PCI_VENDOR_ID); /* If the chain is enumerated quit */ - if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) || - (((id >> 16) & 0xffff) == 0xffff) || - (((id >> 16) & 0xffff) == 0x0000)) + if (id == 0 || id == ULONG_MAX) { break; }