Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38359 )
Change subject: nb/intel/nehalem: Try to clean up code ......................................................................
Patch Set 6:
(1 comment)
Disclaimer: The rant should not be taken personally.
Patch Set 2:
Did you use a tool to do this?
Feel free to have a look at CB:36083 and CB:36084 ;)
No, I did this by hand. At most, I used search-and-replace.
https://review.coreboot.org/c/coreboot/+/38359/6/src/northbridge/intel/nehal... File src/northbridge/intel/nehalem/raminit.c:
https://review.coreboot.org/c/coreboot/+/38359/6/src/northbridge/intel/nehal... PS6, Line 312: FOR_RANGE_UP(i, 32) {
I’d prefer the for loops.
<rant>
Seriously? Do people read this file so often this matters? What about the long multidimensional array indexing that almost always needs to be split? And nothing wrong about the code that is indented almost outside of the 96-character limit???
Using these macros makes the loops consistent with the other for-loop macros. Most of the for-loops in the code are looping around a range, either up or down, and many of these are looping over channels, slots, ranks or lanes. In many cases, these loops are nested, which results in unbearably indented code.
Moreover, as I stated in the other comments, this file makes my browser slow down to a crawl. I had to write this on a standalone text editor.
I will mark this as resolved; if you consider it is not, please open a comment elsewhere.
</rant>