The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Added usb_string function to a namespace
@ 2025-04-05 16:51 Kevin Paul Reddy Janagari
  2025-04-06 11:08 ` Akira Yokosawa
  2025-04-14 16:38 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Paul Reddy Janagari @ 2025-04-05 16:51 UTC (permalink / raw)
  To: corbet, rdunlap, rbrasga, kevinpaul468, linux-doc, linux-kernel; +Cc: skhan

with reference to WARNING:
Duplicate C declaration, also defined at driver-api/usb/gadget:804
There is a function usb_string in the file message.c,
there is also a struct usb_string in the kernel api headers.
The docs is unable to index the function as the index is occupied by struct
This fix adds messgae.c to the usb_core namespace (in docs) hence providing
usb_sting a unique index usb_core.usb_string()

Signed-off-by: Kevin Paul Reddy Janagari <kevinpaul468@gmail.com>
---
 Documentation/driver-api/usb/usb.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/driver-api/usb/usb.rst b/Documentation/driver-api/usb/usb.rst
index 89f9c37bb979..976fb4221062 100644
--- a/Documentation/driver-api/usb/usb.rst
+++ b/Documentation/driver-api/usb/usb.rst
@@ -161,6 +161,7 @@ rely on 64bit DMA to eliminate another kind of bounce buffer.
 .. kernel-doc:: drivers/usb/core/urb.c
    :export:
 
+.. c:namespace:: usb_core
 .. kernel-doc:: drivers/usb/core/message.c
    :export:
 
-- 
2.39.5


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

* Re: [PATCH] Added usb_string function to a namespace
  2025-04-05 16:51 [PATCH] Added usb_string function to a namespace Kevin Paul Reddy Janagari
@ 2025-04-06 11:08 ` Akira Yokosawa
  2025-04-14 16:38 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Akira Yokosawa @ 2025-04-06 11:08 UTC (permalink / raw)
  To: kevinpaul468
  Cc: corbet, linux-doc, linux-kernel, rbrasga, rdunlap, skhan,
	Akira Yokosawa

Hi,

Kevin Paul Reddy Janagari wrote:
> with reference to WARNING:
> Duplicate C declaration, also defined at driver-api/usb/gadget:804
> There is a function usb_string in the file message.c,
> there is also a struct usb_string in the kernel api headers.
> The docs is unable to index the function as the index is occupied by struct
> This fix adds messgae.c to the usb_core namespace (in docs) hence providing
> usb_sting a unique index usb_core.usb_string()

This is a bug of Sphinx.
Quote of my message in July 2023 [1]:

 > This is a bug of Sphinx >=3.1, first reported by Mauro back in September 2020 at:
 >
 >     https://github.com/sphinx-doc/sphinx/issues/8241
 >
 > It was closed when a local fix was presented.  Unfortunately, it was not
 > merged at the time and a subsequent pull request was opened at:
 >
 >     https://github.com/sphinx-doc/sphinx/pull/8313
 >
 > It is not merged yet and carries a milestone of Sphinx 7.x.

[1]: https://lore.kernel.org/0475d177-4c01-0988-0b34-3099dd703498@gmail.com/

The PR carries a milestone of Sphinx 8.x now ...

It might be a high time to make some noise in the PR.

       Thanks, Akira

> 
> Signed-off-by: Kevin Paul Reddy Janagari <kevinpaul468@gmail.com>
> ---
>  Documentation/driver-api/usb/usb.rst | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/driver-api/usb/usb.rst b/Documentation/driver-api/usb/usb.rst
> index 89f9c37bb979..976fb4221062 100644
> --- a/Documentation/driver-api/usb/usb.rst
> +++ b/Documentation/driver-api/usb/usb.rst
> @@ -161,6 +161,7 @@ rely on 64bit DMA to eliminate another kind of bounce buffer.
>  .. kernel-doc:: drivers/usb/core/urb.c
>     :export:
>  
> +.. c:namespace:: usb_core
>  .. kernel-doc:: drivers/usb/core/message.c
>     :export:
>  
> -- 
> 2.39.5


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

* Re: [PATCH] Added usb_string function to a namespace
  2025-04-05 16:51 [PATCH] Added usb_string function to a namespace Kevin Paul Reddy Janagari
  2025-04-06 11:08 ` Akira Yokosawa
@ 2025-04-14 16:38 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2025-04-14 16:38 UTC (permalink / raw)
  To: Kevin Paul Reddy Janagari, rdunlap, rbrasga, kevinpaul468,
	linux-doc, linux-kernel
  Cc: skhan

Kevin Paul Reddy Janagari <kevinpaul468@gmail.com> writes:

> with reference to WARNING:
> Duplicate C declaration, also defined at driver-api/usb/gadget:804
> There is a function usb_string in the file message.c,
> there is also a struct usb_string in the kernel api headers.
> The docs is unable to index the function as the index is occupied by struct
> This fix adds messgae.c to the usb_core namespace (in docs) hence providing
> usb_sting a unique index usb_core.usb_string()
>
> Signed-off-by: Kevin Paul Reddy Janagari <kevinpaul468@gmail.com>
> ---
>  Documentation/driver-api/usb/usb.rst | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/driver-api/usb/usb.rst b/Documentation/driver-api/usb/usb.rst
> index 89f9c37bb979..976fb4221062 100644
> --- a/Documentation/driver-api/usb/usb.rst
> +++ b/Documentation/driver-api/usb/usb.rst
> @@ -161,6 +161,7 @@ rely on 64bit DMA to eliminate another kind of bounce buffer.
>  .. kernel-doc:: drivers/usb/core/urb.c
>     :export:
>  
> +.. c:namespace:: usb_core
>  .. kernel-doc:: drivers/usb/core/message.c
>     :export:

I hate this sort of workaround ... but so be it.  Someday maybe it won't
be needed...

Applied, thanks,

jon

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

end of thread, other threads:[~2025-04-14 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-05 16:51 [PATCH] Added usb_string function to a namespace Kevin Paul Reddy Janagari
2025-04-06 11:08 ` Akira Yokosawa
2025-04-14 16:38 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox