[PATCH 02/34] alist: Add a comment for alist_init_struct()

Simon Glass sjg at chromium.org
Fri Oct 18 01:23:41 CEST 2024


Comment this macro so that it is clear how to use it.

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

 include/alist.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/alist.h b/include/alist.h
index 0343946bc4a..a727f1c7dfa 100644
--- a/include/alist.h
+++ b/include/alist.h
@@ -198,6 +198,12 @@ bool alist_expand_by(struct alist *lst, uint inc_by);
  */
 bool alist_init(struct alist *lst, uint obj_size, uint alloc_size);
 
+/**
+ * alist_init_struct() - Typed version of alist_init()
+ *
+ * Use as:
+ *	alist_init(&lst, struct my_struct);
+ */
 #define alist_init_struct(_lst, _struct)	\
 	alist_init(_lst, sizeof(_struct), 0)
 
-- 
2.34.1



More information about the U-Boot mailing list