HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/29917 )
Change subject: src: Remove unused variables ......................................................................
Patch Set 15: Code-Review-1
(6 comments)
https://review.coreboot.org/#/c/29917/15/src/cpu/amd/family_10h-family_15h/i... File src/cpu/amd/family_10h-family_15h/init_cpus.c:
https://review.coreboot.org/#/c/29917/15/src/cpu/amd/family_10h-family_15h/i... PS15, Line 1062: !!
not needed
are you sure? I'm fine with removing this, but it was used this way (and it is also used at line #1076). I believe, that the Author know that (!!x = x), so if he used !!nvram, maybe there is a reason.
https://review.coreboot.org/#/c/29917/15/src/northbridge/intel/pineview/earl... File src/northbridge/intel/pineview/early_init.c:
https://review.coreboot.org/#/c/29917/15/src/northbridge/intel/pineview/earl... PS15, Line 123: u32 reg32;
is it me or is reg32 not needed at all?
I don't know if that register needs a read before a write ... in fact, I didn't find the datasheet :(
https://review.coreboot.org/#/c/29917/15/src/northbridge/intel/x4x/early_ini... File src/northbridge/intel/x4x/early_init.c:
https://review.coreboot.org/#/c/29917/15/src/northbridge/intel/x4x/early_ini... PS15, Line 243: is it needed to read reg16 over DIMBAR32 here ?
https://review.coreboot.org/#/c/29917/15/src/soc/intel/fsp_baytrail/romstage... File src/soc/intel/fsp_baytrail/romstage/romstage.c:
https://review.coreboot.org/#/c/29917/15/src/soc/intel/fsp_baytrail/romstage... PS15, Line 253: cbmem_was_initted
Do we need this variable? I would call cbmem_recovery inside here instead.
You are right, but that will be some "crowded" Usually, we don't put an instruction inside the is "condition".
https://review.coreboot.org/#/c/29917/15/src/soc/intel/fsp_broadwell_de/roms... File src/soc/intel/fsp_broadwell_de/romstage/romstage.c:
https://review.coreboot.org/#/c/29917/15/src/soc/intel/fsp_broadwell_de/roms... PS15, Line 119: cbmem_was_initted
Same
Oops, it shoild be '!cbmem_was_initted'
https://review.coreboot.org/#/c/29917/15/src/southbridge/intel/fsp_rangeley/... File src/southbridge/intel/fsp_rangeley/romstage.c:
https://review.coreboot.org/#/c/29917/15/src/southbridge/intel/fsp_rangeley/... PS15, Line 122: cbmem_was_initted
Same
sould be "!cbmem_was_initted"