* [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers
@ 2022-05-31 9:28 Bagas Sanjaya
2022-05-31 15:52 ` Randy Dunlap
0 siblings, 1 reply; 6+ messages in thread
From: Bagas Sanjaya @ 2022-05-31 9:28 UTC (permalink / raw)
To: linux-doc
Cc: Bagas Sanjaya, kernel test robot, Nikolai Kondrashov,
Jiri Kosina, Benjamin Tissoires, José Expósito, llvm,
stable, linux-input, linux-kernel
Running kernel-doc script on drivers/hid/hid-uclogic-params.c, it found
6 warnings for hid_dbg() wrapper functions 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.
Fix these warnings by properly format kernel-doc comment for these
functions.
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: stable@vger.kernel.org # v5.18
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
Changes since v1 [1]:
- Approach the warning by fixing kernel-doc comments formatting
(suggested by Jonathan Corbet)
[1]: https://lore.kernel.org/linux-doc/20220528091403.160169-1-bagasdotme@gmail.com/
drivers/hid/hid-uclogic-params.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index db838f16282d64..647bbd3e000e2f 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -23,11 +23,11 @@
/**
* uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
* to a string.
- *
* @inrange: The in-range reporting type to convert.
*
- * Returns:
- * The string representing the type, or NULL if the type is unknown.
+ * Return:
+ * * The string representing the type, or
+ * * NULL if the type is unknown.
*/
static const char *uclogic_params_pen_inrange_to_str(
enum uclogic_params_pen_inrange inrange)
@@ -45,10 +45,12 @@ static const char *uclogic_params_pen_inrange_to_str(
}
/**
- * Dump tablet interface pen parameters with hid_dbg(), indented with one tab.
- *
+ * uclogic_params_pen_hid_dbg() - Dump tablet interface pen parameters
* @hdev: The HID device the pen parameters describe.
* @pen: The pen parameters to dump.
+ *
+ * Dump tablet interface pen parameters with hid_dbg(). The dump is indented
+ * with a tab.
*/
static void uclogic_params_pen_hid_dbg(const struct hid_device *hdev,
const struct uclogic_params_pen *pen)
@@ -77,11 +79,12 @@ static void uclogic_params_pen_hid_dbg(const struct hid_device *hdev,
}
/**
- * Dump tablet interface frame parameters with hid_dbg(), indented with two
- * tabs.
- *
+ * uclogic_params_frame_hid_dbg() - Dump tablet interface frame parameters
* @hdev: The HID device the pen parameters describe.
* @frame: The frame parameters to dump.
+ *
+ * Dump tablet interface frame parameters with hid_dbg(). The dump is
+ * indented with two tabs.
*/
static void uclogic_params_frame_hid_dbg(
const struct hid_device *hdev,
@@ -102,10 +105,11 @@ static void uclogic_params_frame_hid_dbg(
}
/**
- * Dump tablet interface parameters with hid_dbg().
- *
+ * uclogic_params_hid_dbg() - Dump tablet interface parameters
* @hdev: The HID device the parameters describe.
* @params: The parameters to dump.
+ *
+ * Dump tablet interface parameters with hid_dbg().
*/
void uclogic_params_hid_dbg(const struct hid_device *hdev,
const struct uclogic_params *params)
base-commit: 8ab2afa23bd197df47819a87f0265c0ac95c5b6a
--
An old man doll... just what I always wanted! - Clara
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers
2022-05-31 9:28 [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers Bagas Sanjaya
@ 2022-05-31 15:52 ` Randy Dunlap
2022-06-01 7:27 ` Bagas Sanjaya
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2022-05-31 15:52 UTC (permalink / raw)
To: Bagas Sanjaya, linux-doc
Cc: kernel test robot, Nikolai Kondrashov, Jiri Kosina,
Benjamin Tissoires, José Expósito, llvm, stable,
linux-input, linux-kernel
On 5/31/22 02:28, Bagas Sanjaya wrote:
> Running kernel-doc script on drivers/hid/hid-uclogic-params.c, it found
> 6 warnings for hid_dbg() wrapper functions 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.
>
> Fix these warnings by properly format kernel-doc comment for these
> functions.
>
> 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: stable@vger.kernel.org # v5.18
> Cc: linux-input@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
> Changes since v1 [1]:
> - Approach the warning by fixing kernel-doc comments formatting
> (suggested by Jonathan Corbet)
>
> [1]: https://lore.kernel.org/linux-doc/20220528091403.160169-1-bagasdotme@gmail.com/
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
One note (nit) below:
> drivers/hid/hid-uclogic-params.c | 24 ++++++++++++++----------
> 1 file changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
> index db838f16282d64..647bbd3e000e2f 100644
> --- a/drivers/hid/hid-uclogic-params.c
> +++ b/drivers/hid/hid-uclogic-params.c
> @@ -23,11 +23,11 @@
> /**
> * uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
> * to a string.
> - *
> * @inrange: The in-range reporting type to convert.
> *
> - * Returns:
> - * The string representing the type, or NULL if the type is unknown.
> + * Return:
> + * * The string representing the type, or
> + * * NULL if the type is unknown.
%NULL
would be better here, but not required.
> */
> static const char *uclogic_params_pen_inrange_to_str(
> enum uclogic_params_pen_inrange inrange)
Thanks.
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers
2022-05-31 15:52 ` Randy Dunlap
@ 2022-06-01 7:27 ` Bagas Sanjaya
2022-06-01 12:18 ` Randy Dunlap
0 siblings, 1 reply; 6+ messages in thread
From: Bagas Sanjaya @ 2022-06-01 7:27 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-doc, kernel test robot, Nikolai Kondrashov, Jiri Kosina,
Benjamin Tissoires, José Expósito, llvm, stable,
linux-input, linux-kernel
> One note (nit) below:
>
> > drivers/hid/hid-uclogic-params.c | 24 ++++++++++++++----------
> > 1 file changed, 14 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
> > index db838f16282d64..647bbd3e000e2f 100644
> > --- a/drivers/hid/hid-uclogic-params.c
> > +++ b/drivers/hid/hid-uclogic-params.c
> > @@ -23,11 +23,11 @@
> > /**
> > * uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
> > * to a string.
> > - *
> > * @inrange: The in-range reporting type to convert.
> > *
> > - * Returns:
> > - * The string representing the type, or NULL if the type is unknown.
> > + * Return:
> > + * * The string representing the type, or
> > + * * NULL if the type is unknown.
>
> %NULL
> would be better here, but not required.
>
Hi Randy,
I don't see %NULL in Documentation/ (I git-grep-ed it but none found).
What should I do when I have to explain NULL in Return: section of
kernel-doc comment?
--
An old man doll... just what I always wanted! - Clara
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers
2022-06-01 7:27 ` Bagas Sanjaya
@ 2022-06-01 12:18 ` Randy Dunlap
2022-06-01 18:00 ` José Expósito
2022-06-02 8:25 ` Bagas Sanjaya
0 siblings, 2 replies; 6+ messages in thread
From: Randy Dunlap @ 2022-06-01 12:18 UTC (permalink / raw)
To: Bagas Sanjaya
Cc: linux-doc, kernel test robot, Nikolai Kondrashov, Jiri Kosina,
Benjamin Tissoires, José Expósito, llvm, stable,
linux-input, linux-kernel
On 6/1/22 00:27, Bagas Sanjaya wrote:
>> One note (nit) below:
>>
>>> drivers/hid/hid-uclogic-params.c | 24 ++++++++++++++----------
>>> 1 file changed, 14 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
>>> index db838f16282d64..647bbd3e000e2f 100644
>>> --- a/drivers/hid/hid-uclogic-params.c
>>> +++ b/drivers/hid/hid-uclogic-params.c
>>> @@ -23,11 +23,11 @@
>>> /**
>>> * uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
>>> * to a string.
>>> - *
>>> * @inrange: The in-range reporting type to convert.
>>> *
>>> - * Returns:
>>> - * The string representing the type, or NULL if the type is unknown.
>>> + * Return:
>>> + * * The string representing the type, or
>>> + * * NULL if the type is unknown.
>>
>> %NULL
>> would be better here, but not required.
>>
>
> Hi Randy,
>
> I don't see %NULL in Documentation/ (I git-grep-ed it but none found).
> What should I do when I have to explain NULL in Return: section of
> kernel-doc comment?
In Documentation/doc-guide/kernel-doc.rst, section Highlights and cross-references:
``%CONST``
Name of a constant. (No cross-referencing, just formatting.)
So '%' before a constant value just helps with the generated formatting
of the output. It's just "prettier." No big deal.
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers
2022-06-01 12:18 ` Randy Dunlap
@ 2022-06-01 18:00 ` José Expósito
2022-06-02 8:25 ` Bagas Sanjaya
1 sibling, 0 replies; 6+ messages in thread
From: José Expósito @ 2022-06-01 18:00 UTC (permalink / raw)
To: Randy Dunlap
Cc: Bagas Sanjaya, linux-doc, kernel test robot, Nikolai Kondrashov,
Jiri Kosina, Benjamin Tissoires, llvm, stable, linux-input,
linux-kernel
> On 6/1/22 00:27, Bagas Sanjaya wrote:
> Running kernel-doc script on drivers/hid/hid-uclogic-params.c, it found
> 6 warnings for hid_dbg() wrapper functions below:
> [...]
Hi Bagas,
Thanks a lot for fixing these warnings. I compiled it and I can
confirm that the sparse warning is also fixed.
Tested-by: José Expósito <jose.exposito89@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers
2022-06-01 12:18 ` Randy Dunlap
2022-06-01 18:00 ` José Expósito
@ 2022-06-02 8:25 ` Bagas Sanjaya
1 sibling, 0 replies; 6+ messages in thread
From: Bagas Sanjaya @ 2022-06-02 8:25 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-doc, kernel test robot, Nikolai Kondrashov, Jiri Kosina,
Benjamin Tissoires, José Expósito, llvm, stable,
linux-input, linux-kernel
On Wed, Jun 01, 2022 at 05:18:52AM -0700, Randy Dunlap wrote:
> In Documentation/doc-guide/kernel-doc.rst, section Highlights and cross-references:
>
> ``%CONST``
> Name of a constant. (No cross-referencing, just formatting.)
>
> So '%' before a constant value just helps with the generated formatting
> of the output. It's just "prettier." No big deal.
>
Thanks for suggestion!
--
An old man doll... just what I always wanted! - Clara
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-02 8:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 9:28 [PATCH v2] HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappers Bagas Sanjaya
2022-05-31 15:52 ` Randy Dunlap
2022-06-01 7:27 ` Bagas Sanjaya
2022-06-01 12:18 ` Randy Dunlap
2022-06-01 18:00 ` José Expósito
2022-06-02 8:25 ` 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).