linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: fix comment syntax in file headers
@ 2021-03-17 20:52 Aditya Srivastava
  2021-03-17 21:25 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Aditya Srivastava @ 2021-03-17 20:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, yashsri421, linux-ntfs-dev, ldm, linux-block,
	linux-kernel-mentees

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.

Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
---
* Applies perfectly on next-20210312

 block/partitions/ldm.c | 2 +-
 block/partitions/ldm.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
index d333786b5c7e..14b124cdacfc 100644
--- a/block/partitions/ldm.c
+++ b/block/partitions/ldm.c
@@ -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 <ldm@flatcap.org>
diff --git a/block/partitions/ldm.h b/block/partitions/ldm.h
index d8d6beaa72c4..ffdecf1c6bb3 100644
--- a/block/partitions/ldm.h
+++ b/block/partitions/ldm.h
@@ -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 <ldm@flatcap.org>
-- 
2.17.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] block: fix comment syntax in file headers
  2021-03-17 20:52 [PATCH] block: fix comment syntax in file headers Aditya Srivastava
@ 2021-03-17 21:25 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2021-03-17 21:25 UTC (permalink / raw)
  To: Aditya Srivastava, linux-kernel
  Cc: axboe, linux-ntfs-dev, ldm, linux-block, linux-kernel-mentees

On 3/17/21 1:52 PM, Aditya Srivastava wrote:
> 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.
> 
> Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> * Applies perfectly on next-20210312
> 
>  block/partitions/ldm.c | 2 +-
>  block/partitions/ldm.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
> index d333786b5c7e..14b124cdacfc 100644
> --- a/block/partitions/ldm.c
> +++ b/block/partitions/ldm.c
> @@ -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 <ldm@flatcap.org>
> diff --git a/block/partitions/ldm.h b/block/partitions/ldm.h
> index d8d6beaa72c4..ffdecf1c6bb3 100644
> --- a/block/partitions/ldm.h
> +++ b/block/partitions/ldm.h
> @@ -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 <ldm@flatcap.org>
> 


-- 
~Randy

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-17 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 20:52 [PATCH] block: fix comment syntax in file headers Aditya Srivastava
2021-03-17 21:25 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).