Skip to contentSkip to conversation

Expose the bus kernel docs to the build docs.

PATCH Superseded Wren Turkal 3 participants 10 messages Mar 7, 2021 – Mar 15, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Expose the bus kernel docs to the build docs.

Before, the bus type related APIs that were defined in the include/linux/device/bus.h were not referenced anywhere in the docs, so I linked it to the bus types api documentation.

---
 Documentation/driver-api/driver-model/bus.rst | 2 ++
 1 file changed, 2 insertions(+)
Documentation/driver-api/driver-model/bus.rst +2 -0
index 016b15a6e8ea..4cd237ded827 100644
@@ -144,3 +144,5 @@ sysfs directory using::
 
 	int bus_create_file(struct bus_type *, struct bus_attribute *);
 	void bus_remove_file(struct bus_type *, struct bus_attribute *);
+
+.. kernel-doc:: include/linux/device/bus.h
Signature · 1 line
2.30.1
#1 lore raw
Quoted 3 lines · Wren Turkal

Before, the bus type related APIs that were defined in the include/linux/device/bus.h were not referenced anywhere in the docs, so I linked it to the bus types api documentation.

I think this is a good thing to do.

Documentation/driver-api/driver-model/bus.rst sysfs directory using:: · line 148

Quoted 7 lines

+++ b/Documentation/driver-api/driver-model/bus.rst

Documentation/driver-api/driver-model/bus.rst +2 -0
@@ -144,3 +144,5 @@ sysfs directory using::
 
 	int bus_create_file(struct bus_type *, struct bus_attribute *);
 	void bus_remove_file(struct bus_type *, struct bus_attribute *);
+
+.. kernel-doc:: include/linux/device/bus.h

Do you want to put a heading in front of it? I did this in xarray.rst:

Functions and structures
========================

.. kernel-doc:: include/linux/xarray.h
.. kernel-doc:: lib/xarray.c

Also, I see that drivers/base/bus.c is included in driver-api/infrastructure.rst, and I feel that they should probably be included together?

#2 lore raw

Thanks for the feedback. I will cut another patch in a sec.

Quoted 11 lines · Matthew Wilcox

Do you want to put a heading in front of it? I did this in xarray.rst:

Functions and structures
========================

.. kernel-doc:: include/linux/xarray.h
.. kernel-doc:: lib/xarray.c

Also, I see that drivers/base/bus.c is included in driver-api/infrastructure.rst, and I feel that they should probably be included together?

#3 lore raw

PATCH v2 1/1 Expose the bus kernel docs to the build docs.

In reply to Matthew Wilcox

Before, the bus type related APIs that were defined in the include/linux/device/bus.h were not referenced anywhere in the docs, so I linked it to the bus types api documentation.

---
 Documentation/driver-api/driver-model/bus.rst | 8 ++++++++
 Documentation/driver-api/infrastructure.rst   | 3 +--
 2 files changed, 9 insertions(+), 2 deletions(-)
Documentation/driver-api/driver-model/bus.rst +8 -0
index 016b15a6e8ea..6bed459b87cc 100644
@@ -1,3 +1,5 @@
+.. _bus_types:
+
 =========
 Bus Types
 =========
@@ -144,3 +146,9 @@ sysfs directory using::
 
 	int bus_create_file(struct bus_type *, struct bus_attribute *);
 	void bus_remove_file(struct bus_type *, struct bus_attribute *);
+
+Fucntions and Structures
+========================
+
+.. kernel-doc:: include/linux/device/bus.h
+.. kernel-doc:: drivers/base/bus.c
Documentation/driver-api/infrastructure.rst +1 -2
index 683bd460e222..eb2a2c9e3c0c 100644
@@ -41,8 +41,7 @@ Device Drivers Base
 .. kernel-doc:: drivers/base/platform.c
    :export:
 
-.. kernel-doc:: drivers/base/bus.c
-   :export:
+:ref:`bus_types`
 
 Device Drivers DMA Management
 -----------------------------
Signature · 1 line
2.30.1
#4 lore raw
Quoted 1 line · Wren Turkal

+Fucntions and Structures

Typo, but hold off on a v3 until someone weighs in with an opinion on the rest of the patch.

#5 lore raw
Quoted 6 lines · Matthew Wilcox
Quoted 1 line · Wren Turkal

+Fucntions and Structures

Typo, but hold off on a v3 until someone weighs in with an opinion on the rest of the patch.

Okay, I fixed the misspelling locally. Looking forward to addtional feedback.

Thanks,
wt

#6 lore raw

PATCH v3 1/1 Expose the bus kernel docs to the build docs.

In reply to Matthew Wilcox

Before, the bus type related APIs that were defined in the include/linux/device/bus.h were not referenced anywhere in the docs, so I linked it to the bus types api documentation.

---
 Documentation/driver-api/driver-model/bus.rst | 8 ++++++++
 Documentation/driver-api/infrastructure.rst   | 3 +--
 2 files changed, 9 insertions(+), 2 deletions(-)
