linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] HID: uclogic: kernel-doc fixes for uclogic_params_* functions
@ 2022-05-28  9:14 Bagas Sanjaya
  2022-05-28  9:14 ` [PATCH 1/2] HID: uclogic: remove extraneous asterisk on uclogic_params_* static functions comments Bagas Sanjaya
  2022-05-28  9:14 ` [PATCH 2/2] HID: uclogic: add missing function name in uclogic_params_hid_dbg() kernel-doc comment Bagas Sanjaya
  0 siblings, 2 replies; 4+ messages in thread
From: Bagas Sanjaya @ 2022-05-28  9:14 UTC (permalink / raw)
  To: linux-doc
  Cc: Bagas Sanjaya, Nikolai Kondrashov, Jiri Kosina,
	Benjamin Tissoires, José Expósito, llvm, linux-input,
	linux-kernel

Running kernel-doc script on drivers/hid/hid-uclogic-params.c found
these 6 warnings below:

drivers/hid/hid-uclogic-params.c:48: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Dump tablet interface pen parameters with hid_dbg(), indented with one tab.
drivers/hid/hid-uclogic-params.c:48: warning: missing initial short description on line:
 * Dump tablet interface pen parameters with hid_dbg(), indented with one tab.
drivers/hid/hid-uclogic-params.c:48: info: Scanning doc for function Dump
drivers/hid/hid-uclogic-params.c:80: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Dump tablet interface frame parameters with hid_dbg(), indented with two
drivers/hid/hid-uclogic-params.c:80: warning: missing initial short description on line:
 * Dump tablet interface frame parameters with hid_dbg(), indented with two
drivers/hid/hid-uclogic-params.c:80: info: Scanning doc for function Dump
drivers/hid/hid-uclogic-params.c:105: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Dump tablet interface parameters with hid_dbg().
drivers/hid/hid-uclogic-params.c:105: warning: missing initial short description on line:
 * Dump tablet interface parameters with hid_dbg().

One of them is reported by kernel test robot at kernel test robot at
[1].

[1]: https://lore.kernel.org/linux-doc/202205272033.XFYlYj8k-lkp@intel.com/

Fix these warnings by remove extraneous asterisk on static function
comments on patch [1/2] and add missing function name for void function
on patch [2/2].

Cc: Nikolai Kondrashov <spbnick@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: "José Expósito" <jose.exposito89@gmail.com>
Cc: llvm@lists.linux.dev
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Bagas Sanjaya (2):
  HID: uclogic: remove extraneous asterisk on uclogic_params_* static
    functions comments
  HID: uclogic: add missing function name in uclogic_params_hid_dbg()
    kernel-doc comment

 drivers/hid/hid-uclogic-params.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


base-commit: bf272460d744112bacd4c4d562592decbf0edf64
-- 
An old man doll... just what I always wanted! - Clara


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

* [PATCH 1/2] HID: uclogic: remove extraneous asterisk on uclogic_params_* static functions comments
  2022-05-28  9:14 [PATCH 0/2] HID: uclogic: kernel-doc fixes for uclogic_params_* functions Bagas Sanjaya
@ 2022-05-28  9:14 ` Bagas Sanjaya
  2022-05-29 15:02   ` Jonathan Corbet
  2022-05-28  9:14 ` [PATCH 2/2] HID: uclogic: add missing function name in uclogic_params_hid_dbg() kernel-doc comment Bagas Sanjaya
  1 sibling, 1 reply; 4+ messages in thread
From: Bagas Sanjaya @ 2022-05-28  9:14 UTC (permalink / raw)
  To: linux-doc
  Cc: Bagas Sanjaya, kernel test robot, Nikolai Kondrashov,
	Jiri Kosina, Benjamin Tissoires, José Expósito, llvm,
	linux-input, linux-kernel

*uclogic_params_pen_inrange_to_str(), uclogic_params_pen_hid_dbg(), and
uclogic_params_frame_hid_dbg() are static functions but contain
double-asterisk (/** */) comment, which confuses kernel-doc as public
function for generating documentation.

Remove the extraneous asterisk from these comments.

Link: https://lore.kernel.org/linux-doc/202205272033.XFYlYj8k-lkp@intel.com/
Fixes: a228809fa6f39c ("HID: uclogic: Move param printing to a function")
Reported-by: kernel test robot <lkp@intel.com>
Cc: Nikolai Kondrashov <spbnick@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: "José Expósito" <jose.exposito89@gmail.com>
Cc: llvm@lists.linux.dev
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 drivers/hid/hid-uclogic-params.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index db838f16282d64..71501453de12e4 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -20,7 +20,7 @@
 #include <linux/ctype.h>
 #include <asm/unaligned.h>
 
-/**
+/*
  * uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
  *                                       to a string.
  *
@@ -44,7 +44,7 @@ static const char *uclogic_params_pen_inrange_to_str(
 	}
 }
 
-/**
+/*
  * Dump tablet interface pen parameters with hid_dbg(), indented with one tab.
  *
  * @hdev:	The HID device the pen parameters describe.
@@ -76,7 +76,7 @@ static void uclogic_params_pen_hid_dbg(const struct hid_device *hdev,
 		(pen->tilt_y_flipped ? "true" : "false"));
 }
 
-/**
+/*
  * Dump tablet interface frame parameters with hid_dbg(), indented with two
  * tabs.
  *
-- 
An old man doll... just what I always wanted! - Clara


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

* [PATCH 2/2] HID: uclogic: add missing function name in uclogic_params_hid_dbg() kernel-doc comment
  2022-05-28  9:14 [PATCH 0/2] HID: uclogic: kernel-doc fixes for uclogic_params_* functions Bagas Sanjaya
  2022-05-28  9:14 ` [PATCH 1/2] HID: uclogic: remove extraneous asterisk on uclogic_params_* static functions comments Bagas Sanjaya
