Skip to contentSkip to conversation

bloblist: Rename GD_FLG_BLOBLIST_READY to GD_FLG_BLOBLIST_HANDOFF

PATCH In review Tom Rini 2 participants 4 messages Jul 7 – Jul 18 Generic include/asm header files

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 bloblist: Rename GD_FLG_BLOBLIST_READY to GD_FLG_BLOBLIST_HANDOFF

Now that we have made bloblist have distinct "find" and "create" functions, the global data tag "GD_FLG_BLOBLIST_READY" doesn't quite make sense anymore. Rename it to GD_FLG_BLOBLIST_HANDOFF.

---
 common/bloblist.c                 | 8 ++++----
 include/asm-generic/global_data.h | 4 ++--
 include/bloblist.h                | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
common/bloblist.c +4 -4
index 51ae9cc50a5f..846c8047f746 100644
@@ -448,7 +448,7 @@ int bloblist_new(ulong addr, uint size, uint flags, uint align_log2)
 	hdr->align_log2 = align_log2 ? align_log2 : BLOBLIST_BLOB_ALIGN_LOG2;
 	hdr->chksum = 0;
 	gd->bloblist = hdr;
-	gd->flags |= GD_FLG_BLOBLIST_READY;
+	gd->flags |= GD_FLG_BLOBLIST_HANDOFF;
 
 	return 0;
 }
@@ -476,7 +476,7 @@ int bloblist_check(ulong addr, uint size)
 		return log_msg_ret("Bad checksum", -EIO);
 	}
 	gd->bloblist = hdr;
-	gd->flags |= GD_FLG_BLOBLIST_READY;
+	gd->flags |= GD_FLG_BLOBLIST_HANDOFF;
 
 	return 0;
 }
@@ -627,7 +627,7 @@ int bloblist_init(void)
 	int ret;
 	ulong addr = 0, size = CONFIG_BLOBLIST_SIZE;
 
-	if (gd->flags & GD_FLG_BLOBLIST_READY) {
+	if (gd->flags & GD_FLG_BLOBLIST_HANDOFF) {
 		log_debug("Found existing bloblist size %x at %p\n",
 			  gd->bloblist->total_size, gd->bloblist);
 		return 0;
@@ -689,7 +689,7 @@ int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig, ulong xlist)
 	if (rfdt != (ulong)bloblist_find(BLOBLISTT_CONTROL_FDT, 0)) {
 		/* Remove this bloblist from gd */
 		gd->bloblist = NULL;
-		gd->flags &= ~GD_FLG_BLOBLIST_READY;
+		gd->flags &= ~GD_FLG_BLOBLIST_HANDOFF;
 		return -EIO;
 	}
 
include/asm-generic/global_data.h +2 -2
index ad7ebb1bbc95..fd116b0cebf2 100644
@@ -697,9 +697,9 @@ enum gd_flags {
 	 */
 	GD_FLG_DM_DEAD = 0x400000,
 	/**
-	 * @GD_FLG_BLOBLIST_READY: bloblist is ready for use
+	 * @GD_FLG_BLOBLIST_HANDOFF: bloblist has been found.
 	 */
-	GD_FLG_BLOBLIST_READY = 0x800000,
+	GD_FLG_BLOBLIST_HANDOFF = 0x800000,
 	/**
 	 * @GD_FLG_HUSH_OLD_PARSER: Use hush old parser.
 	 */
include/bloblist.h +1 -1
index 4c5787729654..fcd290eeb165 100644
@@ -516,7 +516,7 @@ bool bloblist_exists(void);
  * If CONFIG_BLOBLIST_PASSAGE_MANDATORY is selected, bloblist in the incoming
  * standard passage is mandatorily required.
  *
- * Sets GD_FLG_BLOBLIST_READY in global_data flags on success
+ * Sets GD_FLG_BLOBLIST_HANDOFF in global_data flags on success
  *
  * Return: 0 if OK, -ve on error
  */
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Tom,

Quoted 5 lines · Tom Rini

Now that we have made bloblist have distinct "find" and "create" functions, the global data tag "GD_FLG_BLOBLIST_READY" doesn't quite make sense anymore. Rename it to GD_FLG_BLOBLIST_HANDOFF.

Quoted 8 lines
---
 common/bloblist.c                 | 8 ++++----
 include/asm-generic/global_data.h | 4 ++--
 include/bloblist.h                | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

Sounds good to me.

BTW, do we need another flag for the locally allocated/static-assigned bloblist?

Regards,
Raymond

Quoted 72 lines
common/bloblist.c +4 -4
index 51ae9cc50a5f..846c8047f746 100644
@@ -448,7 +448,7 @@ int bloblist_new(ulong addr, uint size, uint flags, uint align_log2)
        hdr->align_log2 = align_log2 ? align_log2 : BLOBLIST_BLOB_ALIGN_LOG2;
        hdr->chksum = 0;
        gd->bloblist = hdr;
-       gd->flags |= GD_FLG_BLOBLIST_READY;
+       gd->flags |= GD_FLG_BLOBLIST_HANDOFF;
 
        return 0;
 }
@@ -476,7 +476,7 @@ int bloblist_check(ulong addr, uint size)
                return log_msg_ret("Bad checksum", -EIO);
        }
        gd->bloblist = hdr;
