U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Tom Rini <trini@konsulko.com>,
	Julius Werner <jwerner@chromium.org>,
	Dan Handley <dan.handley@arm.com>,
	Jose Marinho <jose.marinho@arm.com>,
	Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>,
	Nikhil M Jain <n-jain1@ti.com>
Subject: [PATCH 07/14] bloblist: Drop the spare values
Date: Tue, 25 Jul 2023 15:36:19 -0600	[thread overview]
Message-ID: <20230725213634.255345-8-sjg@chromium.org> (raw)
In-Reply-To: <20230725213634.255345-1-sjg@chromium.org>

There are no spare values in spec v0.9 so drop them.

For now they are still present in the headers, with an underscore, so that
tests continue to pass.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/bloblist.c  | 1 -
 include/bloblist.h | 6 ++----
 test/bloblist.c    | 4 ----
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/common/bloblist.c b/common/bloblist.c
index 73f93687015..96b82fe625c 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -154,7 +154,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 0b1aaf3253e..6592ea75403 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -156,7 +156,6 @@ enum bloblist_tag_t {
  * @alloced: Total size allocated so far for this bloblist. This starts out as
  *	sizeof(bloblist_hdr) since we need at least that much space to store a
  *	valid bloblist
- * @spare: Spare space (for future use)
  * @chksum: CRC32 for the entire bloblist allocated area. Since any of the
  *	blobs can be altered after being created, this checksum is only valid
  *	when the bloblist is finalised before jumping to the next stage of boot.
@@ -171,7 +170,7 @@ struct bloblist_hdr {
 
 	u32 size;
 	u32 alloced;
-	u32 spare;
+	u32 _spare;
 	u32 chksum;
 };
 
@@ -188,13 +187,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;
 };
 
 /**
diff --git a/test/bloblist.c b/test/bloblist.c
index 11bd362a0d5..c2c2c3f3c11 100644
--- a/test/bloblist.c
+++ b/test/bloblist.c
@@ -202,10 +202,6 @@ static int bloblist_test_checksum(struct unit_test_state *uts)
 	ut_asserteq(-EFBIG, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE));
 	hdr->size++;
 
-	hdr->spare++;
-	ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE));
-	hdr->spare--;
-
 	hdr->chksum++;
 	ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE));
 	hdr->chksum--;
-- 
2.41.0.487.g6d72f3e995-goog


  parent reply	other threads:[~2023-07-25 21:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 21:36 [PATCH 00/14] bloblist: Align to firmware handoff Simon Glass
2023-07-25 21:36 ` [PATCH 01/14] bloblist: Update the tag numbering Simon Glass
2023-07-26 20:16   ` Julius Werner
2023-07-28  8:51     ` Ilias Apalodimas
2023-07-28 21:56       ` Julius Werner
2023-08-02 10:14   ` Jose Marinho
2023-07-25 21:36 ` [PATCH 02/14] bloblist: Adjust API to align in powers of 2 Simon Glass
2023-08-02 10:24   ` Jose Marinho
2023-07-25 21:36 ` [PATCH 03/14] bloblist: Change the magic value Simon Glass
2023-07-25 21:36 ` [PATCH 04/14] bloblist: Set version to 1 Simon Glass
2023-07-25 21:36 ` [PATCH 05/14] bloblist: Access record hdr_size and tag via a function Simon Glass
2023-07-25 21:36 ` [PATCH 06/14] bloblist: Drop the flags value Simon Glass
2023-07-25 21:36 ` Simon Glass [this message]
2023-07-25 21:36 ` [PATCH 08/14] bloblist: Change the checksum algorithm Simon Glass
2023-07-25 21:36 ` [PATCH 09/14] bloblist: Checksum the entire bloblist Simon Glass
2023-07-25 21:36 ` [PATCH 10/14] bloblist: Handle alignment with a void entry Simon Glass
2023-07-26 20:17   ` Julius Werner
2023-07-25 21:36 ` [PATCH 11/14] bloblist: Reduce blob-header size Simon Glass
2023-07-26 20:20   ` Julius Werner
2023-07-25 21:36 ` [PATCH 12/14] bloblist: Reduce bloblist header size Simon Glass
2023-08-02 10:15   ` Jose Marinho
2023-08-02 21:31     ` Simon Glass
2023-07-25 21:36 ` [PATCH 13/14] bloblist: Add alignment to bloblist_new() Simon Glass
2023-07-26 20:20   ` Julius Werner
2023-07-25 21:36 ` [PATCH 14/14] bloblist: Update documentation and header comment Simon Glass
2023-07-26 20:55   ` Julius Werner
2023-09-06 12:22 ` [PATCH 00/14] bloblist: Align to firmware handoff Michal Simek
2023-10-28  5:35   ` Simon Glass
2023-10-30  7:53     ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230725213634.255345-8-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=dan.handley@arm.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jose.marinho@arm.com \
    --cc=jwerner@chromium.org \
    --cc=n-jain1@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox