mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/cpu: Fix kernel-doc warnings
@ 2025-10-05 20:41 Kael D'Alcamo
  2025-10-05 20:41 ` [PATCH 1/2] x86/cpu: Fix kernel-doc for 'amd_set_mtrr' Kael D'Alcamo
  2025-10-05 20:41 ` [PATCH 2/2] x86/cpu: Fix kernel-doc for 'centaur_get_free_region' Kael D'Alcamo
  0 siblings, 2 replies; 6+ messages in thread
From: Kael D'Alcamo @ 2025-10-05 20:41 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
  Cc: x86, H. Peter Anvin, linux-kernel

Fix the following kernel-doc warnings found by `make W=1`:

Warning: arch/x86/kernel/cpu/mtrr/amd.c:60 function parameter 'reg' not described in 'amd_set_mtrr'
Warning: arch/x86/kernel/cpu/mtrr/amd.c:60 function parameter 'base' not described in 'amd_set_mtrr'
Warning: arch/x86/kernel/cpu/mtrr/amd.c:60 function parameter 'size' not described in 'amd_set_mtrr'
Warning: arch/x86/kernel/cpu/mtrr/amd.c:60 function parameter 'type' not described in 'amd_set_mtrr'
Warning: arch/x86/kernel/cpu/mtrr/centaur.c:27 function parameter 'replace_reg' not described in 'centaur_get_free_region'

Kael D'Alcamo (2):
  x86/cpu: Fix kernel-doc for 'amd_set_mtrr'
  x86/cpu: Fix kernel-doc for 'centaur_get_free_region'

 arch/x86/kernel/cpu/mtrr/amd.c     | 8 ++++----
 arch/x86/kernel/cpu/mtrr/centaur.c | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.51.0


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

* [PATCH 1/2] x86/cpu: Fix kernel-doc for 'amd_set_mtrr'
  2025-10-05 20:41 [PATCH 0/2] x86/cpu: Fix kernel-doc warnings Kael D'Alcamo
@ 2025-10-05 20:41 ` Kael D'Alcamo
  2025-10-05 20:41 ` [PATCH 2/2] x86/cpu: Fix kernel-doc for 'centaur_get_free_region' Kael D'Alcamo
  1 sibling, 0 replies; 6+ messages in thread
From: Kael D'Alcamo @ 2025-10-05 20:41 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
  Cc: x86, H. Peter Anvin, linux-kernel

Signed-off-by: Kael D'Alcamo <dev@kael-k.io>
---
 arch/x86/kernel/cpu/mtrr/amd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/amd.c b/arch/x86/kernel/cpu/mtrr/amd.c
