summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-10-19 09:21:42 -0600
committerTom Rini <[email protected]>2024-11-03 21:27:12 -0600
commit55c8aad164da140485f8cb146765523b3c7811ce (patch)
treeae32bacef64ca738326f4b0575cea2a3581222e9
parent805e89e3f7fe5118374b5005e5c2dc214185dcac (diff)
alist: Add a comment for alist_init_struct()
Comment this macro so that it is clear how to use it. Signed-off-by: Simon Glass <[email protected]>
-rw-r--r--include/alist.h6
1 files changed, 6 insertions, 0 deletions
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)