All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v4 03/13] cbfs: Use bool type for whether initialised
Date: Sun, 24 May 2020 17:38:14 -0600	[thread overview]
Message-ID: <20200524173815.v4.3.I33a5328835731b211dd8b95feb9a89e8b8b54daf@changeid> (raw)
In-Reply-To: <20200524233824.81043-1-sjg@chromium.org>

At present this uses an int type. U-Boot now supports bool so use this
instead.

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

Changes in v4:
- Stick with US spelling

Changes in v3: None
Changes in v2: None

 fs/cbfs/cbfs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index 846102dce3..91d7af0493 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/cbfs/cbfs.c
@@ -12,7 +12,7 @@ static const u32 good_magic = 0x4f524243;
 static const u8 good_file_magic[] = "LARCHIVE";
 
 struct cbfs_priv {
-	int initialized;
+	bool initialized;
 	struct cbfs_header header;
 	struct cbfs_cachenode *file_cache;
 	enum cbfs_result result;
@@ -207,7 +207,7 @@ static void cbfs_init(struct cbfs_priv *priv, ulong end_of_rom)
 {
 	u8 *start_of_rom;
 
-	priv->initialized = 0;
+	priv->initialized = false;
 
 	if (file_cbfs_load_header(end_of_rom, &priv->header))
 		return;
@@ -217,7 +217,7 @@ static void cbfs_init(struct cbfs_priv *priv, ulong end_of_rom)
 	file_cbfs_fill_cache(priv, start_of_rom, priv->header.rom_size,
 			     priv->header.align);
 	if (priv->result == CBFS_SUCCESS)
-		priv->initialized = 1;
+		priv->initialized = true;
 }
 
 void file_cbfs_init(ulong end_of_rom)
@@ -244,7 +244,7 @@ int cbfs_init_mem(ulong base, ulong size, struct cbfs_priv **privp)
 	if (priv->result != CBFS_SUCCESS)
 		return -EINVAL;
 
-	priv->initialized = 1;
+	priv->initialized = true;
 	priv = malloc(sizeof(priv_s));
 	if (!priv)
 		return -ENOMEM;
-- 
2.27.0.rc0.183.gde8f92d652-goog

  parent reply	other threads:[~2020-05-24 23:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 23:38 [PATCH v4 00/13] x86: cbfs: Various clean-ups to CBFS implementation Simon Glass
2020-05-24 23:38 ` [PATCH v4 01/13] cbfs: Rename the result variable Simon Glass
2020-05-24 23:38 ` [PATCH v4 02/13] cbfs: Use ulong consistently Simon Glass
2020-05-24 23:38 ` Simon Glass [this message]
2020-05-25  1:13   ` [PATCH v4 03/13] cbfs: Use bool type for whether initialised Bin Meng
2020-05-24 23:38 ` [PATCH v4 04/13] cbfs: Adjust return value of file_cbfs_next_file() Simon Glass
2020-05-24 23:38 ` [PATCH v4 05/13] cbfs: Adjust file_cbfs_load_header() to use cbfs_priv Simon Glass
2020-05-24 23:38 ` [PATCH v4 06/13] cbfs: Adjust cbfs_load_header_ptr() " Simon Glass
2020-05-24 23:38 ` [PATCH v4 07/13] cbfs: Unify the two header loaders Simon Glass
2020-05-25  1:14   ` Bin Meng
2020-05-24 23:38 ` [PATCH v4 08/13] cbfs: Use void * for the position pointers Simon Glass
2020-05-24 23:38 ` [PATCH v4 09/13] cbfs: Record the start address in cbfs_priv Simon Glass
2020-05-24 23:38 ` [PATCH v4 10/13] cbfs: Return the error code from file_cbfs_init() Simon Glass
2020-05-24 23:38 ` [PATCH v4 11/13] cbfs: Change file_cbfs_find_uncached() to return an error Simon Glass
2020-05-25  1:14   ` Bin Meng
2020-05-24 23:38 ` [PATCH v4 12/13] cbfs: Allow reading a file from a CBFS given its base addr Simon Glass
2020-05-25  1:15   ` Bin Meng
2020-05-24 23:38 ` [PATCH v4 13/13] cbfs: Don't require the CBFS size with cbfs_init_mem() Simon Glass
2020-05-25  1:19 ` [PATCH v4 00/13] x86: cbfs: Various clean-ups to CBFS implementation Bin Meng
2020-05-25  9:03   ` Bin Meng

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=20200524173815.v4.3.I33a5328835731b211dd8b95feb9a89e8b8b54daf@changeid \
    --to=sjg@chromium.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.