Skip to contentSkip to conversation

USB: gadget: udc: fix kernel-doc syntax in file headers

PATCH In review Aditya Srivastava 3 participants 3 messages May 22, 2021 – Jun 3, 2021

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

PATCH 1/1 USB: gadget: udc: fix kernel-doc syntax in file headers

The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
The header for drivers/usb/gadget/udc/trace files follows this syntax, but the content inside does not comply with kernel-doc.

This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc.
For e.g., running scripts/kernel-doc -none drivers/usb/gadget/udc/trace.h emits:
warning: expecting prototype for udc.c(). Prototype was for TRACE_SYSTEM() instead

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

---
 drivers/usb/gadget/udc/trace.c | 2 +-
 drivers/usb/gadget/udc/trace.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/udc/trace.c +1 -1
index 7430624c0bd7..19e837de2a20 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * trace.c - USB Gadget Framework Trace Support
  *
  * Copyright (C) 2016 Intel Corporation
drivers/usb/gadget/udc/trace.h +1 -1
index 2d1f68b5ea76..98584f6b6c66 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * udc.c - Core UDC Framework
  *
  * Copyright (C) 2016 Intel Corporation
Signature · 1 line
2.17.1
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.
The header for drivers/usb/gadget/udc/trace files follows this syntax, but the content inside does not comply with kernel-doc.

This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc.
For e.g., running scripts/kernel-doc -none drivers/usb/gadget/udc/trace.h emits:
warning: expecting prototype for udc.c(). Prototype was for TRACE_SYSTEM() instead

Quoted 4 lines

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

Thanks.

Quoted 28 lines
---
 drivers/usb/gadget/udc/trace.c | 2 +-
 drivers/usb/gadget/udc/trace.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/udc/trace.c +1 -1
index 7430624c0bd7..19e837de2a20 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * trace.c - USB Gadget Framework Trace Support
  *
  * Copyright (C) 2016 Intel Corporation
drivers/usb/gadget/udc/trace.h +1 -1
index 2d1f68b5ea76..98584f6b6c66 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * udc.c - Core UDC Framework
  *
  * Copyright (C) 2016 Intel Corporation
Signature · 1 line
~Randy
Acked-by on v1 1/1
#2 lore raw
In reply to Aditya Srivastava
Quoted 12 lines · Aditya Srivastava

The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
The header for drivers/usb/gadget/udc/trace files follows this syntax, but the content inside does not comply with kernel-doc.

This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc.
For e.g., running scripts/kernel-doc -none drivers/usb/gadget/udc/trace.h emits:
warning: expecting prototype for udc.c(). Prototype was for TRACE_SYSTEM() instead

Quoted 4 lines

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

Signature · 1 line
balbi