Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45416 )
Change subject: soc/intel/common/block/chip: Refactor chip_get_common_soc_structure() ......................................................................
soc/intel/common/block/chip: Refactor chip_get_common_soc_structure()
Found-by: Klocwork, Pointer soc_config is used uninitialized.
Signed-off-by: Subrata Banik subrata.banik@intel.com Change-Id: I7e2aa4ef23a68a2ec2ba9d55cf890a7f81e3e278 --- M src/soc/intel/common/block/chip/chip.c 1 file changed, 1 insertion(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/45416/1
diff --git a/src/soc/intel/common/block/chip/chip.c b/src/soc/intel/common/block/chip/chip.c index 09f2c47..a9bfb17 100644 --- a/src/soc/intel/common/block/chip/chip.c +++ b/src/soc/intel/common/block/chip/chip.c @@ -5,11 +5,5 @@
const struct soc_intel_common_config *chip_get_common_soc_structure(void) { - const struct soc_intel_common_config *soc_config; - const config_t *config; - - config = config_of_soc(); - soc_config = &config->common_soc_config; - - return soc_config; + return &config_of_soc()->common_soc_config; }
Hello Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45416
to look at the new patch set (#2).
Change subject: soc/intel/common/block/chip: Refactor chip_get_common_soc_structure() ......................................................................
soc/intel/common/block/chip: Refactor chip_get_common_soc_structure()
Found-by: Klocwork, Pointer soc_config is used uninitialized.
Signed-off-by: Subrata Banik subrata.banik@intel.com Change-Id: I7e2aa4ef23a68a2ec2ba9d55cf890a7f81e3e278 --- M src/soc/intel/common/block/chip/chip.c 1 file changed, 1 insertion(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/45416/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45416 )
Change subject: soc/intel/common/block/chip: Refactor chip_get_common_soc_structure() ......................................................................
Patch Set 2: Code-Review+2
Subrata Banik has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45416 )
Change subject: soc/intel/common/block/chip: Refactor chip_get_common_soc_structure() ......................................................................
soc/intel/common/block/chip: Refactor chip_get_common_soc_structure()
Found-by: Klocwork, Pointer soc_config is used uninitialized.
Signed-off-by: Subrata Banik subrata.banik@intel.com Change-Id: I7e2aa4ef23a68a2ec2ba9d55cf890a7f81e3e278 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45416 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/soc/intel/common/block/chip/chip.c 1 file changed, 1 insertion(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/soc/intel/common/block/chip/chip.c b/src/soc/intel/common/block/chip/chip.c index 09f2c47..f52d2423 100644 --- a/src/soc/intel/common/block/chip/chip.c +++ b/src/soc/intel/common/block/chip/chip.c @@ -1,15 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <soc/pci_devs.h> #include <soc/soc_chip.h>
const struct soc_intel_common_config *chip_get_common_soc_structure(void) { - const struct soc_intel_common_config *soc_config; - const config_t *config; - - config = config_of_soc(); - soc_config = &config->common_soc_config; - - return soc_config; + return &((config_t *)config_of_soc())->common_soc_config; }
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45416 )
Change subject: soc/intel/common/block/chip: Refactor chip_get_common_soc_structure() ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 8/1/9 "QEMU x86 q35/ich9" (x86_32) using payload TianoCore : SUCCESS : https://lava.9esec.io/r/19674 "QEMU x86 q35/ich9" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/19673 "QEMU x86 i440fx/piix4" (x86_64) using payload SeaBIOS : FAIL : https://lava.9esec.io/r/19672 "QEMU x86 i440fx/piix4" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/19671 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/19670 "HP Z220 SFF Workstation" (x86_32) using payload LinuxBoot_BusyBox_kexec : SUCCESS : https://lava.9esec.io/r/19678 "HP Z220 SFF Workstation" (x86_32) using payload LinuxBoot_BusyBox_kexec : SUCCESS : https://lava.9esec.io/r/19677 "HP Compaq 8200 Elite SFF PC" (x86_32) using payload TianoCore : SUCCESS : https://lava.9esec.io/r/19676 "HP Compaq 8200 Elite SFF PC" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/19675
Please note: This test is under development and might not be accurate at all!