[coreboot-gerrit] Change in ...coreboot[master]: src: Remove unused variables

HAOUAS Elyes (Code Review) gerrit at coreboot.org
Mon Dec 3 08:28:41 CET 2018


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/init_cpus.c 
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/init_cpus.c@1062 
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/early_init.c 
File src/northbridge/intel/pineview/early_init.c:

https://review.coreboot.org/#/c/29917/15/src/northbridge/intel/pineview/early_init.c@123 
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_init.c 
File src/northbridge/intel/x4x/early_init.c:

https://review.coreboot.org/#/c/29917/15/src/northbridge/intel/x4x/early_init.c@a243 
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/romstage.c 
File src/soc/intel/fsp_baytrail/romstage/romstage.c:

https://review.coreboot.org/#/c/29917/15/src/soc/intel/fsp_baytrail/romstage/romstage.c@253 
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/romstage/romstage.c 
File src/soc/intel/fsp_broadwell_de/romstage/romstage.c:

https://review.coreboot.org/#/c/29917/15/src/soc/intel/fsp_broadwell_de/romstage/romstage.c@119 
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/romstage.c 
File src/southbridge/intel/fsp_rangeley/romstage.c:

https://review.coreboot.org/#/c/29917/15/src/southbridge/intel/fsp_rangeley/romstage.c@122 
PS15, Line 122: cbmem_was_initted
> Same
sould be "!cbmem_was_initted"



-- 
To view, visit https://review.coreboot.org/c/coreboot/+/29917
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibdfbf1031130ff861c4313d1271d6ccb68bf8837
Gerrit-Change-Number: 29917
Gerrit-PatchSet: 15
Gerrit-Owner: HAOUAS Elyes <ehaouas at noos.fr>
Gerrit-Reviewer: Angel Pons <th3fanbus at gmail.com>
Gerrit-Reviewer: Damien Zammit <damien at zamaudio.com>
Gerrit-Reviewer: David Guckian <david.guckian at intel.com>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas at noos.fr>
Gerrit-Reviewer: Huang Jin <huang.jin at intel.com>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: York Yang <york.yang at intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-Comment-Date: Mon, 03 Dec 2018 07:28:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Angel Pons <th3fanbus at gmail.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181203/6b394922/attachment.html>


More information about the coreboot-gerrit mailing list