ntfs: fix incorrect kernel-doc comment syntax in files
PATCH 1/1 ntfs: 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 fs/ntfs 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 forfs/ntfs/attrib.c, causes these unexpected warnings by kernel-doc:
"warning: Incorrect use of kernel-doc format: * ntfs_map_runlist_nolock - map (a part of) a runlist of an ntfs inode" "warning: Function parameter or member 'ni' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'vcn' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'ctx' not described in 'ntfs_map_runlist_nolock'"
"warning: expecting prototype for c(). Prototype was for ntfs_map_runlist_nolock() 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-20210319
fs/ntfs/aops.c | 2 +- fs/ntfs/aops.h | 2 +- fs/ntfs/attrib.c | 2 +- fs/ntfs/compress.c | 8 ++++---- fs/ntfs/dir.c | 4 ++-- fs/ntfs/inode.c | 2 +- fs/ntfs/mft.c | 2 +- fs/ntfs/runlist.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-)
fs/ntfs/aops.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * aops.c - NTFS kernel address space operations and page cache handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/aops.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -/** +/* * aops.h - Defines for NTFS kernel address space operations and page cache * handling. Part of the Linux-NTFS project. *
fs/ntfs/attrib.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * attrib.c - NTFS attribute operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/compress.c +4 -4
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * compress.c - NTFS kernel compressed attributes handling. * Part of the Linux-NTFS project. *
@@ -18,7 +18,7 @@#include "debug.h" #include "ntfs.h" -/** +/* * ntfs_compression_constants - enum of constants used in the compression code */ typedef enum {
@@ -41,12 +41,12 @@ typedef enum {NTFS_MAX_CB_SIZE =64 *1024 , } ntfs_compression_constants; -/** +/* * ntfs_compression_buffer - one buffer for the decompression engine */ static u8 *ntfs_compression_buffer; -/** +/* * ntfs_cb_lock - spinlock which protects ntfs_compression_buffer */ static DEFINE_SPINLOCK (ntfs_cb_lock);
fs/ntfs/dir.c +2 -2
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov
@@ -17,7 +17,7 @@#include "debug.h" #include "ntfs.h" -/** +/* * The little endian Unicode string $I30 as a global constant. */ ntfschar I30 [5 ] = {cpu_to_le16 ('$' ),cpu_to_le16 ('I' ),
fs/ntfs/inode.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * inode.c - NTFS kernel inode handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/mft.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * mft.c - NTFS kernel mft record operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/runlist.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * runlist.c - NTFS runlist handling code. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
LGTM. Thanks.
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 81 lines · Aditya Srivastava
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
There are certain files in fs/ntfs 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 commentsyntax(i.e, '/**'), which causes unexpected warnings from kernel-doc.E.g., presence of kernel-doc like comment in the header for
fs/ntfs/attrib.c, causes these unexpected warnings by kernel-doc:
"warning: Incorrect use of kernel-doc format: *ntfs_map_runlist_nolock- map (a part of) a runlist of an ntfs inode" "warning: Function parameter or member 'ni' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'vcn' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'ctx' not described in 'ntfs_map_runlist_nolock'"
"warning: expecting prototype forc(). Prototype was forntfs_map_runlist_nolock()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 <[email protected]>---
* Applies perfectly on next-20210319fs/ntfs/aops.c | 2 +- fs/ntfs/aops.h | 2 +- fs/ntfs/attrib.c | 2 +- fs/ntfs/compress.c | 8 ++++---- fs/ntfs/dir.c | 4 ++-- fs/ntfs/inode.c | 2 +- fs/ntfs/mft.c | 2 +- fs/ntfs/runlist.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-)fs/ntfs/aops.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * aops.c - NTFS kernel address space operations and page cache handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc. fs/ntfs/aops.h +1
-1@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -/** +/* * aops.h - Defines for NTFS kernel address space operations and page cache * handling. Part of the Linux-NTFS project. * fs/ntfs/attrib.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * attrib.c - NTFS attribute operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc. fs/ntfs/compress.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * compress.c - NTFS kernel compressed attributes handling. * Part of the Linux-NTFS project. *
fs/ntfs/compress.c line 22
Quoted 6 lines
fs/ntfs/compress.c +1
-1@@ -18,7 +18,7 @@#include "debug.h" #include "ntfs.h" -/** +/* * ntfs_compression_constants - enum of constants used in the compression code
here this one should probably be prefixed with enum; then, it should be valid kernel-doc.
Quoted 71 lines
fs/ntfs/compress.c +2
-2*/ typedef enum {@@ -41,12 +41,12 @@ typedef enum {NTFS_MAX_CB_SIZE =64 *1024 , } ntfs_compression_constants; -/** +/* * ntfs_compression_buffer - one buffer for the decompression engine */ static u8 *ntfs_compression_buffer; -/** +/* * ntfs_cb_lock - spinlock which protects ntfs_compression_buffer */ static DEFINE_SPINLOCK (ntfs_cb_lock);fs/ntfs/dir.c +2
-2@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov @@ -17,7 +17,7 @@#include "debug.h" #include "ntfs.h" -/** +/* * The little endian Unicode string $I30 as a global constant. */ ntfschar I30 [5 ] = {cpu_to_le16 ('$' ),cpu_to_le16 ('I' ),fs/ntfs/inode.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * inode.c - NTFS kernel inode handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc. fs/ntfs/mft.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * mft.c - NTFS kernel mft record operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc. fs/ntfs/runlist.c +1
-2@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * runlist.c - NTFS runlist handling code. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov --
Quoted 2 lines
2.17.1
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH v2 1/1 ntfs: 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 fs/ntfs 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 forfs/ntfs/attrib.c, causes these unexpected warnings by kernel-doc:
"warning: Incorrect use of kernel-doc format: * ntfs_map_runlist_nolock - map (a part of) a runlist of an ntfs inode" "warning: Function parameter or member 'ni' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'vcn' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'ctx' not described in 'ntfs_map_runlist_nolock'"
"warning: expecting prototype for c(). Prototype was for ntfs_map_runlist_nolock() 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.
Also fix enum documentation format at "ntfs_compression_constants", in fs/ntfs/compress.c, by prefixing 'enum' keyword to the comment description.
---
Changes in v2:
- prefix 'enum' keyword at "ntfs_compression_constants - enum of constants used in the compression code" comment in fs/ntfs/compress.c
- modify comment message correspondingly
fs/ntfs/aops.c | 2 +- fs/ntfs/aops.h | 2 +- fs/ntfs/attrib.c | 2 +- fs/ntfs/compress.c | 8 ++++---- fs/ntfs/dir.c | 4 ++-- fs/ntfs/inode.c | 2 +- fs/ntfs/mft.c | 2 +- fs/ntfs/runlist.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-)
fs/ntfs/aops.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * aops.c - NTFS kernel address space operations and page cache handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/aops.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -/** +/* * aops.h - Defines for NTFS kernel address space operations and page cache * handling. Part of the Linux-NTFS project. *
fs/ntfs/attrib.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * attrib.c - NTFS attribute operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/compress.c +4 -4
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * compress.c - NTFS kernel compressed attributes handling. * Part of the Linux-NTFS project. *
@@ -19,7 +19,7 @@#include "ntfs.h" /** -* ntfs_compression_constants - enum of constants used in the compression code +* enum ntfs_compression_constants - enum of constants used in the compression code */ typedef enum { /* Token types and access mask. */
@@ -41,12 +41,12 @@ typedef enum {NTFS_MAX_CB_SIZE =64 *1024 , } ntfs_compression_constants; -/** +/* * ntfs_compression_buffer - one buffer for the decompression engine */ static u8 *ntfs_compression_buffer; -/** +/* * ntfs_cb_lock - spinlock which protects ntfs_compression_buffer */ static DEFINE_SPINLOCK (ntfs_cb_lock);
fs/ntfs/dir.c +2 -2
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov
@@ -17,7 +17,7 @@#include "debug.h" #include "ntfs.h" -/** +/* * The little endian Unicode string $I30 as a global constant. */ ntfschar I30 [5 ] = {cpu_to_le16 ('$' ),cpu_to_le16 ('I' ),
fs/ntfs/inode.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * inode.c - NTFS kernel inode handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/mft.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * mft.c - NTFS kernel mft record operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc.
fs/ntfs/runlist.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * runlist.c - NTFS runlist handling code. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 18 lines · Aditya Srivastava
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
There are certain files in fs/ntfs 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 commentsyntax(i.e, '/**'), which causes unexpected warnings from kernel-doc.E.g., presence of kernel-doc like comment in the header for
fs/ntfs/attrib.c, causes these unexpected warnings by kernel-doc:
"warning: Incorrect use of kernel-doc format: *ntfs_map_runlist_nolock- map (a part of) a runlist of an ntfs inode" "warning: Function parameter or member 'ni' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'vcn' not described in 'ntfs_map_runlist_nolock'"
"warning: Function parameter or member 'ctx' not described in 'ntfs_map_runlist_nolock'"
"warning: expecting prototype forc(). Prototype was forntfs_map_runlist_nolock()instead"Similarly for other files too.
Quoted 8 lines
Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it.
Also fix enum documentation format at "
ntfs_compression_constants", infs/ntfs/compress.c, by prefixing 'enum' keyword to the comment description.Signed-off-by Aditya Srivastava <[email protected]>
Thanks.
Quoted 137 lines
---
Changes in v2:
- prefix 'enum' keyword at "ntfs_compression_constants- enum of constants used in the compression code" comment infs/ntfs/compress.c
- modify comment message correspondinglyfs/ntfs/aops.c | 2 +- fs/ntfs/aops.h | 2 +- fs/ntfs/attrib.c | 2 +- fs/ntfs/compress.c | 8 ++++---- fs/ntfs/dir.c | 4 ++-- fs/ntfs/inode.c | 2 +- fs/ntfs/mft.c | 2 +- fs/ntfs/runlist.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-)fs/ntfs/aops.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * aops.c - NTFS kernel address space operations and page cache handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc. fs/ntfs/aops.h +1
-1@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -/** +/* * aops.h - Defines for NTFS kernel address space operations and page cache * handling. Part of the Linux-NTFS project. * fs/ntfs/attrib.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * attrib.c - NTFS attribute operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc. fs/ntfs/compress.c +4
-4@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * compress.c - NTFS kernel compressed attributes handling. * Part of the Linux-NTFS project. * @@ -19,7 +19,7 @@#include "ntfs.h" /** -* ntfs_compression_constants - enum of constants used in the compression code +* enum ntfs_compression_constants - enum of constants used in the compression code */ typedef enum { /* Token types and access mask. */@@ -41,12 +41,12 @@ typedef enum {NTFS_MAX_CB_SIZE =64 *1024 , } ntfs_compression_constants; -/** +/* * ntfs_compression_buffer - one buffer for the decompression engine */ static u8 *ntfs_compression_buffer; -/** +/* * ntfs_cb_lock - spinlock which protects ntfs_compression_buffer */ static DEFINE_SPINLOCK (ntfs_cb_lock);fs/ntfs/dir.c +2
-2@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov @@ -17,7 +17,7 @@#include "debug.h" #include "ntfs.h" -/** +/* * The little endian Unicode string $I30 as a global constant. */ ntfschar I30 [5 ] = {cpu_to_le16 ('$' ),cpu_to_le16 ('I' ),fs/ntfs/inode.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * inode.c - NTFS kernel inode handling. * * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc. fs/ntfs/mft.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * mft.c - NTFS kernel mft record operations. Part of the Linux-NTFS project. * * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc. fs/ntfs/runlist.c +1
-1@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0-or-later -/** +/* * runlist.c - NTFS runlist handling code. Part of the Linux-NTFS project. * * Copyright (c) 2001-2007 Anton Altaparmakov
Signature · 6 lines
~Randy _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees