All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 02/13] cbfs: Use ulong consistently
Date: Wed, 13 May 2020 08:23:48 -0600	[thread overview]
Message-ID: <20200513142359.147589-3-sjg@chromium.org> (raw)
In-Reply-To: <20200513142359.147589-1-sjg@chromium.org>

U-Boot uses ulong for addresses but there are a few places in this driver
that don't use it. Convert this driver over to follow this convention
fully.

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

 fs/cbfs/cbfs.c | 9 ++++-----
 include/cbfs.h | 4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index 70440aa80b..846102dce3 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/cbfs/cbfs.c
@@ -170,8 +170,7 @@ static void file_cbfs_fill_cache(struct cbfs_priv *priv, u8 *start, u32 size,
 }
 
 /* Get the CBFS header out of the ROM and do endian conversion. */
-static int file_cbfs_load_header(uintptr_t end_of_rom,
-				 struct cbfs_header *header)
+static int file_cbfs_load_header(ulong end_of_rom, struct cbfs_header *header)
 {
 	struct cbfs_header *header_in_rom;
 	int32_t offset = *(u32 *)(end_of_rom - 3);
@@ -204,7 +203,7 @@ static int cbfs_load_header_ptr(struct cbfs_priv *priv, ulong base,
 	return 0;
 }
 
-static void cbfs_init(struct cbfs_priv *priv, uintptr_t end_of_rom)
+static void cbfs_init(struct cbfs_priv *priv, ulong end_of_rom)
 {
 	u8 *start_of_rom;
 
@@ -221,7 +220,7 @@ static void cbfs_init(struct cbfs_priv *priv, uintptr_t end_of_rom)
 		priv->initialized = 1;
 }
 
-void file_cbfs_init(uintptr_t end_of_rom)
+void file_cbfs_init(ulong end_of_rom)
 {
 	cbfs_init(&cbfs_s, end_of_rom);
 }
@@ -324,7 +323,7 @@ const struct cbfs_cachenode *file_cbfs_find(const char *name)
 	return cbfs_find_file(&cbfs_s, name);
 }
 
-const struct cbfs_cachenode *file_cbfs_find_uncached(uintptr_t end_of_rom,
+const struct cbfs_cachenode *file_cbfs_find_uncached(ulong end_of_rom,
 						     const char *name)
 {
 	struct cbfs_priv *priv = &cbfs_s;
diff --git a/include/cbfs.h b/include/cbfs.h
index d915f9426d..10e951dccf 100644
--- a/include/cbfs.h
+++ b/include/cbfs.h
@@ -103,7 +103,7 @@ enum cbfs_result cbfs_get_result(void);
  * @end_of_rom: Points to the end of the ROM the CBFS should be read
  *                      from.
  */
-void file_cbfs_init(uintptr_t end_of_rom);
+void file_cbfs_init(ulong end_of_rom);
 
 /**
  * file_cbfs_get_header() - Get the header structure for the current CBFS.
@@ -172,7 +172,7 @@ int cbfs_init_mem(ulong base, ulong size, struct cbfs_priv **privp);
  *
  * @return A handle to the file, or NULL on error.
  */
-const struct cbfs_cachenode *file_cbfs_find_uncached(uintptr_t end_of_rom,
+const struct cbfs_cachenode *file_cbfs_find_uncached(ulong end_of_rom,
 						     const char *name);
 
 /**
-- 
2.26.2.645.ge9eca65c58-goog

  parent reply	other threads:[~2020-05-13 14:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 14:23 [PATCH 00/13] x86: cbfs: Various clean-ups to CBFS implementation Simon Glass
2020-05-13 14:23 ` [PATCH 01/13] cbfs: Rename the result variable Simon Glass
2020-05-19 13:53   ` Bin Meng
2020-05-22 16:33     ` Simon Glass
2020-05-13 14:23 ` Simon Glass [this message]
2020-05-19 13:53   ` [PATCH 02/13] cbfs: Use ulong consistently Bin Meng
2020-05-13 14:23 ` [PATCH 03/13] cbfs: Use bool type for whether initialised Simon Glass
2020-05-19 13:53   ` Bin Meng
2020-05-22 16:33     ` Simon Glass
2020-05-13 14:23 ` [PATCH 04/13] cbfs: Adjust return value of file_cbfs_next_file() Simon Glass
2020-05-19 14:04   ` Bin Meng
2020-05-13 14:23 ` [PATCH 05/13] cbfs: Adjust file_cbfs_load_header() to use cbfs_priv Simon Glass
2020-05-19 14:04   ` Bin Meng
2020-05-13 14:23 ` [PATCH 06/13] cbfs: Adjust cbfs_load_header_ptr() " Simon Glass
2020-05-19 14:04   ` Bin Meng
2020-05-13 14:23 ` [PATCH 07/13] cbfs: Unify the two header loaders Simon Glass
2020-05-21  2:27   ` Bin Meng
2020-05-13 14:23 ` [PATCH 08/13] cbfs: Use void * for the position pointers Simon Glass
2020-05-21  2:28   ` Bin Meng
2020-05-13 14:23 ` [PATCH 09/13] cbfs: Record the start address in cbfs_priv Simon Glass
2020-05-21  2:31   ` Bin Meng
2020-05-13 14:23 ` [PATCH 10/13] cbfs: Return the error code from file_cbfs_init() Simon Glass
2020-05-21  2:32   ` Bin Meng
2020-05-13 14:23 ` [PATCH 11/13] cbfs: Change file_cbfs_find_uncached() to return an error Simon Glass
2020-05-21  2:55   ` Bin Meng
2020-05-13 14:23 ` [PATCH 12/13] cbfs: Allow reading a file from a CBFS given its base addr Simon Glass
2020-05-21  2:59   ` Bin Meng
2020-05-22  2:46     ` Simon Glass
2020-05-13 14:23 ` [PATCH 13/13] cbfs: Don't require the CBFS size with cbfs_init_mem() Simon Glass
2020-05-21  3:00   ` 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=20200513142359.147589-3-sjg@chromium.org \
    --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.