-       gd->flags |= GD_FLG_BLOBLIST_READY;
+       gd->flags |= GD_FLG_BLOBLIST_HANDOFF;
 
        return 0;
 }
@@ -627,7 +627,7 @@ int bloblist_init(void)
        int ret;
        ulong addr = 0, size = CONFIG_BLOBLIST_SIZE;
 
-       if (gd->flags & GD_FLG_BLOBLIST_READY) {
+       if (gd->flags & GD_FLG_BLOBLIST_HANDOFF) {
                log_debug("Found existing bloblist size %x at %p\n",
                          gd->bloblist->total_size, gd->bloblist);
                return 0;
@@ -689,7 +689,7 @@ int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig, ulong xlist)
        if (rfdt != (ulong)bloblist_find(BLOBLISTT_CONTROL_FDT, 0)) {
                /* Remove this bloblist from gd */
                gd->bloblist = NULL;
-               gd->flags &= ~GD_FLG_BLOBLIST_READY;
+               gd->flags &= ~GD_FLG_BLOBLIST_HANDOFF;
                return -EIO;
        }
 
include/asm-generic/global_data.h +2 -2
index ad7ebb1bbc95..fd116b0cebf2 100644
@@ -697,9 +697,9 @@ enum gd_flags {
         */
        GD_FLG_DM_DEAD = 0x400000,
        /**
-        * @GD_FLG_BLOBLIST_READY: bloblist is ready for use
+        * @GD_FLG_BLOBLIST_HANDOFF: bloblist has been found.
         */
-       GD_FLG_BLOBLIST_READY = 0x800000,
+       GD_FLG_BLOBLIST_HANDOFF = 0x800000,
        /**
         * @GD_FLG_HUSH_OLD_PARSER: Use hush old parser.
         */
include/bloblist.h +1 -2
index 4c5787729654..fcd290eeb165 100644
@@ -516,7 +516,7 @@ bool bloblist_exists(void);
  * If CONFIG_BLOBLIST_PASSAGE_MANDATORY is selected, bloblist in the incoming
  * standard passage is mandatorily required.
  *
- * Sets GD_FLG_BLOBLIST_READY in global_data flags on success
+ * Sets GD_FLG_BLOBLIST_HANDOFF in global_data flags on success
  *
  * Return: 0 if OK, -ve on error
  */
--

2.43.0

author
#2 lore raw
Quoted 17 lines · Raymond Mao

Hi Tom,

Quoted 5 lines · Tom Rini

Now that we have made bloblist have distinct "find" and "create" functions, the global data tag "GD_FLG_BLOBLIST_READY" doesn't quite make sense anymore. Rename it to GD_FLG_BLOBLIST_HANDOFF.

Quoted 8 lines
---
 common/bloblist.c                 | 8 ++++----
 include/asm-generic/global_data.h | 4 ++--
 include/bloblist.h                | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
Quoted 4 lines

Sounds good to me.

BTW, do we need another flag for the locally allocated/static-assigned bloblist?

Probably not? But it's been a while since I put a lot thought into this area. I had this sitting around and noticed I hadn't sent it.

Signature · 1 line
Tom
author
#3 lore raw
In reply to Tom Rini
Quoted 5 lines · Tom Rini

Now that we have made bloblist have distinct "find" and "create" functions, the global data tag "GD_FLG_BLOBLIST_READY" doesn't quite make sense anymore. Rename it to GD_FLG_BLOBLIST_HANDOFF.

Applied to u-boot/main, thanks!

[1/1] bloblist: Rename GD_FLG_BLOBLIST_READY to GD_FLG_BLOBLIST_HANDOFF

      commit: a1a944f25c10dfa2ae3b344acbbeac39dc929bb8
Signature · 1 line
Tom