@ 2022-05-28  9:14 ` Bagas Sanjaya
  1 sibling, 0 replies; 4+ messages in thread
From: Bagas Sanjaya @ 2022-05-28  9:14 UTC (permalink / raw)
  To: linux-doc
  Cc: Bagas Sanjaya, Nikolai Kondrashov, Jiri Kosina,
	Benjamin Tissoires, José Expósito, llvm, linux-input,
	linux-kernel

uclogic_params_hid_dbg() is public void function. The comment for
kernel-doc, however, lack its function name on short description, thus
triggers "missing initial short description" warning.

Add the function name to fix the warning.

Fixes: a228809fa6f39c ("HID: uclogic: Move param printing to a function")
Cc: Nikolai Kondrashov <spbnick@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: "José Expósito" <jose.exposito89@gmail.com>
Cc: llvm@lists.linux.dev
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 drivers/hid/hid-uclogic-params.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index 71501453de12e4..0319e3f1527f1d 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -102,7 +102,7 @@ static void uclogic_params_frame_hid_dbg(
 }
 
 /**
- * Dump tablet interface parameters with hid_dbg().
+ * uclogic_params_hid_dbg - Dump tablet interface parameters with hid_dbg().
  *
  * @hdev:	The HID device the parameters describe.
  * @params:	The parameters to dump.
-- 
An old man doll... just what I always wanted! - Clara


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

* Re: [PATCH 1/2] HID: uclogic: remove extraneous asterisk on uclogic_params_* static functions comments
  2022-05-28  9:14 ` [PATCH 1/2] HID: uclogic: remove extraneous asterisk on uclogic_params_* static functions comments Bagas Sanjaya
@ 2022-05-29 15:02   ` Jonathan Corbet
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2022-05-29 15:02 UTC (permalink / raw)
  To: Bagas Sanjaya, linux-doc
  Cc: Bagas Sanjaya, kernel test robot, Nikolai Kondrashov,
	Jiri Kosina, Benjamin Tissoires, José Expósito, llvm,
	linux-input, linux-kernel

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> *uclogic_params_pen_inrange_to_str(), uclogic_params_pen_hid_dbg(), and
> uclogic_params_frame_hid_dbg() are static functions but contain
> double-asterisk (/** */) comment, which confuses kernel-doc as public
> function for generating documentation.
>
> Remove the extraneous asterisk from these comments.

So there is nothing wrong with making kerneldoc comments for static
functions, that is not where the problem lies.

> Link: https://lore.kernel.org/linux-doc/202205272033.XFYlYj8k-lkp@intel.com/
> Fixes: a228809fa6f39c ("HID: uclogic: Move param printing to a function")
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Nikolai Kondrashov <spbnick@gmail.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: "José Expósito" <jose.exposito89@gmail.com>
> Cc: llvm@lists.linux.dev
> Cc: linux-input@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  drivers/hid/hid-uclogic-params.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
> index db838f16282d64..71501453de12e4 100644
> --- a/drivers/hid/hid-uclogic-params.c
> +++ b/drivers/hid/hid-uclogic-params.c
> @@ -20,7 +20,7 @@
>  #include <linux/ctype.h>
>  #include <asm/unaligned.h>
>  
> -/**
> +/*
>   * uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
>   *                                       to a string.
>   *

A more likely problem here is the blank between the function intro and
the parameter description.

> @@ -44,7 +44,7 @@ static const char *uclogic_params_pen_inrange_to_str(
>  	}
>  }
>  
> -/**
> +/*
>   * Dump tablet interface pen parameters with hid_dbg(), indented with one tab.
>   *

Here too

>   * @hdev:	The HID device the pen parameters describe.
> @@ -76,7 +76,7 @@ static void uclogic_params_pen_hid_dbg(const struct hid_device *hdev,
>  		(pen->tilt_y_flipped ? "true" : "false"));
>  }
>  
> -/**
> +/*
>   * Dump tablet interface frame parameters with hid_dbg(), indented with two
>   * tabs.
>   *

Here, instead, this needs to be formatted as a proper kerneldoc comment
with the function name.

jon

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

end of thread, other threads:[~2022-05-29 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-28  9:14 [PATCH 0/2] HID: uclogic: kernel-doc fixes for uclogic_params_* functions Bagas Sanjaya
2022-05-28  9:14 ` [PATCH 1/2] HID: uclogic: remove extraneous asterisk on uclogic_params_* static functions comments Bagas Sanjaya
2022-05-29 15:02   ` Jonathan Corbet
2022-05-28  9:14 ` [PATCH 2/2] HID: uclogic: add missing function name in uclogic_params_hid_dbg() kernel-doc comment Bagas Sanjaya

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