[v6,036/102] x86: Don't export mrccache_update()
diff mbox series

Message ID 20191206213936.v6.36.I12b19a0093a729c728c3f0fc7d0e8ef7bb42392c@changeid
State Accepted
Delegated to: Bin Meng
Headers show
Series
  • x86: Add initial support for apollolake
Related show

Commit Message

Simon Glass Dec. 7, 2019, 4:42 a.m. UTC
This function is only used within the implementation so make it static.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

Changes in v6: None
Changes in v5: None
Changes in v4:
- Add new patch to make mrccache_update() static

Changes in v3: None
Changes in v2: None

 arch/x86/include/asm/mrccache.h | 15 ---------------
 arch/x86/lib/mrccache.c         | 16 ++++++++++++++--
 2 files changed, 14 insertions(+), 17 deletions(-)

Comments

Bin Meng Dec. 8, 2019, 3:02 a.m. UTC | #1
On Sat, Dec 7, 2019 at 12:48 PM Simon Glass <sjg@chromium.org> wrote:
>
> This function is only used within the implementation so make it static.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
> Changes in v6: None
> Changes in v5: None
> Changes in v4:
> - Add new patch to make mrccache_update() static
>
> Changes in v3: None
> Changes in v2: None
>
>  arch/x86/include/asm/mrccache.h | 15 ---------------
>  arch/x86/lib/mrccache.c         | 16 ++++++++++++++--
>  2 files changed, 14 insertions(+), 17 deletions(-)
>

applied to u-boot-x86/next, thanks!

Patch
diff mbox series

diff --git a/arch/x86/include/asm/mrccache.h b/arch/x86/include/asm/mrccache.h
index 0917cf2470..d6b7529073 100644
--- a/arch/x86/include/asm/mrccache.h
+++ b/arch/x86/include/asm/mrccache.h
@@ -48,21 +48,6 @@  struct udevice;
  */
 struct mrc_data_container *mrccache_find_current(struct mrc_region *entry);
 
-/**
- * mrccache_update() - update the MRC cache with a new record
- *
- * This writes a new record to the end of the MRC cache region. If the new
- * record is the same as the latest record then the write is skipped
- *
- * @sf:		SPI flash to write to
- * @entry:	Position and size of MRC cache in SPI flash
- * @cur:	Record to write
- * @return 0 if updated, -EEXIST if the record is the same as the latest
- * record, -EINVAL if the record is not valid, other error if SPI write failed
- */
-int mrccache_update(struct udevice *sf, struct mrc_region *entry,
-		    struct mrc_data_container *cur);
-
 /**
  * mrccache_reserve() - reserve MRC data on the stack
  *
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index 10949d249e..b9420a4cab 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -118,8 +118,20 @@  static struct mrc_data_container *find_next_mrc_cache(struct mrc_region *entry,
 	return cache;
 }
 
-int mrccache_update(struct udevice *sf, struct mrc_region *entry,
-		    struct mrc_data_container *cur)
+/**
+ * mrccache_update() - update the MRC cache with a new record
+ *
+ * This writes a new record to the end of the MRC cache region. If the new
+ * record is the same as the latest record then the write is skipped
+ *
+ * @sf:		SPI flash to write to
+ * @entry:	Position and size of MRC cache in SPI flash
+ * @cur:	Record to write
+ * @return 0 if updated, -EEXIST if the record is the same as the latest
+ * record, -EINVAL if the record is not valid, other error if SPI write failed
+ */
+static int mrccache_update(struct udevice *sf, struct mrc_region *entry,
+			   struct mrc_data_container *cur)
 {
 	struct mrc_data_container *cache;
 	ulong offset;