public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/sgx: Fix a W=1 build warning in function comment
@ 2024-08-25  8:06 Kai Huang
  2024-08-25 12:37 ` [tip: x86/cleanups] " tip-bot2 for Kai Huang
  2024-08-27 18:21 ` [PATCH] " Jarkko Sakkinen
  0 siblings, 2 replies; 3+ messages in thread
From: Kai Huang @ 2024-08-25  8:06 UTC (permalink / raw)
  To: dave.hansen, tglx, bp, mingo, hpa, jarkko; +Cc: x86, linux-sgx, linux-kernel

Building the SGX code with W=1 generates below warning:

  arch/x86/kernel/cpu/sgx/main.c:741: warning: Function parameter or struct member 'low' not described in 'sgx_calc_section_metric'
  arch/x86/kernel/cpu/sgx/main.c:741: warning: Function parameter or struct member 'high' not described in 'sgx_calc_section_metric'
  ...

The function sgx_calc_section_metric() is a simple helper which is only
used in sgx/main.c.  There's no need to use k-doc style comment for it.

Downgrade to normal comment to silence this warning.

Signed-off-by: Kai Huang <kai.huang@intel.com>
---
 arch/x86/kernel/cpu/sgx/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
index 27892e57c4ef..1a000acd933a 100644
--- a/arch/x86/kernel/cpu/sgx/main.c
+++ b/arch/x86/kernel/cpu/sgx/main.c
@@ -732,7 +732,7 @@ int arch_memory_failure(unsigned long pfn, int flags)
 	return 0;
 }
 
-/**
+/*
  * A section metric is concatenated in a way that @low bits 12-31 define the
  * bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the
  * metric.

base-commit: e77f8f275278886d05ce6dfe9e3bc854e7bf0713
-- 
2.46.0


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

* [tip: x86/cleanups] x86/sgx: Fix a W=1 build warning in function comment
  2024-08-25  8:06 [PATCH] x86/sgx: Fix a W=1 build warning in function comment Kai Huang
@ 2024-08-25 12:37 ` tip-bot2 for Kai Huang
  2024-08-27 18:21 ` [PATCH] " Jarkko Sakkinen
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Kai Huang @ 2024-08-25 12:37 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Kai Huang, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     c6e6a3c1698a86bacf7eac256b0f1215a3616dc7
Gitweb:        https://git.kernel.org/tip/c6e6a3c1698a86bacf7eac256b0f1215a3616dc7
Author:        Kai Huang <kai.huang@intel.com>
AuthorDate:    Sun, 25 Aug 2024 20:06:49 +12:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 25 Aug 2024 14:29:38 +02:00

x86/sgx: Fix a W=1 build warning in function comment

Building the SGX code with W=1 generates below warning:

  arch/x86/kernel/cpu/sgx/main.c:741: warning: Function parameter or
  struct member 'low' not described in 'sgx_calc_section_metric'
  arch/x86/kernel/cpu/sgx/main.c:741: warning: Function parameter or
  struct member 'high' not described in 'sgx_calc_section_metric'
  ...

The function sgx_calc_section_metric() is a simple helper which is only
used in sgx/main.c.  There's no need to use kernel-doc style comment for
it.

Downgrade to a normal comment.

Signed-off-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240825080649.145250-1-kai.huang@intel.com

---
 arch/x86/kernel/cpu/sgx/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
index 27892e5..1a000ac 100644
--- a/arch/x86/kernel/cpu/sgx/main.c
+++ b/arch/x86/kernel/cpu/sgx/main.c
@@ -732,7 +732,7 @@ out:
 	return 0;
 }
 
-/**
+/*
  * A section metric is concatenated in a way that @low bits 12-31 define the
  * bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the
  * metric.

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

* Re: [PATCH] x86/sgx: Fix a W=1 build warning in function comment
  2024-08-25  8:06 [PATCH] x86/sgx: Fix a W=1 build warning in function comment Kai Huang
  2024-08-25 12:37 ` [tip: x86/cleanups] " tip-bot2 for Kai Huang
@ 2024-08-27 18:21 ` Jarkko Sakkinen
  1 sibling, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2024-08-27 18:21 UTC (permalink / raw)
  To: Kai Huang, dave.hansen, tglx, bp, mingo, hpa; +Cc: x86, linux-sgx, linux-kernel

On Sun Aug 25, 2024 at 11:06 AM EEST, Kai Huang wrote:
> Building the SGX code with W=1 generates below warning:
>
>   arch/x86/kernel/cpu/sgx/main.c:741: warning: Function parameter or struct member 'low' not described in 'sgx_calc_section_metric'
>   arch/x86/kernel/cpu/sgx/main.c:741: warning: Function parameter or struct member 'high' not described in 'sgx_calc_section_metric'
>   ...
>
> The function sgx_calc_section_metric() is a simple helper which is only
> used in sgx/main.c.  There's no need to use k-doc style comment for it.
>
> Downgrade to normal comment to silence this warning.
>
> Signed-off-by: Kai Huang <kai.huang@intel.com>
> ---
>  arch/x86/kernel/cpu/sgx/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
> index 27892e57c4ef..1a000acd933a 100644
> --- a/arch/x86/kernel/cpu/sgx/main.c
> +++ b/arch/x86/kernel/cpu/sgx/main.c
> @@ -732,7 +732,7 @@ int arch_memory_failure(unsigned long pfn, int flags)
>  	return 0;
>  }
>  
> -/**
> +/*
>   * A section metric is concatenated in a way that @low bits 12-31 define the
>   * bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the
>   * metric.
>
> base-commit: e77f8f275278886d05ce6dfe9e3bc854e7bf0713

Agreed, that has went there probably by plain mistake. Do not think it
has been intentional...

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

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

end of thread, other threads:[~2024-08-27 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-25  8:06 [PATCH] x86/sgx: Fix a W=1 build warning in function comment Kai Huang
2024-08-25 12:37 ` [tip: x86/cleanups] " tip-bot2 for Kai Huang
2024-08-27 18:21 ` [PATCH] " Jarkko Sakkinen

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