diff options
| author | Manuel Ebner <manuelebner@mailbox.org> | 2026-04-29 09:14:44 +0200 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2026-05-03 08:54:21 -0600 |
| commit | 7c6d969d5349c40348276d5c301b2d200afa623d (patch) | |
| tree | 14bcf8c7ae8a9e3afc2af500b7ee3e607f2d3f9b /scripts | |
| parent | e5ebf6278d06b55dadded317b92e351c03e05e6e (diff) | |
Documentation: adopt new coding style of type-aware kmalloc-family
Update the documentation to reflect new type-aware kmalloc-family as
suggested in commit 2932ba8d9c99 ("slab: Introduce kmalloc_obj()
and family")
ptr = kmalloc(sizeof(*ptr), gfp);
-> ptr = kmalloc_obj(*ptr, gfp);
ptr = kmalloc(sizeof(struct some_obj_name), gfp);
-> ptr = kmalloc_obj(*ptr, gfp);
ptr = kzalloc(sizeof(*ptr), gfp);
-> ptr = kzalloc_obj(*ptr, gfp);
ptr = kmalloc_array(count, sizeof(*ptr), gfp);
-> ptr = kmalloc_objs(*ptr, count, gfp);
ptr = kcalloc(count, sizeof(*ptr), gfp);
-> ptr = kzalloc_objs(*ptr, count, gfp);
Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
Acked-by: SeongJae Park <sj@kernel.org>
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260429071445.309733-2-manuelebner@mailbox.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