Documentation/driver-api/driver-model/bus.rst +8 -0
index 016b15a6e8ea..c53b01e95fd9 100644
@@ -1,3 +1,5 @@
+.. _bus_types:
+
 =========
 Bus Types
 =========
@@ -144,3 +146,9 @@ sysfs directory using::
 
 	int bus_create_file(struct bus_type *, struct bus_attribute *);
 	void bus_remove_file(struct bus_type *, struct bus_attribute *);
+
+Functions and Structures
+========================
+
+.. kernel-doc:: include/linux/device/bus.h
+.. kernel-doc:: drivers/base/bus.c
Documentation/driver-api/infrastructure.rst +1 -2
index 683bd460e222..eb2a2c9e3c0c 100644
@@ -41,8 +41,7 @@ Device Drivers Base
 .. kernel-doc:: drivers/base/platform.c
    :export:
 
-.. kernel-doc:: drivers/base/bus.c
-   :export:
+:ref:`bus_types`
 
 Device Drivers DMA Management
 -----------------------------
Signature · 1 line
2.30.1
#7 lore raw

I have a really dumb question. Should I see this patch somewhere in patchwork? I can't find it on there.

Thanks,
wt

Signature · 1 line
You're more amazing than you think! ymatyt.com
#8 lore raw
In reply to Wren Turkal

Matthew,

I hate to bother you, but how do I know if this patch is acceptable or not. I am not sure how this is tracked.

Thanks,
wt

Quoted 45 lines · Wren Turkal

Before, the bus type related APIs that were defined in the include/linux/device/bus.h were not referenced anywhere in the docs, so I linked it to the bus types api documentation.

---
  Documentation/driver-api/driver-model/bus.rst | 8 ++++++++
  Documentation/driver-api/infrastructure.rst   | 3 +--
  2 files changed, 9 insertions(+), 2 deletions(-)
Documentation/driver-api/driver-model/bus.rst +8 -0
index 016b15a6e8ea..c53b01e95fd9 100644
@@ -1,3 +1,5 @@
+.. _bus_types:
+
  =========
  Bus Types
  =========
@@ -144,3 +146,9 @@ sysfs directory using::
 
  	int bus_create_file(struct bus_type *, struct bus_attribute *);
  	void bus_remove_file(struct bus_type *, struct bus_attribute *);
+
+Functions and Structures
+========================
+
+.. kernel-doc:: include/linux/device/bus.h
+.. kernel-doc:: drivers/base/bus.c
Documentation/driver-api/infrastructure.rst +1 -2
index 683bd460e222..eb2a2c9e3c0c 100644
@@ -41,8 +41,7 @@ Device Drivers Base
  .. kernel-doc:: drivers/base/platform.c
     :export:
 
-.. kernel-doc:: drivers/base/bus.c
-   :export:
+:ref:`bus_types`
 
  Device Drivers DMA Management
  -----------------------------
Signature · 1 line
You're more amazing than you think! ymatyt.com
maintainer
#9 lore raw
In reply to Wren Turkal
Quoted 3 lines · Wren Turkal

Before, the bus type related APIs that were defined in the include/linux/device/bus.h were not referenced anywhere in the docs, so I linked it to the bus types api documentation.

This should really be phrased in the imperative style as described in Documentation/process/submitting-patches.rst. I wouldn't ordinarily reject a patch just for that, but...

Quoted 31 lines
---
 Documentation/driver-api/driver-model/bus.rst | 8 ++++++++
 Documentation/driver-api/infrastructure.rst   | 3 +--
 2 files changed, 9 insertions(+), 2 deletions(-)
Documentation/driver-api/driver-model/bus.rst +8 -0
index 016b15a6e8ea..c53b01e95fd9 100644
@@ -1,3 +1,5 @@
+.. _bus_types:
+
 =========
 Bus Types
 =========
@@ -144,3 +146,9 @@ sysfs directory using::
 
 	int bus_create_file(struct bus_type *, struct bus_attribute *);
 	void bus_remove_file(struct bus_type *, struct bus_attribute *);
+
+Functions and Structures
+========================
+
+.. kernel-doc:: include/linux/device/bus.h
+.. kernel-doc:: drivers/base/bus.c
Documentation/driver-api/infrastructure.rst +0 -0
index 683bd460e222..eb2a2c9e3c0c 100644

Documentation/driver-api/infrastructure.rst Device Drivers Base · line 44

Quoted 6 lines
Documentation/driver-api/infrastructure.rst +1 -2
@@ -41,8 +41,7 @@ Device Drivers Base
 .. kernel-doc:: drivers/base/platform.c
    :export:
 
-.. kernel-doc:: drivers/base/bus.c
-   :export:
+:ref:`bus_types`

Rather than inserting labels and making explicit cross-references, it seems better to just let automarkup do the work for you. So instead of the above line, something like:

See also Documentation/driver-api/driver-model/bus.rst

Thanks,

jon