diff mbox series

PCI: endpoint: fix incorrect kernel-doc comment syntax

Message ID 20210411101508.11065-1-yashsri421@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Bjorn Helgaas
Headers show
Series PCI: endpoint: fix incorrect kernel-doc comment syntax | expand

Commit Message

Aditya Srivastava April 11, 2021, 10:15 a.m. UTC
The opening comment mark '/**' is used for highlighting the beginning of
kernel-doc comments.
There are certain files in include/linux/pci*, 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 include/linux/pci-ep-cfs.h at
header causes this warnings by kernel-doc:
"warning: expecting prototype for PCI Endpoint ConfigFS header file(). Prototype was for __LINUX_PCI_EP_CFS_H() instead"

Similarly for other files too.

Provide a simple fix by replacing such occurrences with general comment
format, i.e. '/*', to prevent kernel-doc from parsing it.

Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
---
 include/linux/pci-ep-cfs.h | 2 +-
 include/linux/pci-epc.h    | 2 +-
 include/linux/pci-epf.h    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Randy Dunlap April 11, 2021, 4:04 p.m. UTC | #1
On 4/11/21 3:15 AM, Aditya Srivastava wrote:
> The opening comment mark '/**' is used for highlighting the beginning of
> kernel-doc comments.
> There are certain files in include/linux/pci*, 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 include/linux/pci-ep-cfs.h at
> header causes this warnings by kernel-doc:
> "warning: expecting prototype for PCI Endpoint ConfigFS header file(). Prototype was for __LINUX_PCI_EP_CFS_H() instead"
> 
> Similarly for other files too.
> 
> Provide a simple fix by replacing such 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>

Thanks.

> ---
>  include/linux/pci-ep-cfs.h | 2 +-
>  include/linux/pci-epc.h    | 2 +-
>  include/linux/pci-epf.h    | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/pci-ep-cfs.h b/include/linux/pci-ep-cfs.h
> index 662881335c7e..3e2140d7e31d 100644
> --- a/include/linux/pci-ep-cfs.h
> +++ b/include/linux/pci-ep-cfs.h
> @@ -1,5 +1,5 @@
>  /* SPDX-License-Identifier: GPL-2.0+ */
> -/**
> +/*
>   * PCI Endpoint ConfigFS header file
>   *
>   * Copyright (C) 2017 Texas Instruments
> diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h
> index b82c9b100e97..80197a6df371 100644
> --- a/include/linux/pci-epc.h
> +++ b/include/linux/pci-epc.h
> @@ -1,5 +1,5 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> -/**
> +/*
>   * PCI Endpoint *Controller* (EPC) header file
>   *
>   * Copyright (C) 2017 Texas Instruments
> diff --git a/include/linux/pci-epf.h b/include/linux/pci-epf.h
> index 6833e2160ef1..c43912b1d2d0 100644
> --- a/include/linux/pci-epf.h
> +++ b/include/linux/pci-epf.h
> @@ -1,5 +1,5 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> -/**
> +/*
>   * PCI Endpoint *Function* (EPF) header file
>   *
>   * Copyright (C) 2017 Texas Instruments
>
diff mbox series

Patch

diff --git a/include/linux/pci-ep-cfs.h b/include/linux/pci-ep-cfs.h
index 662881335c7e..3e2140d7e31d 100644
--- a/include/linux/pci-ep-cfs.h
+++ b/include/linux/pci-ep-cfs.h
@@ -1,5 +1,5 @@ 
 /* SPDX-License-Identifier: GPL-2.0+ */
-/**
+/*
  * PCI Endpoint ConfigFS header file
  *
  * Copyright (C) 2017 Texas Instruments
diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h
index b82c9b100e97..80197a6df371 100644
--- a/include/linux/pci-epc.h
+++ b/include/linux/pci-epc.h
@@ -1,5 +1,5 @@ 
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * PCI Endpoint *Controller* (EPC) header file
  *
  * Copyright (C) 2017 Texas Instruments
diff --git a/include/linux/pci-epf.h b/include/linux/pci-epf.h
index 6833e2160ef1..c43912b1d2d0 100644
--- a/include/linux/pci-epf.h
+++ b/include/linux/pci-epf.h
@@ -1,5 +1,5 @@ 
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * PCI Endpoint *Function* (EPF) header file
  *
  * Copyright (C) 2017 Texas Instruments