All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] idr: fix incorrect documentation of idr_is_empty()
@ 2022-04-05  8:22 Amit Cohen
  0 siblings, 0 replies; only message in thread
From: Amit Cohen @ 2022-04-05  8:22 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: willy, petrm, idosch, Amit Cohen

The function idr_is_empty() returns true in case that the IDR is empty,
which means that there is no ID which is allocated from this IDR.
Currently, the documentation is incorrect and describes the opposite
situation. Fix it.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
---
 include/linux/idr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/idr.h b/include/linux/idr.h
index a0dce14090a9..7834af491d46 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -155,7 +155,7 @@ 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 there is no ID which is allocated from this IDR.
  */
 static inline bool idr_is_empty(const struct idr *idr)
 {
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-05  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05  8:22 [PATCH] idr: fix incorrect documentation of idr_is_empty() Amit Cohen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.