]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Documentation/core-api: min_heap: update for variable types change
authorYu-Chun Lin <eleanor15x@gmail.com>
Sat, 15 Feb 2025 15:54:21 +0000 (23:54 +0800)
committerJonathan Corbet <corbet@lwn.net>
Tue, 18 Feb 2025 20:30:56 +0000 (13:30 -0700)
Update the documentation to reflect the change in variable types of
'nr' and 'size' from 'int' to 'size_t', ensuring consistency with
commit dec6c0aac4fc ("lib min_heap: Switch to size_t").

Signed-off-by: Yu-Chun Lin <eleanor15x@gmail.com>
Acked-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250215155421.2010336-1-eleanor15x@gmail.com
Documentation/core-api/min_heap.rst

index 683bc6d09f00df07d6101d76794996c94a54529c..9f57766581dfbd6b5eb620dfa1bc7b363f009dc9 100644 (file)
@@ -47,8 +47,8 @@ Example:
 
     #define MIN_HEAP_PREALLOCATED(_type, _name, _nr)
     struct _name {
-        int nr;         /* Number of elements in the heap */
-        int size;       /* Maximum number of elements that can be held */
+        size_t nr;         /* Number of elements in the heap */
+        size_t size;       /* Maximum number of elements that can be held */
         _type *data;    /* Pointer to the heap data */
         _type preallocated[_nr];  /* Static preallocated array */
     }