linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sidhartha Kumar <sidhartha.kumar@oracle.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
	willy@infradead.org
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] idr: Fix the kernel-doc for idr_is_empty()
Date: Wed, 30 Jul 2025 11:31:03 -0500	[thread overview]
Message-ID: <fdd279cd-81e2-4abb-b344-2686758f6a2c@oracle.com> (raw)
In-Reply-To: <20250730113402.11733-1-manivannan.sadhasivam@oss.qualcomm.com>

On 7/30/25 7:34 AM, Manivannan Sadhasivam wrote:
> idr_is_empty() will return 'true' if IDR is empty and 'false' if any IDs
> have been allocated from it. But the kernel-doc says the opposite. Hence,
> fix it.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>

> ---
> 
> Btw, I'm not sure if we really need the radix_tree_tagged() check in this
> function. It looks redundant to me. But since I'm not too sure about it, I left
> it as it is.
> 
>   include/linux/idr.h | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/idr.h b/include/linux/idr.h
> index 2267902d29a7..4955cf89e9c7 100644
> --- a/include/linux/idr.h
> +++ b/include/linux/idr.h
> @@ -172,7 +172,9 @@ static inline void idr_init(struct idr *idr)
>    * idr_is_empty() - Are there any IDs allocated?
>    * @idr: IDR handle.
>    *
> - * Return: %true if any IDs have been allocated from this IDR.
> + * Return:
> + * * %true if this IDR is empty, or
> + * * %false if any IDs have been allocated from this IDR.
>    */
>   static inline bool idr_is_empty(const struct idr *idr)
>   {



      reply	other threads:[~2025-07-30 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30 11:34 Manivannan Sadhasivam
2025-07-30 16:31 ` Sidhartha Kumar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fdd279cd-81e2-4abb-b344-2686758f6a2c@oracle.com \
    --to=sidhartha.kumar@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox