Commit 129027b7 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jonathan Corbet

docs: deprecated.rst: Update an example

vmalloc() has a 2-factor form. It is vmalloc_array().
So use another function as an example.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/3484e46180dd2cf05d993ff1a78b481bc2ad1f71.1687723931.git.christophe.jaillet@wanadoo.fr
parent 94b829a7
......@@ -77,7 +77,7 @@ kzalloc() can be replaced with kcalloc().
If no 2-factor form is available, the saturate-on-overflow helpers should
be used::
bar = vmalloc(array_size(count, size));
bar = dma_alloc_coherent(dev, array_size(count, size), &dma, GFP_KERNEL);
Another common case to avoid is calculating the size of a structure with
a trailing array of others structures, as in::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment