[PATCH v2 3/3] Documentation: deprecated.rst: type-aware kmalloc-family: mark optional argument as such

Manuel Ebner <[email protected]>
Newsgroups dev.linux.lists.linux-kernel-mentees,org.kernel.vger.kernel-janitors,org.kernel.vger.linux-newbie
Message-ID <[email protected]>
put the optional argument (gfp) in square brackets

eg. ptr = kmalloc_obj(*ptr, gfp);
 -> ptr = kmalloc_obj(*ptr, [gfp]);

Signed-off-by: Manuel Ebner <[email protected]>
---
 Documentation/process/deprecated.rst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/process/deprecated.rst b/Documentation/process/deprecated.rst
index fed56864d036..b431993fd08e 100644
--- a/Documentation/process/deprecated.rst
+++ b/Documentation/process/deprecated.rst
@@ -392,12 +392,12 @@ allocations. For example, these open coded assignments::
 
 become, respectively::
 
-	ptr = kmalloc_obj(*ptr, gfp);
-	ptr = kzalloc_obj(*ptr, gfp);
-	ptr = kmalloc_objs(*ptr, count, gfp);
-	ptr = kzalloc_objs(*ptr, count, gfp);
-	ptr = kmalloc_flex(*ptr, flex_member, count, gfp);
-	__auto_type ptr = kmalloc_obj(struct foo, gfp);
+	ptr = kmalloc_obj(*ptr, [gfp]);
+	ptr = kzalloc_obj(*ptr, [gfp]);
+	ptr = kmalloc_objs(*ptr, count, [gfp]);
+	ptr = kzalloc_objs(*ptr, count, [gfp]);
+	ptr = kmalloc_flex(*ptr, flex_member, count, [gfp]);
+	__auto_type ptr = kmalloc_obj(struct foo, [gfp]);
 
 If `ptr->flex_member` is annotated with __counted_by(), the allocation
 will automatically fail if `count` is larger than the maximum
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.