northbridge/amd/pi: Arithmetics is not logic

It's pretty obvious that the author did not want to use a logical
and (&&) here but an arithmetical and (&)

Change-Id: Ic1bece86986906b76308bbb46235c22418e27990
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20388
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Stefan Reinauer 2017-06-27 00:46:22 +02:00
parent 5128f1b593
commit bc3150913b
2 changed files with 2 additions and 2 deletions

View File

@ -869,7 +869,7 @@ static void cpu_bus_scan(device_t dev)
AmdGetValue(AMD_GLOBAL_USER_OPTIONS, (VOID**)&options, sizeof(options));
AmdGetValue(AMD_GLOBAL_NUM_MODULES, &modules_ptr, sizeof(modules));
modules = (*(u32*)modules_ptr) && ((1ull << (sizeof(modules) * 8)) - 1);
modules = (*(u32 *)modules_ptr) & ((1ull << (sizeof(modules) * 8)) - 1);
ASSERT(modules > 0);
ASSERT(options);
ioapic_count = (int)options->CfgPlatNumIoApics;

View File

@ -878,7 +878,7 @@ static void cpu_bus_scan(device_t dev)
AmdGetValue(AMD_GLOBAL_USER_OPTIONS, (VOID**)&options, sizeof(options));
AmdGetValue(AMD_GLOBAL_NUM_MODULES, &modules_ptr, sizeof(modules));
modules = (*(u32*)modules_ptr) && ((1ull << (sizeof(modules) * 8)) - 1);
modules = (*(u32 *)modules_ptr) & ((1ull << (sizeof(modules) * 8)) - 1);
ASSERT(modules > 0);
ASSERT(options);
ioapic_count = (int)options->CfgPlatNumIoApics;