linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: workqueue: Inline WQ_* flag pattern
@ 2024-04-18  7:21 Bagas Sanjaya
  2024-04-18  8:23 ` Akira Yokosawa
  0 siblings, 1 reply; 3+ messages in thread
From: Bagas Sanjaya @ 2024-04-18  7:21 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Linux Documentation
  Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker, Tetsuo Handa,
	Kent Overstreet, Naohiro Aota, Bagas Sanjaya

Sphinx reports htmldocs warning:

Documentation/core-api/workqueue:776: ./include/linux/workqueue.h:493: WARNING: Inline literal start-string without end-string.

The warning is caused by unescaped wildcard in the pattern that matches
all workqueue flags (WQ_*). The pattern is rendered as normal text
(with surrounding double backticks due to @argument syntax usage)
instead of inline text like in individual flag names as a result.

Inline the pattern to fix the warning.

Fixes: 5797b1c18919 ("workqueue: Implement system-wide nr_active enforcement for unbound workqueues")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 include/linux/workqueue.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 158784dd189ab2..c9fec74e130459 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -463,7 +463,7 @@ void workqueue_softirq_dead(unsigned int cpu);
 /**
  * alloc_workqueue - allocate a workqueue
  * @fmt: printf format for the name of the workqueue
- * @flags: WQ_* flags
+ * @flags: ``WQ_*`` flags
  * @max_active: max in-flight work items, 0 for default
  * remaining args: args for @fmt
  *
@@ -490,7 +490,7 @@ void workqueue_softirq_dead(unsigned int cpu);
  * min_active which is set to min(@max_active, %WQ_DFL_MIN_ACTIVE). This means
  * that the sum of per-node max_active's may be larger than @max_active.
  *
- * For detailed information on %WQ_* flags, please refer to
+ * For detailed information on ``WQ_*`` flags, please refer to
  * Documentation/core-api/workqueue.rst.
  *
  * RETURNS:

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


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

* Re: [PATCH] Documentation: workqueue: Inline WQ_* flag pattern
  2024-04-18  7:21 [PATCH] Documentation: workqueue: Inline WQ_* flag pattern Bagas Sanjaya
@ 2024-04-18  8:23 ` Akira Yokosawa
  2024-04-18 13:11   ` Bagas Sanjaya
  0 siblings, 1 reply; 3+ messages in thread
From: Akira Yokosawa @ 2024-04-18  8:23 UTC (permalink / raw)
  To: bagasdotme
  Cc: Naohiro.Aota, frederic, jiangshanlai, kent.overstreet, linux-doc,
	linux-kernel, penguin-kernel, tj, Jonathan Corbet,
	Akira Yokosawa

[+Cc: Jon]

On Thu, 18 Apr 2024 14:21:01 +0700, Bagas Sanjaya wrote:
> Sphinx reports htmldocs warning:
> 
> Documentation/core-api/workqueue:776: ./include/linux/workqueue.h:493: WARNING: Inline literal start-string without end-string.
> 
> The warning is caused by unescaped wildcard in the pattern that matches
> all workqueue flags (WQ_*). The pattern is rendered as normal text
> (with surrounding double backticks due to @argument syntax usage)
> instead of inline text like in individual flag names as a result.
> 
> Inline the pattern to fix the warning.
> 
> Fixes: 5797b1c18919 ("workqueue: Implement system-wide nr_active enforcement for unbound workqueues")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  include/linux/workqueue.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
> index 158784dd189ab2..c9fec74e130459 100644
> --- a/include/linux/workqueue.h
> +++ b/include/linux/workqueue.h
> @@ -463,7 +463,7 @@ void workqueue_softirq_dead(unsigned int cpu);
>  /**
>   * alloc_workqueue - allocate a workqueue
>   * @fmt: printf format for the name of the workqueue
> - * @flags: WQ_* flags
> + * @flags: ``WQ_*`` flags
>   * @max_active: max in-flight work items, 0 for default
>   * remaining args: args for @fmt
>   *
> @@ -490,7 +490,7 @@ void workqueue_softirq_dead(unsigned int cpu);
>   * min_active which is set to min(@max_active, %WQ_DFL_MIN_ACTIVE). This means
>   * that the sum of per-node max_active's may be larger than @max_active.
>   *
> - * For detailed information on %WQ_* flags, please refer to
> + * For detailed information on ``WQ_*`` flags, please refer to
>   * Documentation/core-api/workqueue.rst.
>   *
>   * RETURNS:

In my opinion, reST-specific clutters like these should be avoided in
kernel-doc comments as far as possible.

Instead, I think you can educate kernel-doc (script) so that "*" is
allowed in the %CONSTANT pattern, meaning %WQ_* can be converted
to ``WQ_*`` in reST.

For similar changes made against the @param pattern, see commits
69fc23efc7e5 ("kernel-doc: Add unary operator * to $type_param_ref")
and 8aaf297a0dd6 ("docs: scripts: kernel-doc: accept bitwise negation
like ~@var").

I guess it is $type_constant2 that needs a tweak in this case.

HTH,
Akira



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

* Re: [PATCH] Documentation: workqueue: Inline WQ_* flag pattern
  2024-04-18  8:23 ` Akira Yokosawa
@ 2024-04-18 13:11   ` Bagas Sanjaya
  0 siblings, 0 replies; 3+ messages in thread
From: Bagas Sanjaya @ 2024-04-18 13:11 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: Naohiro.Aota, frederic, jiangshanlai, kent.overstreet, linux-doc,
	linux-kernel, penguin-kernel, tj, Jonathan Corbet

On 4/18/24 15:23, Akira Yokosawa wrote:
> [+Cc: Jon]
> 
> On Thu, 18 Apr 2024 14:21:01 +0700, Bagas Sanjaya wrote:
>> - * For detailed information on %WQ_* flags, please refer to
>> + * For detailed information on ``WQ_*`` flags, please refer to
>>   * Documentation/core-api/workqueue.rst.
>>   *
>>   * RETURNS:
> 
> In my opinion, reST-specific clutters like these should be avoided in
> kernel-doc comments as far as possible.
> 
> Instead, I think you can educate kernel-doc (script) so that "*" is
> allowed in the %CONSTANT pattern, meaning %WQ_* can be converted
> to ``WQ_*`` in reST.
> 
> For similar changes made against the @param pattern, see commits
> 69fc23efc7e5 ("kernel-doc: Add unary operator * to $type_param_ref")
> and 8aaf297a0dd6 ("docs: scripts: kernel-doc: accept bitwise negation
> like ~@var").
> 

Thanks for the idea!

-- 
An old man doll... just what I always wanted! - Clara


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

end of thread, other threads:[~2024-04-18 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  7:21 [PATCH] Documentation: workqueue: Inline WQ_* flag pattern Bagas Sanjaya
2024-04-18  8:23 ` Akira Yokosawa
2024-04-18 13:11   ` 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).