Skip to contentSkip to conversation

Documentation/core-api: min_heap: remove documented but unimplemented min_heap_empty()

PATCH Superseded Jyun-An Chen 3 participants 3 messages Jul 21 – Jul 22

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Documentation/core-api: min_heap: remove documented but unimplemented min_heap_empty()

min_heap_empty()/min_heap_empty_inline() are documented as part of the Min Heap API, but no such functions or macros exist in include/linux/min_heap.h or lib/min_heap.c. Remove the stale description instead of adding unused API surface.

---
Changes since v2:
- Fixed subject line.

 Documentation/core-api/min_heap.rst | 13 -------------
 1 file changed, 13 deletions(-)
Documentation/core-api/min_heap.rst +0 -13
index 9f57766581df..919dcf1bdec7 100644
@@ -240,19 +240,6 @@ This macro returns `true` if the heap is full, otherwise `false`.
 
 **Inline Version:** min_heap_full_inline(heap)
 
-- **min_heap_empty(heap)**: Checks whether the heap is empty.
-  Complexity: **O(1)**.
-
-.. code-block:: c
-
-    bool empty = min_heap_empty(heap);
-
-- `heap`: A pointer to the min-heap to check.
-
-This macro returns `true` if the heap is empty, otherwise `false`.
-
-**Inline Version:** min_heap_empty_inline(heap)
-
 Example Usage
 =============
 
Signature · 1 line
2.43.0
reviewer Acked-by on v3 1/1
#1 lore raw
Quoted 7 lines · Jyun-An Chen

min_heap_empty()/min_heap_empty_inline() are documented as part of the Min Heap API, but no such functions or macros exist in include/linux/min_heap.h or lib/min_heap.c. Remove the stale description instead of adding unused API surface.

Thanks.

Quoted 31 lines

---
Changes since v2:
- Fixed subject line.

 Documentation/core-api/min_heap.rst | 13 -------------
 1 file changed, 13 deletions(-)
Documentation/core-api/min_heap.rst +0 -13
index 9f57766581df..919dcf1bdec7 100644
@@ -240,19 +240,6 @@ This macro returns `true` if the heap is full, otherwise `false`.
 
 **Inline Version:** min_heap_full_inline(heap)
 
-- **min_heap_empty(heap)**: Checks whether the heap is empty.
-  Complexity: **O(1)**.
-
-.. code-block:: c
-
-    bool empty = min_heap_empty(heap);
-
-- `heap`: A pointer to the min-heap to check.
-
-This macro returns `true` if the heap is empty, otherwise `false`.
-
-**Inline Version:** min_heap_empty_inline(heap)
-
 Example Usage
 =============
 
Signature · 1 line
~Randy
maintainer
#2 lore raw
In reply to Jyun-An Chen
Quoted 4 lines · Jyun-An Chen

min_heap_empty()/min_heap_empty_inline() are documented as part of the Min Heap API, but no such functions or macros exist in include/linux/min_heap.h or lib/min_heap.c. Remove the stale description instead of adding unused API surface.

I think we can drop the last clause "instead of adding unused API surface". It reads like unnecessary AI generated text.

Regards,
Kuan-Wei

Quoted 37 lines

---
Changes since v2:
- Fixed subject line.

 Documentation/core-api/min_heap.rst | 13 -------------
 1 file changed, 13 deletions(-)
Documentation/core-api/min_heap.rst +0 -13
index 9f57766581df..919dcf1bdec7 100644
@@ -240,19 +240,6 @@ This macro returns `true` if the heap is full, otherwise `false`.
 
 **Inline Version:** min_heap_full_inline(heap)
 
-- **min_heap_empty(heap)**: Checks whether the heap is empty.
-  Complexity: **O(1)**.
-
-.. code-block:: c
-
-    bool empty = min_heap_empty(heap);
-
-- `heap`: A pointer to the min-heap to check.
-
-This macro returns `true` if the heap is empty, otherwise `false`.
-
-**Inline Version:** min_heap_empty_inline(heap)
-
 Example Usage
 =============
 
Signature · 1 line
2.43.0