linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib: fix incorrect kernel-doc comment syntax in file
@ 2021-03-29 12:10 Aditya Srivastava
  2021-03-29 17:07 ` Randy Dunlap
  2021-03-29 19:12 ` Miguel Ojeda
  0 siblings, 2 replies; 3+ messages in thread
From: Aditya Srivastava @ 2021-03-29 12:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: yashsri421, lukas.bulwahn, linux-kernel-mentees, linux-doc,
	rdunlap, gustavoars, ojeda

The opening comment mark '/**' is used for highlighting the beginning of
kernel-doc comments.
There are certain files in lib and lib/zstd, 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 lib/zstd/compress.c at
header causes these warnings by kernel-doc:
"warning: cannot understand function prototype: 'const U32 g_searchStrength = 8;  '"

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 <yashsri421@gmail.com>
---
* Applies perfectly on next-20210326

 lib/win_minmax.c         | 2 +-
 lib/zstd/compress.c      | 2 +-
 lib/zstd/decompress.c    | 2 +-
 lib/zstd/error_private.h | 2 +-
 lib/zstd/mem.h           | 2 +-
 lib/zstd/zstd_common.c   | 2 +-
 lib/zstd/zstd_internal.h | 2 +-
 lib/zstd/zstd_opt.h      | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/win_minmax.c b/lib/win_minmax.c
index 6bdc1cd15f76..ec10506834b6 100644
--- a/lib/win_minmax.c
+++ b/lib/win_minmax.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * lib/minmax.c: windowed min/max tracker
  *
  * Kathleen Nichols' algorithm for tracking the minimum (or maximum)
diff --git a/lib/zstd/compress.c b/lib/zstd/compress.c
index b080264ed3ad..42604785c4f2 100644
--- a/lib/zstd/compress.c
+++ b/lib/zstd/compress.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
  * All rights reserved.
  *
diff --git a/lib/zstd/decompress.c b/lib/zstd/decompress.c
index 66cd487a326a..b28f10f21a6c 100644
--- a/lib/zstd/decompress.c
+++ b/lib/zstd/decompress.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
  * All rights reserved.
  *
diff --git a/lib/zstd/error_private.h b/lib/zstd/error_private.h
index 1a60b31f706c..f7dfa4a18f27 100644
--- a/lib/zstd/error_private.h
+++ b/lib/zstd/error_private.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
  * All rights reserved.
  *
diff --git a/lib/zstd/mem.h b/lib/zstd/mem.h
index 93d7a2c377fe..97d92eb431a5 100644
--- a/lib/zstd/mem.h
+++ b/lib/zstd/mem.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
  * All rights reserved.
  *
diff --git a/lib/zstd/zstd_common.c b/lib/zstd/zstd_common.c
index a282624ee155..ebf848c1f348 100644
--- a/lib/zstd/zstd_common.c
+++ b/lib/zstd/zstd_common.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
  * All rights reserved.
  *
diff --git a/lib/zstd/zstd_internal.h b/lib/zstd/zstd_internal.h
index dac753397f86..5f02411bded1 100644
--- a/lib/zstd/zstd_internal.h
+++ b/lib/zstd/zstd_internal.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
  * All rights reserved.
  *
diff --git a/lib/zstd/zstd_opt.h b/lib/zstd/zstd_opt.h
index 55e1b4cba808..b4a02b9f76d8 100644
--- a/lib/zstd/zstd_opt.h
+++ b/lib/zstd/zstd_opt.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016-present, Przemyslaw Skibinski, Yann Collet, Facebook, Inc.
  * All rights reserved.
  *
-- 
2.17.1


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

* Re: [PATCH] lib: fix incorrect kernel-doc comment syntax in file
  2021-03-29 12:10 [PATCH] lib: fix incorrect kernel-doc comment syntax in file Aditya Srivastava
@ 2021-03-29 17:07 ` Randy Dunlap
  2021-03-29 19:12 ` Miguel Ojeda
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-03-29 17:07 UTC (permalink / raw)
  To: Aditya Srivastava, linux-kernel
  Cc: lukas.bulwahn, linux-kernel-mentees, linux-doc, gustavoars, ojeda

On 3/29/21 5:10 AM, Aditya Srivastava wrote:
> The opening comment mark '/**' is used for highlighting the beginning of
> kernel-doc comments.
> There are certain files in lib and lib/zstd, 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 lib/zstd/compress.c at
> header causes these warnings by kernel-doc:
> "warning: cannot understand function prototype: 'const U32 g_searchStrength = 8;  '"
> 
> 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 <yashsri421@gmail.com>

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

Thanks.

