Skip to contentSkip to conversation

usb: dwc3: fix incorrect kernel-doc comment syntax in files

PATCH In review Aditya Srivastava 2 participants 2 messages Mar 29, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc3: fix incorrect kernel-doc comment syntax in files

The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
There are certain files in drivers/usb/dwc3, 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 drivers/usb/dwc3/io.h at
header causes this warnings by kernel-doc:
"warning: expecting prototype for h(). Prototype was for __DRIVERS_USB_DWC3_IO_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.

---
* Applies perfectly on next-20210326

 drivers/usb/dwc3/debug.h         | 2 +-
 drivers/usb/dwc3/debugfs.c       | 2 +-
 drivers/usb/dwc3/dwc3-keystone.c | 2 +-
 drivers/usb/dwc3/dwc3-pci.c      | 2 +-
 drivers/usb/dwc3/io.h            | 2 +-
 drivers/usb/dwc3/trace.c         | 2 +-
 drivers/usb/dwc3/trace.h         | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
drivers/usb/dwc3/debug.h +1 -1
index 8ab394942360..db231de46bb3 100644
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * debug.h - DesignWare USB3 DRD Controller Debug Header
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/debugfs.c +1 -1
index 5da4f6082d93..b0e3f434d219 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * debugfs.c - DesignWare USB3 DRD Controller DebugFS file
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/dwc3-keystone.c +1 -1
index 057056c0975e..1317959294e6 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-keystone.c - Keystone Specific Glue layer
  *
  * Copyright (C) 2010-2013 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/dwc3-pci.c +1 -1
index 4c5c6972124a..4698c43af5ae 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-pci.c - PCI Specific glue layer
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/io.h +1 -1
index 76b73b116862..1e96ea339d48 100644
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * io.h - DesignWare USB3 DRD IO Header
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/trace.c +1 -1
index 1b45a9723eeb..088995885678 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * trace.c - DesignWare USB3 DRD Controller Trace Support
  *
  * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/trace.h +1 -1
index 97f4f1125a41..60883268adfc 100644
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * trace.h - DesignWare USB3 DRD Controller Trace Support
  *
  * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
Signature · 6 lines
2.17.1

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Aditya Srivastava

The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
There are certain files in drivers/usb/dwc3, 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 drivers/usb/dwc3/io.h at
header causes this warnings by kernel-doc:
"warning: expecting prototype for h(). Prototype was for __DRIVERS_USB_DWC3_IO_H() instead"

Quoted 6 lines

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.

Thanks.

Quoted 90 lines

---
* Applies perfectly on next-20210326

 drivers/usb/dwc3/debug.h         | 2 +-
 drivers/usb/dwc3/debugfs.c       | 2 +-
 drivers/usb/dwc3/dwc3-keystone.c | 2 +-
 drivers/usb/dwc3/dwc3-pci.c      | 2 +-
 drivers/usb/dwc3/io.h            | 2 +-
 drivers/usb/dwc3/trace.c         | 2 +-
 drivers/usb/dwc3/trace.h         | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
drivers/usb/dwc3/debug.h +1 -1
index 8ab394942360..db231de46bb3 100644
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * debug.h - DesignWare USB3 DRD Controller Debug Header
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/debugfs.c +1 -1
index 5da4f6082d93..b0e3f434d219 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * debugfs.c - DesignWare USB3 DRD Controller DebugFS file
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/dwc3-keystone.c +1 -1
index 057056c0975e..1317959294e6 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-keystone.c - Keystone Specific Glue layer
  *
  * Copyright (C) 2010-2013 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/dwc3-pci.c +1 -1
index 4c5c6972124a..4698c43af5ae 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-pci.c - PCI Specific glue layer
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/io.h +1 -1
index 76b73b116862..1e96ea339d48 100644
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * io.h - DesignWare USB3 DRD IO Header
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/trace.c +1 -1
index 1b45a9723eeb..088995885678 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * trace.c - DesignWare USB3 DRD Controller Trace Support
  *
  * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
drivers/usb/dwc3/trace.h +1 -1
index 97f4f1125a41..60883268adfc 100644
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/**
+/*
  * trace.h - DesignWare USB3 DRD Controller Trace Support
  *
  * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
Signature · 6 lines
~Randy

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees