[coreboot-gerrit] Change in coreboot[master]: device/dram/ddr2.c: Improve error returning and debug output

Nico Huber (Code Review) gerrit at coreboot.org
Sun Sep 10 21:35:01 CEST 2017


Nico Huber has posted comments on this change. ( https://review.coreboot.org/21480 )

Change subject: device/dram/ddr2.c: Improve error returning and debug output
......................................................................


Patch Set 2:

(7 comments)

Thanks for taking this up.

https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c
File src/device/dram/ddr2.c:

https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c@116
PS2, Line 116: static int spd_decode_tck_time(u8 c, u32 *tck)
I'd prefer the pointer to be the first argument (old writel vs
write32 debate).


https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c@119
PS2, Line 119: 	int ret = CB_SUCCESS;
We could just bail out directly and drop the variable. Not writing
`*tck` isn't bad, IMO. Just a matter of personal preference, I guess.


https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c@155
PS2, Line 155:  * Returns cycle time in 1/256th ns.
(I hate comments)


https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c@157
PS2, Line 157: u32
nit, er, int ;)


https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c@350
PS2, Line 350: 		printk(BIOS_WARNING, "  Invalid number of memory rows\n");
I don't think, we should keep the indent. With low loglevel, the
message would be freestanding. Also we might want to give some
context for that case, e.g. "... in SPD" or "SPD decode: ..."?


https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c@440
PS2, Line 440: 	if (spd_decode_bcd_time(spd[10], &dimm->access_time[cl]) != CB_SUCCESS) {
line is too long


https://review.coreboot.org/#/c/21480/2/src/device/dram/ddr2.c@480
PS2, Line 480: 		printk(BIOS_WARNING,"  Invalid rank density.\n");
space after comma, no space before the output?



-- 
To view, visit https://review.coreboot.org/21480
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iee434d1fa1a9d911cc3683b88b260881ed6434ea
Gerrit-Change-Number: 21480
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-Comment-Date: Sun, 10 Sep 2017 19:35:01 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170910/8ed285ad/attachment.html>


More information about the coreboot-gerrit mailing list