Attention is currently required from: Nico Huber, Nick Vaccaro.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57069 )
Change subject: coreboot tables: Add type-c port info to coreboot table
......................................................................
Patch Set 16:
(1 comment)
File src/lib/coreboot_table.c:
https://review.coreboot.org/c/coreboot/+/57069/comment/e9d8303b_b4a2719c
PS16, Line 263: rec->size = sizeof(*rec);
`sizeof(*rec) + sizeof(struct type_c_port_info) * count`
actually if you want to get really technical.... see https://p99.gforge.inria.fr/p99-html/group__flexible.html
```
#define FSIZEOF(T, F, N) P99_MAXOF(sizeof(T), offsetof(T, F) + P99_SIZEOF(T, F[0]) * N)
rec->size = FSIZEOF(struct lb_type_c_info, type_c_info, count);
```
but that depends if we care about potentially wasting a few bytes for a super ugly macro
isn't C glorious? 💯
--
To view, visit
https://review.coreboot.org/c/coreboot/+/57069
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ice732be2fa634dbf31ec620552b383c4a5b41451
Gerrit-Change-Number: 57069
Gerrit-PatchSet: 16
Gerrit-Owner: Nick Vaccaro
nvaccaro@google.com
Gerrit-Reviewer: Furquan Shaikh
furquan@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Reviewer: Zhuohao Lee
zhuohao@google.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Nico Huber
nico.h@gmx.de
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Nick Vaccaro
nvaccaro@google.com
Gerrit-Comment-Date: Fri, 03 Sep 2021 17:14:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Comment-In-Reply-To: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-MessageType: comment