Skip to contentSkip to conversation

block: fix comment syntax in file headers

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

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

PATCH 1/1 block: fix comment syntax in file headers

The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
There are files in block/partitions/ which follow this syntax in their file headers, i.e. start with '/**' like comments, which causes unexpected warnings from kernel-doc.

E.g., running scripts/kernel-doc -none on block/partitions/ldm.h causes this warning:
"warning: expecting prototype for ldm(). Prototype was for _FS_PT_LDM_H_() instead"

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-20210312

 block/partitions/ldm.c | 2 +-
 block/partitions/ldm.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
block/partitions/ldm.c +1 -1
index d333786b5c7e..14b124cdacfc 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
-/**
+/*
  * ldm - Support for Windows Logical Disk Manager (Dynamic Disks)
  *
  * Copyright (C) 2001,2002 Richard Russon <[email protected]>
block/partitions/ldm.h +1 -1
index d8d6beaa72c4..ffdecf1c6bb3 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
-/**
+/*
  * ldm - Part of the Linux-NTFS project.
  *
  * Copyright (C) 2001,2002 Richard Russon <[email protected]>
Signature · 6 lines
2.17.1

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

The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments.
There are files in block/partitions/ which follow this syntax in their file headers, i.e. start with '/**' like comments, which causes unexpected warnings from kernel-doc.

Quoted 8 lines

E.g., running scripts/kernel-doc -none on block/partitions/ldm.h causes this warning:
"warning: expecting prototype for ldm(). Prototype was for _FS_PT_LDM_H_() instead"

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

Thanks.

Quoted 30 lines

---
* Applies perfectly on next-20210312

 block/partitions/ldm.c | 2 +-
 block/partitions/ldm.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
block/partitions/ldm.c +1 -1
index d333786b5c7e..14b124cdacfc 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
-/**
+/*
  * ldm - Support for Windows Logical Disk Manager (Dynamic Disks)
  *
  * Copyright (C) 2001,2002 Richard Russon <[email protected]>
block/partitions/ldm.h +1 -1
index d8d6beaa72c4..ffdecf1c6bb3 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
-/**
+/*
  * ldm - Part of the Linux-NTFS project.
  *
  * Copyright (C) 2001,2002 Richard Russon <[email protected]>
Signature · 6 lines
~Randy

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