Skip to contentSkip to conversation

Added usb_string function to a namespace

PATCH Applied Kevin Paul Reddy Janagari 3 participants 3 messages Apr 5, 2025 – Apr 14, 2025 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Added usb_string function to a namespace

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

---
 Documentation/driver-api/usb/usb.rst | 1 +
 1 file changed, 1 insertion(+)
Documentation/driver-api/usb/usb.rst +1 -0
index 89f9c37bb979..976fb4221062 100644
@@ -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:
 
Signature · 1 line
2.39.5
#1 lore raw

Hi,

Quoted 7 lines · Kevin Paul Reddy Janagari

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]:

Quoted 10 lines

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/[email protected]/

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

Quoted 20 lines
---
 Documentation/driver-api/usb/usb.rst | 1 +
 1 file changed, 1 insertion(+)
Documentation/driver-api/usb/usb.rst +1 -0
index 89f9c37bb979..976fb4221062 100644
@@ -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:
 
Signature · 1 line
2.39.5
maintainer Applied
#2 lore raw
In reply to Kevin Paul Reddy Janagari
Quoted 18 lines · Kevin Paul Reddy Janagari

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

---
 Documentation/driver-api/usb/usb.rst | 1 +
 1 file changed, 1 insertion(+)
Documentation/driver-api/usb/usb.rst +0 -0
index 89f9c37bb979..976fb4221062 100644

Documentation/driver-api/usb/usb.rst rely on 64bit DMA to eliminate another kind of bounce buffer. · line 166

Quoted 6 lines
Documentation/driver-api/usb/usb.rst +1 -0
@@ -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