public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation/core-api: min_heap: update for variable types change
@ 2025-02-15 15:54 Yu-Chun Lin
  2025-02-15 16:48 ` Kuan-Wei Chiu
  2025-02-18 20:32 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Yu-Chun Lin @ 2025-02-15 15:54 UTC (permalink / raw)
  To: akpm, visitorckw, corbet; +Cc: linux-kernel, linux-doc, jserv, Yu-Chun Lin

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>
---
 Documentation/core-api/min_heap.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/core-api/min_heap.rst b/Documentation/core-api/min_heap.rst
index 683bc6d09f00..9f57766581df 100644
--- a/Documentation/core-api/min_heap.rst
+++ b/Documentation/core-api/min_heap.rst
@@ -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 */
     }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation/core-api: min_heap: update for variable types change
  2025-02-15 15:54 [PATCH] Documentation/core-api: min_heap: update for variable types change Yu-Chun Lin
@ 2025-02-15 16:48 ` Kuan-Wei Chiu
  2025-02-18 20:32 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Kuan-Wei Chiu @ 2025-02-15 16:48 UTC (permalink / raw)
  To: Yu-Chun Lin; +Cc: akpm, corbet, linux-kernel, linux-doc, jserv

On Sat, Feb 15, 2025 at 11:54:21PM +0800, Yu-Chun Lin wrote:
> 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>

LGTM. Thanks for the patch.

Acked-by: Kuan-Wei Chiu <visitorckw@gmail.com>

This reminds me that I have a patch to change 'int' to 'size_t' for
indexes in min_heap.h, but it hasn't been merged yet. I'll find it and
resend it.

Regards,
Kuan-Wei

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation/core-api: min_heap: update for variable types change
  2025-02-15 15:54 [PATCH] Documentation/core-api: min_heap: update for variable types change Yu-Chun Lin
  2025-02-15 16:48 ` Kuan-Wei Chiu
@ 2025-02-18 20:32 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2025-02-18 20:32 UTC (permalink / raw)
  To: Yu-Chun Lin, akpm, visitorckw; +Cc: linux-kernel, linux-doc, jserv, Yu-Chun Lin

Yu-Chun Lin <eleanor15x@gmail.com> writes:

> 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>
> ---
>  Documentation/core-api/min_heap.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/core-api/min_heap.rst b/Documentation/core-api/min_heap.rst
> index 683bc6d09f00..9f57766581df 100644
> --- a/Documentation/core-api/min_heap.rst
> +++ b/Documentation/core-api/min_heap.rst
> @@ -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 */

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-18 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-15 15:54 [PATCH] Documentation/core-api: min_heap: update for variable types change Yu-Chun Lin
2025-02-15 16:48 ` Kuan-Wei Chiu
2025-02-18 20:32 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox