Phonet: fix kernel-doc syntax in file headers
Subsystems (2)
PATCH 1/1 Phonet: fix kernel-doc syntax in file headers
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
The header for include/*/linux/phonet.h 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 include/linux/phonet.h emits:
warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* file phonet.h
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
--- include/linux/phonet.h | 2 +- include/uapi/linux/phonet.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/phonet.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-only */ -/** +/* * file phonet.h * * Phonet sockets kernel interface
include/uapi/linux/phonet.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/** +/* * file phonet.h * * Phonet sockets kernel interface
Signature · 1 line
2.17.1
Quoted 12 lines · Aditya Srivastava
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
The header forinclude/*/linux/phonet.hfiles 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 commentsyntax(i.e, '/**'), which
causes unexpected warning from kernel-doc.
For e.g., runningscripts/kernel-doc-noneinclude/linux/phonet.hemits:
warning: This comment starts with '/**', but isn't a kernel-doc comment. ReferDocumentation/doc-guide/kernel-doc.rst
* filephonet.h
Quoted 4 lines
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Signed-off-by Aditya Srivastava <[email protected]>
Hi,
This all looks good, but it would be even better to remove the file names. We tend to prefer not to have filenames in their files because they get moved or renamed -- and because it's redundant info.
Anyway,
Thanks.
Quoted 28 lines
--- include/linux/phonet.h | 2 +- include/uapi/linux/phonet.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)include/linux/phonet.h +1
-1@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-only */ -/** +/* * file phonet.h * * Phonet sockets kernel interface include/uapi/linux/phonet.h +1
-1@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/** +/* * file phonet.h * * Phonet sockets kernel interface
Signature · 1 line
~Randy
Quoted 12 lines · Le jeudi 20 mai 2021, 21:21:59 EEST Aditya Srivastava a écrit :
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
The header forinclude/*/linux/phonet.hfiles 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., runningscripts/kernel-doc-noneinclude/linux/phonet.hemits:
warning: This comment starts with '/**', but isn't a kernel-doc comment. ReferDocumentation/doc-guide/kernel-doc.rst* filephonet.h
Quoted 4 lines
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Signed-off-by Aditya Srivastava <[email protected]>
You could just as well remove the stray "file XX" lines but OK.
Signature · 1 line
Rémi Denis-Courmont
Quoted 13 lines · Rémi Denis-Courmont
Quoted 12 lines · Le jeudi 20 mai 2021, 21:21:59 EEST Aditya Srivastava a écrit :
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
The header forinclude/*/linux/phonet.hfiles 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., runningscripts/kernel-doc-noneinclude/linux/phonet.hemits:
warning: This comment starts with '/**', but isn't a kernel-doc comment. ReferDocumentation/doc-guide/kernel-doc.rst* filephonet.h
Quoted 9 lines
Quoted 4 lines
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Signed-off-by Aditya Srivastava <[email protected]>You could just as well remove the stray "file XX" lines but OK.
Hi Remi and Randy
Thanks for reviewing :)
I'll be sending a v2 with removed filenames
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH v2 1/1 Phonet: fix kernel-doc syntax in file headers and remove file names
In reply to Rémi Denis-CourmontThe opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
For e.g., the header for include/linux/phonet.h 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:
warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* file phonet.h
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Also remove the redundant file name from the comment headers.
---
Changes in v2:
- Remove file name information from comment headers as well, as suggested by Randy and Remi
include/linux/phonet.h | 4 +--- include/uapi/linux/phonet.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
include/linux/phonet.h +1 -3
@@ -1,7 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-only */ -/** -* file phonet.h -* +/* * Phonet sockets kernel interface * * Copyright (C) 2008 Nokia Corporation. All rights reserved.
include/uapi/linux/phonet.h +1 -3
@@ -1,7 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/** -* file phonet.h -* +/* * Phonet sockets kernel interface * * Copyright (C) 2008 Nokia Corporation. All rights reserved.
Signature · 1 line
2.17.1
Re: [PATCH v2] Phonet: fix kernel-doc syntax in file headers and remove file names
Quoted 11 lines · Aditya Srivastava
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
For e.g., the header forinclude/linux/phonet.hfollows 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 commentsyntax(i.e, '/**'), which
causes unexpected warning from kernel-doc:
warning: This comment starts with '/**', but isn't a kernel-doc comment. ReferDocumentation/doc-guide/kernel-doc.rst
* filephonet.h
Quoted 6 lines
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Also remove the redundant file name from the comment headers.
Signed-off-by Aditya Srivastava <[email protected]>
Thanks.
Quoted 35 lines
---
Changes in v2:
- Remove file name information from comment headers as well, as suggested by Randy and Remiinclude/linux/phonet.h | 4 +--- include/uapi/linux/phonet.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)include/linux/phonet.h +1
-3@@ -1,7 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-only */ -/** -* file phonet.h -* +/* * Phonet sockets kernel interface * * Copyright (C) 2008 Nokia Corporation. All rights reserved. include/uapi/linux/phonet.h +1
-3@@ -1,7 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/** -* file phonet.h -* +/* * Phonet sockets kernel interface * * Copyright (C) 2008 Nokia Corporation. All rights reserved.
Signature · 1 line
~Randy
Re: [PATCH v2] Phonet: fix kernel-doc syntax in file headers and remove file names
In reply to Aditya SrivastavaQuoted 11 lines · Le samedi 22 mai 2021, 14:34:08 EEST Aditya Srivastava a écrit :
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
For e.g., the header forinclude/linux/phonet.hfollows 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:
warning: This comment starts with '/**', but isn't a kernel-doc comment. ReferDocumentation/doc-guide/kernel-doc.rst* filephonet.h
Quoted 6 lines
Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Also remove the redundant file name from the comment headers.
Signed-off-by Aditya Srivastava <[email protected]>
Quoted 35 lines
---
Changes in v2:
- Remove file name information from comment headers as well, as suggested by Randy and Remiinclude/linux/phonet.h | 4 +--- include/uapi/linux/phonet.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)include/linux/phonet.h +1
-3@@ -1,7 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-only */ -/** -* file phonet.h -* +/* * Phonet sockets kernel interface * * Copyright (C) 2008 Nokia Corporation. All rights reserved. include/uapi/linux/phonet.h +1
-3@@ -1,7 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/** -* file phonet.h -* +/* * Phonet sockets kernel interface * * Copyright (C) 2008 Nokia Corporation. All rights reserved.
Signature · 7 lines
Rémi Denis-Courmont _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees