linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] Core-api: Documentation: Replace deprecated :c:func: Usage
@ 2020-08-10 18:30 Puranjay Mohan
  2020-08-10 18:41 ` Matthew Wilcox
  2020-08-11 16:27 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Puranjay Mohan @ 2020-08-10 18:30 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: linux-doc, linux-kernel-mentees, linux-kernel, Puranjay Mohan

Replace :c:func: with func() as the previous usage is deprecated.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
 Documentation/core-api/idr.rst | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/Documentation/core-api/idr.rst b/Documentation/core-api/idr.rst
index a2738050c4f0..2eb5afdb9931 100644
--- a/Documentation/core-api/idr.rst
+++ b/Documentation/core-api/idr.rst
@@ -20,48 +20,48 @@ only ID allocation, and as a result is much more memory-efficient.
 IDR usage
 =========
 
-Start by initialising an IDR, either with :c:func:`DEFINE_IDR`
-for statically allocated IDRs or :c:func:`idr_init` for dynamically
+Start by initialising an IDR, either with DEFINE_IDR()
+for statically allocated IDRs or idr_init() for dynamically
 allocated IDRs.
 
-You can call :c:func:`idr_alloc` to allocate an unused ID.  Look up
-the pointer you associated with the ID by calling :c:func:`idr_find`
-and free the ID by calling :c:func:`idr_remove`.
+You can call idr_alloc() to allocate an unused ID.  Look up
+the pointer you associated with the ID by calling idr_find()
+and free the ID by calling idr_remove().
 
 If you need to change the pointer associated with an ID, you can call
-:c:func:`idr_replace`.  One common reason to do this is to reserve an
+idr_replace().  One common reason to do this is to reserve an
 ID by passing a ``NULL`` pointer to the allocation function; initialise the
 object with the reserved ID and finally insert the initialised object
 into the IDR.
 
 Some users need to allocate IDs larger than ``INT_MAX``.  So far all of
 these users have been content with a ``UINT_MAX`` limit, and they use
-:c:func:`idr_alloc_u32`.  If you need IDs that will not fit in a u32,
+idr_alloc_u32().  If you need IDs that will not fit in a u32,
 we will work with you to address your needs.
 
 If you need to allocate IDs sequentially, you can use
-:c:func:`idr_alloc_cyclic`.  The IDR becomes less efficient when dealing
+idr_alloc_cyclic().  The IDR becomes less efficient when dealing
 with larger IDs, so using this function comes at a slight cost.
 
 To perform an action on all pointers used by the IDR, you can
-either use the callback-based :c:func:`idr_for_each` or the
-iterator-style :c:func:`idr_for_each_entry`.  You may need to use
-:c:func:`idr_for_each_entry_continue` to continue an iteration.  You can
-also use :c:func:`idr_get_next` if the iterator doesn't fit your needs.
+either use the callback-based idr_for_each() or the
+iterator-style idr_for_each_entry().  You may need to use
+idr_for_each_entry_continue() to continue an iteration.  You can
+also use idr_get_next() if the iterator doesn't fit your needs.
 
-When you have finished using an IDR, you can call :c:func:`idr_destroy`
+When you have finished using an IDR, you can call idr_destroy()
 to release the memory used by the IDR.  This will not free the objects
 pointed to from the IDR; if you want to do that, use one of the iterators
 to do it.
 
-You can use :c:func:`idr_is_empty` to find out whether there are any
+You can use idr_is_empty() to find out whether there are any
 IDs currently allocated.
 
 If you need to take a lock while allocating a new ID from the IDR,
 you may need to pass a restrictive set of GFP flags, which can lead
 to the IDR being unable to allocate memory.  To work around this,
-you can call :c:func:`idr_preload` before taking the lock, and then
-:c:func:`idr_preload_end` after the allocation.
+you can call idr_preload() before taking the lock, and then
+idr_preload_end() after the allocation.
 
 .. kernel-doc:: include/linux/idr.h
    :doc: idr sync
-- 
2.27.0

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Core-api: Documentation: Replace deprecated :c:func: Usage
  2020-08-10 18:30 [Linux-kernel-mentees] [PATCH] Core-api: Documentation: Replace deprecated :c:func: Usage Puranjay Mohan
@ 2020-08-10 18:41 ` Matthew Wilcox
  2020-08-11 16:27 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2020-08-10 18:41 UTC (permalink / raw)
  To: Puranjay Mohan
  Cc: linux-kernel, linux-kernel-mentees, linux-doc, Jonathan Corbet

On Tue, Aug 11, 2020 at 12:00:19AM +0530, Puranjay Mohan wrote:
> Replace :c:func: with func() as the previous usage is deprecated.
> 
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Jon, I'm comfortable with you merging this through the docs tree.
Looks like we also need:

+++ b/MAINTAINERS
@@ -18686,6 +18686,7 @@ XARRAY
 M:     Matthew Wilcox <willy@infradead.org>
 L:     linux-fsdevel@vger.kernel.org
 S:     Supported
+F:     Documentation/core-api/idr.rst
 F:     Documentation/core-api/xarray.rst
 F:     include/linux/idr.h
 F:     include/linux/xarray.h

but i can do that in the xarray tree.

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH] Core-api: Documentation: Replace deprecated :c:func: Usage
  2020-08-10 18:30 [Linux-kernel-mentees] [PATCH] Core-api: Documentation: Replace deprecated :c:func: Usage Puranjay Mohan
  2020-08-10 18:41 ` Matthew Wilcox
@ 2020-08-11 16:27 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2020-08-11 16:27 UTC (permalink / raw)
  To: Puranjay Mohan; +Cc: linux-doc, linux-kernel-mentees, linux-kernel

On Tue, 11 Aug 2020 00:00:19 +0530
Puranjay Mohan <puranjay12@gmail.com> wrote:

> Replace :c:func: with func() as the previous usage is deprecated.
> 
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> ---
>  Documentation/core-api/idr.rst | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)

Applied, thanks.

jon
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-11 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 18:30 [Linux-kernel-mentees] [PATCH] Core-api: Documentation: Replace deprecated :c:func: Usage Puranjay Mohan
2020-08-10 18:41 ` Matthew Wilcox
2020-08-11 16:27 ` 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).