> ---
> * Applies perfectly on next-20210326
> 
>  lib/win_minmax.c         | 2 +-
>  lib/zstd/compress.c      | 2 +-
>  lib/zstd/decompress.c    | 2 +-
>  lib/zstd/error_private.h | 2 +-
>  lib/zstd/mem.h           | 2 +-
>  lib/zstd/zstd_common.c   | 2 +-
>  lib/zstd/zstd_internal.h | 2 +-
>  lib/zstd/zstd_opt.h      | 2 +-
>  8 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/win_minmax.c b/lib/win_minmax.c
> index 6bdc1cd15f76..ec10506834b6 100644
> --- a/lib/win_minmax.c
> +++ b/lib/win_minmax.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0
> -/**
> +/*
>   * lib/minmax.c: windowed min/max tracker
>   *
>   * Kathleen Nichols' algorithm for tracking the minimum (or maximum)
> diff --git a/lib/zstd/compress.c b/lib/zstd/compress.c
> index b080264ed3ad..42604785c4f2 100644
> --- a/lib/zstd/compress.c
> +++ b/lib/zstd/compress.c
> @@ -1,4 +1,4 @@
> -/**
> +/*
>   * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
>   * All rights reserved.
>   *
> diff --git a/lib/zstd/decompress.c b/lib/zstd/decompress.c
> index 66cd487a326a..b28f10f21a6c 100644
> --- a/lib/zstd/decompress.c
> +++ b/lib/zstd/decompress.c
> @@ -1,4 +1,4 @@
> -/**
> +/*
>   * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
>   * All rights reserved.
>   *
> diff --git a/lib/zstd/error_private.h b/lib/zstd/error_private.h
> index 1a60b31f706c..f7dfa4a18f27 100644
> --- a/lib/zstd/error_private.h
> +++ b/lib/zstd/error_private.h
> @@ -1,4 +1,4 @@
> -/**
> +/*
>   * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
>   * All rights reserved.
>   *
> diff --git a/lib/zstd/mem.h b/lib/zstd/mem.h
> index 93d7a2c377fe..97d92eb431a5 100644
> --- a/lib/zstd/mem.h
> +++ b/lib/zstd/mem.h
> @@ -1,4 +1,4 @@
> -/**
> +/*
>   * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
>   * All rights reserved.
>   *
> diff --git a/lib/zstd/zstd_common.c b/lib/zstd/zstd_common.c
> index a282624ee155..ebf848c1f348 100644
> --- a/lib/zstd/zstd_common.c
> +++ b/lib/zstd/zstd_common.c
> @@ -1,4 +1,4 @@
> -/**
> +/*
>   * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
>   * All rights reserved.
>   *
> diff --git a/lib/zstd/zstd_internal.h b/lib/zstd/zstd_internal.h
> index dac753397f86..5f02411bded1 100644
> --- a/lib/zstd/zstd_internal.h
> +++ b/lib/zstd/zstd_internal.h
> @@ -1,4 +1,4 @@
> -/**
> +/*
>   * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
>   * All rights reserved.
>   *
> diff --git a/lib/zstd/zstd_opt.h b/lib/zstd/zstd_opt.h
> index 55e1b4cba808..b4a02b9f76d8 100644
> --- a/lib/zstd/zstd_opt.h
> +++ b/lib/zstd/zstd_opt.h
> @@ -1,4 +1,4 @@
> -/**
> +/*
>   * Copyright (c) 2016-present, Przemyslaw Skibinski, Yann Collet, Facebook, Inc.
>   * All rights reserved.
>   *
> 


-- 
~Randy


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

* Re: [PATCH] lib: fix incorrect kernel-doc comment syntax in file
  2021-03-29 12:10 [PATCH] lib: fix incorrect kernel-doc comment syntax in file Aditya Srivastava
  2021-03-29 17:07 ` Randy Dunlap
@ 2021-03-29 19:12 ` Miguel Ojeda
  1 sibling, 0 replies; 3+ messages in thread
From: Miguel Ojeda @ 2021-03-29 19:12 UTC (permalink / raw)
  To: Aditya Srivastava
  Cc: linux-kernel, Lukas Bulwahn, linux-kernel-mentees,
	Linux Doc Mailing List, Randy Dunlap, Gustavo A . R . Silva,
	Miguel Ojeda

On Mon, Mar 29, 2021 at 2:11 PM Aditya Srivastava <yashsri421@gmail.com> wrote:
>
> Provide a simple fix by replacing such occurrences with general comment
> format, i.e. '/*', to prevent kernel-doc from parsing it.

I assumed these come from the original sources and were not adapted,
but they aren't there, at least in the current version in GitHub.

    Acked-by: Miguel Ojeda <ojeda@kernel.org>

Cheers,
Miguel

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

end of thread, other threads:[~2021-03-29 19:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 12:10 [PATCH] lib: fix incorrect kernel-doc comment syntax in file Aditya Srivastava
2021-03-29 17:07 ` Randy Dunlap
2021-03-29 19:12 ` Miguel Ojeda

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).