diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-06-25 22:12:24 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2023-07-14 13:36:31 -0600 |
commit | 129027b78c494ad71c622aa09d83d18cf1380d0b (patch) | |
tree | 8bbae9122cb38d97e83a8f1d5a9e218d142e57ee /Documentation/process | |
parent | 94b829a7b01af010e9f031b953430fd9811e5abb (diff) |
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/3484e46180dd2cf05d993ff1a78b481bc2ad1f71.1687723931.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'Documentation/process')
-rw-r--r-- | Documentation/process/deprecated.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/process/deprecated.rst b/Documentation/process/deprecated.rst index f91b8441f2ef..1f7f3e6c9cda 100644 --- a/Documentation/process/deprecated.rst +++ b/Documentation/process/deprecated.rst @@ -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:: |