* [PATCH] x86/sgx: fix incorrect kernel-doc comment syntax in files
@ 2021-03-30 21:18 Aditya Srivastava
2021-03-30 21:20 ` Randy Dunlap
2021-03-31 2:56 ` Jarkko Sakkinen
0 siblings, 2 replies; 3+ messages in thread
From: Aditya Srivastava @ 2021-03-30 21:18 UTC (permalink / raw)
To: linux-kernel
Cc: yashsri421, lukas.bulwahn, rdunlap, jarkko, dave.hansen, tglx,
mingo, bp, x86, hpa, linux-sgx, linux-kernel-mentees, linux-doc
The opening comment mark '/**' is used for highlighting the beginning of
kernel-doc comments.
There are certain files in arch/x86/kernel/cpu/sgx, which follow this
syntax, but the content inside does not comply with kernel-doc.
Such lines were probably not meant for kernel-doc parsing, but are parsed
due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
causes unexpected warnings from kernel-doc.
E.g., presence of kernel-doc like comment in the header lines for
arch/x86/kernel/cpu/sgx/encl.h causes this warning:
"warning: expecting prototype for 2016(). Prototype was for _X86_ENCL_H() instead"
Similarly for arch/x86/kernel/cpu/sgx/arch.h too.
Provide a simple fix by replacing these occurrences with general comment
format, i.e. '/*', to prevent kernel-doc from parsing it.
Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
---
* Applies perfectly on next-20210326
arch/x86/kernel/cpu/sgx/arch.h | 2 +-
arch/x86/kernel/cpu/sgx/encl.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/sgx/arch.h b/arch/x86/kernel/cpu/sgx/arch.h
index 26315bea1cb4..70b84bbdaa1d 100644
--- a/arch/x86/kernel/cpu/sgx/arch.h
+++ b/arch/x86/kernel/cpu/sgx/arch.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
* Copyright(c) 2016-20 Intel Corporation.
*
* Contains data structures defined by the SGX architecture. Data structures
diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h
index d8d30ccbef4c..76b9bc1c5c30 100644
--- a/arch/x86/kernel/cpu/sgx/encl.h
+++ b/arch/x86/kernel/cpu/sgx/encl.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
* Copyright(c) 2016-20 Intel Corporation.
*
* Contains the software defined data structures for enclaves.
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/sgx: fix incorrect kernel-doc comment syntax in files
2021-03-30 21:18 [PATCH] x86/sgx: fix incorrect kernel-doc comment syntax in files Aditya Srivastava
@ 2021-03-30 21:20 ` Randy Dunlap
2021-03-31 2:56 ` Jarkko Sakkinen
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-03-30 21:20 UTC (permalink / raw)
To: Aditya Srivastava, linux-kernel
Cc: lukas.bulwahn, jarkko, dave.hansen, tglx, mingo, bp, x86, hpa,
linux-sgx, linux-kernel-mentees, linux-doc
On 3/30/21 2:18 PM, Aditya Srivastava wrote:
> The opening comment mark '/**' is used for highlighting the beginning of
> kernel-doc comments.
> There are certain files in arch/x86/kernel/cpu/sgx, which follow this
> syntax, but the content inside does not comply with kernel-doc.
> Such lines were probably not meant for kernel-doc parsing, but are parsed
> due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
> causes unexpected warnings from kernel-doc.
>
> E.g., presence of kernel-doc like comment in the header lines for
> arch/x86/kernel/cpu/sgx/encl.h causes this warning:
> "warning: expecting prototype for 2016(). Prototype was for _X86_ENCL_H() instead"
>
> Similarly for arch/x86/kernel/cpu/sgx/arch.h too.
>
> Provide a simple fix by replacing these occurrences with general comment
> format, i.e. '/*', to prevent kernel-doc from parsing it.
>
> Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> * Applies perfectly on next-20210326
>
> arch/x86/kernel/cpu/sgx/arch.h | 2 +-
> arch/x86/kernel/cpu/sgx/encl.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/sgx/arch.h b/arch/x86/kernel/cpu/sgx/arch.h
> index 26315bea1cb4..70b84bbdaa1d 100644
> --- a/arch/x86/kernel/cpu/sgx/arch.h
> +++ b/arch/x86/kernel/cpu/sgx/arch.h
> @@ -1,5 +1,5 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> -/**
> +/*
> * Copyright(c) 2016-20 Intel Corporation.
> *
> * Contains data structures defined by the SGX architecture. Data structures
> diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h
> index d8d30ccbef4c..76b9bc1c5c30 100644
> --- a/arch/x86/kernel/cpu/sgx/encl.h
> +++ b/arch/x86/kernel/cpu/sgx/encl.h
> @@ -1,5 +1,5 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> -/**
> +/*
> * Copyright(c) 2016-20 Intel Corporation.
> *
> * Contains the software defined data structures for enclaves.
>
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/sgx: fix incorrect kernel-doc comment syntax in files
2021-03-30 21:18 [PATCH] x86/sgx: fix incorrect kernel-doc comment syntax in files Aditya Srivastava
2021-03-30 21:20 ` Randy Dunlap
@ 2021-03-31 2:56 ` Jarkko Sakkinen
1 sibling, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2021-03-31 2:56 UTC (permalink / raw)
To: Aditya Srivastava
Cc: linux-kernel, lukas.bulwahn, rdunlap, dave.hansen, tglx, mingo,
bp, x86, hpa, linux-sgx, linux-kernel-mentees, linux-doc
On Wed, Mar 31, 2021 at 02:48:13AM +0530, Aditya Srivastava wrote:
> The opening comment mark '/**' is used for highlighting the beginning of
> kernel-doc comments.
> There are certain files in arch/x86/kernel/cpu/sgx, which follow this
> syntax, but the content inside does not comply with kernel-doc.
> Such lines were probably not meant for kernel-doc parsing, but are parsed
> due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
> causes unexpected warnings from kernel-doc.
>
> E.g., presence of kernel-doc like comment in the header lines for
> arch/x86/kernel/cpu/sgx/encl.h causes this warning:
> "warning: expecting prototype for 2016(). Prototype was for _X86_ENCL_H() instead"
>
> Similarly for arch/x86/kernel/cpu/sgx/arch.h too.
>
> Provide a simple fix by replacing these occurrences with general comment
> format, i.e. '/*', to prevent kernel-doc from parsing it.
>
> Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
> ---
> * Applies perfectly on next-20210326
>
> arch/x86/kernel/cpu/sgx/arch.h | 2 +-
> arch/x86/kernel/cpu/sgx/encl.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/sgx/arch.h b/arch/x86/kernel/cpu/sgx/arch.h
> index 26315bea1cb4..70b84bbdaa1d 100644
> --- a/arch/x86/kernel/cpu/sgx/arch.h
> +++ b/arch/x86/kernel/cpu/sgx/arch.h
> @@ -1,5 +1,5 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> -/**
> +/*
> * Copyright(c) 2016-20 Intel Corporation.
> *
> * Contains data structures defined by the SGX architecture. Data structures
> diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h
> index d8d30ccbef4c..76b9bc1c5c30 100644
> --- a/arch/x86/kernel/cpu/sgx/encl.h
> +++ b/arch/x86/kernel/cpu/sgx/encl.h
> @@ -1,5 +1,5 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> -/**
> +/*
> * Copyright(c) 2016-20 Intel Corporation.
> *
> * Contains the software defined data structures for enclaves.
> --
> 2.17.1
>
>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
/Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-31 2:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30 21:18 [PATCH] x86/sgx: fix incorrect kernel-doc comment syntax in files Aditya Srivastava
2021-03-30 21:20 ` Randy Dunlap
2021-03-31 2:56 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).