Message ID | 20231218181901.337515-7-raymond.mao@linaro.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
Series | Support Firmware Handoff spec via bloblist | expand |
Hi Raymond, On Mon, 18 Dec 2023 at 20:20, Raymond Mao <raymond.mao@linaro.org> wrote: > > From: Simon Glass <sjg@chromium.org> > > Drop spare value from bloblist record header. > > For now it is still present in the header, with an underscore, so that > tests continue to pass. I am not sure I understand the commit message. Doesn't the spec define this as 'reserved' now? On top of that, it's a better idea to follow the spec naming. It's easier to map the spec -> code for new readers. So I would rename tag -> tag_id size -> data_size and flags -> reserved. Can we at least do the flags -> reserved in this patch? [...] Thanks /Ilias
Hi Ilias, On Wed, 27 Dec 2023 at 04:43, Ilias Apalodimas <ilias.apalodimas@linaro.org> wrote: > Hi Raymond, > > On Mon, 18 Dec 2023 at 20:20, Raymond Mao <raymond.mao@linaro.org> wrote: > > > > From: Simon Glass <sjg@chromium.org> > > > > Drop spare value from bloblist record header. > > > > For now it is still present in the header, with an underscore, so that > > tests continue to pass. > > I am not sure I understand the commit message. Doesn't the spec define > this as 'reserved' now? > On top of that, it's a better idea to follow the spec naming. It's > easier to map the spec -> code for new readers. So I would rename > > tag -> tag_id > size -> data_size and > flags -> reserved. > > Can we at least do the flags -> reserved in this patch? > > I will update the naming of members in v4. Regards, Raymond
Hi Ilias, On Wed, 27 Dec 2023 at 04:43, Ilias Apalodimas <ilias.apalodimas@linaro.org> wrote: > Hi Raymond, > > On Mon, 18 Dec 2023 at 20:20, Raymond Mao <raymond.mao@linaro.org> wrote: > > > > From: Simon Glass <sjg@chromium.org> > > > > Drop spare value from bloblist record header. > > > > For now it is still present in the header, with an underscore, so that > > tests continue to pass. > > I am not sure I understand the commit message. Doesn't the spec define > this as 'reserved' now? > On top of that, it's a better idea to follow the spec naming. It's > easier to map the spec -> code for new readers. So I would rename > > tag -> tag_id > size -> data_size and > flags -> reserved. > > Can we at least do the flags -> reserved in this patch? > > The spec only defines a spare field for TL header (bloblist header) but not for a TE header (bloblist record header), so we just remove the spare field, no need to update this patch I think. [...] Regards, Raymond
diff --git a/common/bloblist.c b/common/bloblist.c index 168993e0a7..88e2a0f5c0 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -165,7 +165,6 @@ static int bloblist_addrec(uint tag, int size, int align_log2, rec->tag = tag; rec->hdr_size = data_start - hdr->alloced; rec->size = size; - rec->spare = 0; /* Zero the record data */ memset((void *)rec + rec_hdr_size(rec), '\0', rec->size); diff --git a/include/bloblist.h b/include/bloblist.h index 7eff709ec8..68f97395b7 100644 --- a/include/bloblist.h +++ b/include/bloblist.h @@ -205,13 +205,12 @@ struct bloblist_hdr { * record's data starts at this offset from the start of the record * @size: Size of record in bytes, excluding the header size. This does not * need to be aligned (e.g. 3 is OK). - * @spare: Spare space for other things */ struct bloblist_rec { u32 tag; u32 hdr_size; u32 size; - u32 spare; + u32 _spare; }; /**