[PATCH v4 03/12] smbios: Move smbios_write_type to the C file

Simon Glass sjg at chromium.org
Fri Feb 5 05:17:14 CET 2021


This type is not used outside the smbios.c file so there is no need for it
to be in the header file. Move it.

Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
---

(no changes since v1)

 include/smbios.h | 10 ----------
 lib/smbios.c     | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/smbios.h b/include/smbios.h
index 1846607c3cf..fc69188a8fe 100644
--- a/include/smbios.h
+++ b/include/smbios.h
@@ -219,16 +219,6 @@ static inline void fill_smbios_header(void *table, int type,
 	header->handle = handle;
 }
 
-/**
- * Function prototype to write a specific type of SMBIOS structure
- *
- * @addr:	start address to write the structure
- * @handle:	the structure's handle, a unique 16-bit number
- * @node:	node containing the information to write (ofnode_null() if none)
- * @return:	size of the structure
- */
-typedef int (*smbios_write_type)(ulong *addr, int handle, ofnode node);
-
 /**
  * write_smbios_table() - Write SMBIOS table
  *
diff --git a/lib/smbios.c b/lib/smbios.c
index 1e10fa84207..b1171f544a8 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -17,6 +17,16 @@
 #include <dm/uclass-internal.h>
 #endif
 
+/**
+ * Function prototype to write a specific type of SMBIOS structure
+ *
+ * @addr:	start address to write the structure
+ * @handle:	the structure's handle, a unique 16-bit number
+ * @node:	node containing the information to write (ofnode_null() if none)
+ * @return:	size of the structure
+ */
+typedef int (*smbios_write_type)(ulong *addr, int handle, ofnode node);
+
 /**
  * struct smbios_write_method - Information about a table-writing function
  *
-- 
2.30.0.478.g8a0d178c01-goog



More information about the U-Boot mailing list