* [PATCH] docs: deprecated.rst: Update an example
@ 2023-06-25 20:12 Christophe JAILLET
2023-07-14 19:36 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2023-06-25 20:12 UTC (permalink / raw)
To: Jonathan Corbet
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, workflows, linux-doc
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>
---
Documentation/process/deprecated.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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::
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] docs: deprecated.rst: Update an example
2023-06-25 20:12 [PATCH] docs: deprecated.rst: Update an example Christophe JAILLET
@ 2023-07-14 19:36 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2023-07-14 19:36 UTC (permalink / raw)
To: Christophe JAILLET
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, workflows, linux-doc
Christophe JAILLET <christophe.jaillet@wanadoo.fr> writes:
> 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>
> ---
> Documentation/process/deprecated.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-14 19:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-25 20:12 [PATCH] docs: deprecated.rst: Update an example Christophe JAILLET
2023-07-14 19:36 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).