index ef3e8e42b782..02508a0a1a04 100644
--- a/arch/x86/kernel/cpu/mtrr/amd.c
+++ b/arch/x86/kernel/cpu/mtrr/amd.c
@@ -49,10 +49,10 @@ amd_get_mtrr(unsigned int reg, unsigned long *base,
 /**
  * amd_set_mtrr - Set variable MTRR register on the local CPU.
  *
- * @reg The register to set.
- * @base The base address of the region.
- * @size The size of the region. If this is 0 the region is disabled.
- * @type The type of the region.
+ * @reg: The register to set.
+ * @base: The base address of the region.
+ * @size: The size of the region. If this is 0 the region is disabled.
+ * @type: The type of the region.
  *
  * Returns nothing.
  */
-- 
2.51.0


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

* [PATCH 2/2] x86/cpu: Fix kernel-doc for 'centaur_get_free_region'
  2025-10-05 20:41 [PATCH 0/2] x86/cpu: Fix kernel-doc warnings Kael D'Alcamo
  2025-10-05 20:41 ` [PATCH 1/2] x86/cpu: Fix kernel-doc for 'amd_set_mtrr' Kael D'Alcamo
@ 2025-10-05 20:41 ` Kael D'Alcamo
  2025-10-21 10:37   ` Borislav Petkov
  1 sibling, 1 reply; 6+ messages in thread
From: Kael D'Alcamo @ 2025-10-05 20:41 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
  Cc: x86, H. Peter Anvin, linux-kernel

Signed-off-by: Kael D'Alcamo <dev@kael-k.io>
---
 arch/x86/kernel/cpu/mtrr/centaur.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/cpu/mtrr/centaur.c b/arch/x86/kernel/cpu/mtrr/centaur.c
index 6f6c3ae92943..f4c72402c284 100644
--- a/arch/x86/kernel/cpu/mtrr/centaur.c
+++ b/arch/x86/kernel/cpu/mtrr/centaur.c
@@ -20,6 +20,7 @@ static u8 centaur_mcr_type;	/* 0 for winchip, 1 for winchip2 */
  *
  * @base: The starting (base) address of the region.
  * @size: The size (in bytes) of the region.
+ * @replace_reg: mtrr index to be replaced; set to invalid value if none.
  *
  * Returns: the index of the region on success, else -1 on error.
  */
-- 
2.51.0


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

* Re: [PATCH 2/2] x86/cpu: Fix kernel-doc for 'centaur_get_free_region'
  2025-10-05 20:41 ` [PATCH 2/2] x86/cpu: Fix kernel-doc for 'centaur_get_free_region' Kael D'Alcamo
@ 2025-10-21 10:37   ` Borislav Petkov
  2025-10-26 19:54     ` [PATCH v2 0/1] x86/mtrr: Fix kernel-doc warnings in amd.c and centaur.c Kael D'Alcamo
  0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2025-10-21 10:37 UTC (permalink / raw)
  To: Kael D'Alcamo
  Cc: Thomas Gleixner, Ingo Molnar, Dave Hansen, x86, H. Peter Anvin,
	linux-kernel

On Sun, Oct 05, 2025 at 10:41:21PM +0200, Kael D'Alcamo wrote:
> Signed-off-by: Kael D'Alcamo <dev@kael-k.io>
> ---
>  arch/x86/kernel/cpu/mtrr/centaur.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/cpu/mtrr/centaur.c b/arch/x86/kernel/cpu/mtrr/centaur.c
> index 6f6c3ae92943..f4c72402c284 100644
> --- a/arch/x86/kernel/cpu/mtrr/centaur.c
> +++ b/arch/x86/kernel/cpu/mtrr/centaur.c
> @@ -20,6 +20,7 @@ static u8 centaur_mcr_type;	/* 0 for winchip, 1 for winchip2 */
>   *
>   * @base: The starting (base) address of the region.
>   * @size: The size (in bytes) of the region.
> + * @replace_reg: mtrr index to be replaced; set to invalid value if none.

I'm afraid I can't follow here what invalid value you mean...

In any case, pls merge those two into a single patch and make sure it has
a commit message.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* [PATCH v2 0/1] x86/mtrr: Fix kernel-doc warnings in amd.c and centaur.c
  2025-10-21 10:37   ` Borislav Petkov
@ 2025-10-26 19:54     ` Kael D'Alcamo
  2025-10-26 19:54       ` [PATCH v2 1/1] " Kael D'Alcamo
  0 siblings, 1 reply; 6+ messages in thread
From: Kael D'Alcamo @ 2025-10-26 19:54 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
  Cc: x86, H. Peter Anvin, linux-kernel

Hi Boris,

Thank you for your feedback

>> Signed-off-by: Kael D'Alcamo <dev@kael-k.io>
>> ---
>>  arch/x86/kernel/cpu/mtrr/centaur.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/arch/x86/kernel/cpu/mtrr/centaur.c b/arch/x86/kernel/cpu/mtrr/centaur.c
>> index 6f6c3ae92943..f4c72402c284 100644
>> --- a/arch/x86/kernel/cpu/mtrr/centaur.c
>> +++ b/arch/x86/kernel/cpu/mtrr/centaur.c
>> @@ -20,6 +20,7 @@ static u8 centaur_mcr_type;	/* 0 for winchip, 1 for winchip2 */
>>   *
>>   * @base: The starting (base) address of the region.
>>   * @size: The size (in bytes) of the region.
>> + * @replace_reg: mtrr index to be replaced; set to invalid value if none.
>
>I'm afraid I can't follow here what invalid value you mean...

In order to solve the warning issue while keeping the documentation
homogeneus, I used the same description from the get_free_region in
generic.c.
I believe that the original doc author referred to the fact that you can either
choose to reuse a specific MTRR (by passing its index in replace_reg) 
or ask the function to find a free one
by passing an "invalid value" (for instance -1).

Changelog v1 -> v2:
* merge changes into a single patch
* add commit message

Have a nice day,
Kael.

Kael D'Alcamo (1):
  x86/mtrr: Fix kernel-doc warnings in amd.c and centaur.c

 arch/x86/kernel/cpu/mtrr/amd.c     | 8 ++++----
 arch/x86/kernel/cpu/mtrr/centaur.c | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.51.1


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

* [PATCH v2 1/1] x86/mtrr: Fix kernel-doc warnings in amd.c and centaur.c
  2025-10-26 19:54     ` [PATCH v2 0/1] x86/mtrr: Fix kernel-doc warnings in amd.c and centaur.c Kael D'Alcamo
@ 2025-10-26 19:54       ` Kael D'Alcamo
  0 siblings, 0 replies; 6+ messages in thread
From: Kael D'Alcamo @ 2025-10-26 19:54 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
  Cc: x86, H. Peter Anvin, linux-kernel

Fix kernel-doc issues in amd.c and centaur.c that triggered warnings when
building with `W=1`

Signed-off-by: Kael D'Alcamo <dev@kael-k.io>
---
 arch/x86/kernel/cpu/mtrr/amd.c     | 8 ++++----
 arch/x86/kernel/cpu/mtrr/centaur.c | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/amd.c b/arch/x86/kernel/cpu/mtrr/amd.c
index ef3e8e42b782..02508a0a1a04 100644
--- a/arch/x86/kernel/cpu/mtrr/amd.c
+++ b/arch/x86/kernel/cpu/mtrr/amd.c
@@ -49,10 +49,10 @@ amd_get_mtrr(unsigned int reg, unsigned long *base,
 /**
  * amd_set_mtrr - Set variable MTRR register on the local CPU.
  *
- * @reg The register to set.
- * @base The base address of the region.
- * @size The size of the region. If this is 0 the region is disabled.
- * @type The type of the region.
+ * @reg: The register to set.
+ * @base: The base address of the region.
+ * @size: The size of the region. If this is 0 the region is disabled.
+ * @type: The type of the region.
  *
  * Returns nothing.
  */
diff --git a/arch/x86/kernel/cpu/mtrr/centaur.c b/arch/x86/kernel/cpu/mtrr/centaur.c
index 6f6c3ae92943..f4c72402c284 100644
--- a/arch/x86/kernel/cpu/mtrr/centaur.c
+++ b/arch/x86/kernel/cpu/mtrr/centaur.c
@@ -20,6 +20,7 @@ static u8 centaur_mcr_type;	/* 0 for winchip, 1 for winchip2 */
  *
  * @base: The starting (base) address of the region.
  * @size: The size (in bytes) of the region.
+ * @replace_reg: mtrr index to be replaced; set to invalid value if none.
  *
  * Returns: the index of the region on success, else -1 on error.
  */
-- 
2.51.1


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

end of thread, other threads:[~2025-10-26 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-05 20:41 [PATCH 0/2] x86/cpu: Fix kernel-doc warnings Kael D'Alcamo
2025-10-05 20:41 ` [PATCH 1/2] x86/cpu: Fix kernel-doc for 'amd_set_mtrr' Kael D'Alcamo
2025-10-05 20:41 ` [PATCH 2/2] x86/cpu: Fix kernel-doc for 'centaur_get_free_region' Kael D'Alcamo
2025-10-21 10:37   ` Borislav Petkov
2025-10-26 19:54     ` [PATCH v2 0/1] x86/mtrr: Fix kernel-doc warnings in amd.c and centaur.c Kael D'Alcamo
2025-10-26 19:54       ` [PATCH v2 1/1] " Kael D'Alcamo

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

all inboxes | Powered by JetHome®