Skip to contentSkip to conversation

lib/min_heap: fix spelling and grammatical errors

PATCH In review Min-Hsun Chang 2 participants 2 messages Feb 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/min_heap: fix spelling and grammatical errors

The Min Heap API documentation and header file contain a few minor spelling and grammatical mistakes.

Fix the following:
- Add a missing period at the end of a sentence in min_heap.rst.
- Change "customise" to "customize" in min_heap.h for consistency with the documentation.
- Change "on to" to "onto" in the description of min_heap_push.

These changes improve the readability of the API and documentation.

---
 Documentation/core-api/min_heap.rst | 2 +-
 include/linux/min_heap.h            | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/core-api/min_heap.rst +1 -1
index 9f57766581df..62439be2cdf6 100644
@@ -75,7 +75,7 @@ elements in the heap and swapping them. It contains two function pointers:
 
 - **less** is the comparison function used to establish the order of elements.
 - **swp** is a function for swapping elements in the heap. If swp is set to
-  NULL, the default swap function will be used, which swaps the elements based on their size
+  NULL, the default swap function will be used, which swaps the elements based on their size.
 
 Macro Wrappers
 ==============
include/linux/min_heap.h +2 -2
index 79ddc0adbf2b..cb1cc0c0e8bd 100644
@@ -40,7 +40,7 @@ typedef DEFINE_MIN_HEAP(char, min_heap_char) min_heap_char;
 #define __minheap_obj_size(_heap)	sizeof((_heap)->data[0])
 
 /**
- * struct min_heap_callbacks - Data/functions to customise the min_heap.
+ * struct min_heap_callbacks - Data/functions to customize the min_heap.
  * @less: Partial order function for this heap.
  * @swp: Swap elements function.
  */
@@ -373,7 +373,7 @@ void __min_heap_pop_push_inline(min_heap_char *heap, const void *element, size_t
 	__min_heap_pop_push_inline(container_of(&(_heap)->nr, min_heap_char, nr), _element,	\
 				   __minheap_obj_size(_heap), _func, _args)
 
-/* Push an element on to the heap, O(log2(nr)). */
+/* Push an element onto the heap, O(log2(nr)). */
 static __always_inline
 bool __min_heap_push_inline(min_heap_char *heap, const void *element, size_t elem_size,
 			    const struct min_heap_callbacks *func, void *args)
Signature · 1 line
2.50.1
maintainer
#1 lore raw
Quoted 35 lines · Min-Hsun Chang

The Min Heap API documentation and header file contain a few minor spelling and grammatical mistakes.

Fix the following:
- Add a missing period at the end of a sentence in min_heap.rst.
- Change "customise" to "customize" in min_heap.h for consistency with the documentation.
- Change "on to" to "onto" in the description of min_heap_push.

These changes improve the readability of the API and documentation.

---
 Documentation/core-api/min_heap.rst | 2 +-
 include/linux/min_heap.h            | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/core-api/min_heap.rst +1 -1
index 9f57766581df..62439be2cdf6 100644
@@ -75,7 +75,7 @@ elements in the heap and swapping them. It contains two function pointers:
 
 - **less** is the comparison function used to establish the order of elements.
 - **swp** is a function for swapping elements in the heap. If swp is set to
-  NULL, the default swap function will be used, which swaps the elements based on their size
+  NULL, the default swap function will be used, which swaps the elements based on their size.
 
 Macro Wrappers
 ==============
include/linux/min_heap.h +0 -0
index 79ddc0adbf2b..cb1cc0c0e8bd 100644

include/linux/min_heap.h typedef DEFINE_MIN_HEAP(char, min_heap_char) min_heap_char; · line 43

Quoted 5 lines
include/linux/min_heap.h +1 -1
@@ -40,7 +40,7 @@ typedef DEFINE_MIN_HEAP(char, min_heap_char) min_heap_char;
 #define __minheap_obj_size(_heap)	sizeof((_heap)->data[0])
 
 /**
- * struct min_heap_callbacks - Data/functions to customise the min_heap.
+ * struct min_heap_callbacks - Data/functions to customize the min_heap.

Both British and American spellings are fine in the kernel and do not need to be fixed.

Thanks,

jon