Jes Klinke has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47048 )
Change subject: mb/google/volteer: clang-format of mainboard.c ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47048/2/src/mainboard/google/voltee... File src/mainboard/google/volteer/mainboard.c:
https://review.coreboot.org/c/coreboot/+/47048/2/src/mainboard/google/voltee... PS2, Line 141: ARRAY_SIZE(params->ITbtPcieRootPortEn) : * sizeof(*params->ITbtPcieRootPortEn)
shouldn't this just be `sizeof(params->ITbtPcieRootPortEn)`?
ITbtPcieRootPortEn is an array of UINT8, so yes, while the existing code is correctly multiplying the number of elements with the size of one element, you are right that it could be expressed simpler, by directly using sizeof() to determine the size of the entire array.
I created this CL because I was trying to make an unrelated change to this file, but was told by the commit script that I had to reformat a number of existing lines to make them comply with the formatting standard. I did not want to pollute my functional change with pure formatting. So now I am in a dilemma whether I want to include "obviously" correct simplifications together with the pure formatting changes, in this CL.
Personally, I would prefer to keep this one completely auto-generated.