[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fdd279cd-81e2-4abb-b344-2686758f6a2c@oracle.com>
Date: Wed, 30 Jul 2025 11:31:03 -0500
From: Sidhartha Kumar <sidhartha.kumar@...cle.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>,
willy@...radead.org
Cc: linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] idr: Fix the kernel-doc for idr_is_empty()
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@....qualcomm.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@...cle.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)
> {
Powered by blists - more mailing lists