summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-07-23 10:10:44 -0700
committerJakub Kicinski <kuba@kernel.org>2025-07-24 17:28:49 -0700
commit2c222dde61c4fcb8693d31acf5ef8e342fda4c26 (patch)
tree166033f2c910828189f62b28f1eeedda6c46be42 /net/unix/af_unix.c
parentcf5869977702b1d51e3b4d58b6c559a98a366114 (diff)
tools: ynl-gen: print alloc helper for multi-val attrs
In general YNL provides allocation and free helpers for types. For pure nested structs which are used as multi-attr (and therefore have to be allocated dynamically) we already print a free helper as it's needed by free of the containing struct. Add printing of the alloc helper for consistency. The helper takes the number of entries to allocate as an argument, e.g.: static inline struct netdev_queue_id *netdev_queue_id_alloc(unsigned int n) { return calloc(n, sizeof(struct netdev_queue_id)); } Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250723171046.4027470-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions