projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8c07ac
)
alist: Add a comment for alist_init_struct()
author
Simon Glass
<sjg@chromium.org>
Sat, 19 Oct 2024 15:21:42 +0000
(09:21 -0600)
committer
Simon Glass
<sjg@chromium.org>
Sat, 2 Nov 2024 17:13:59 +0000
(11:13 -0600)
Comment this macro so that it is clear how to use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
include/alist.h
patch
|
blob
|
history
diff --git
a/include/alist.h
b/include/alist.h
index 0343946bc4aff12da836706589d2222a121972d5..a727f1c7dfa92d6465560667004298efc9091ab4 100644
(file)
--- 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)