Skip to contentSkip to conversation

Documentation fixes for dpll subsystem

PATCH Superseded Bagas Sanjaya 2 participants 6 messages Sep 18, 2023

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Documentation fixes for dpll subsystem

First of all, sorry for not reviewing dpll series [1] before it gets merged. I was prompted to post this doc fixup mini series because I was emailed by kernel test robot (see [1/2] for the warnings).

This fixup is all code block related.

[1]: https://lore.kernel.org/netdev/[email protected]/

Bagas Sanjaya (2):
Documentation: dpll: Fix code blocks
Documentation: dpll: wrap DPLL_CMD_PIN_GET output in a code block

 Documentation/driver-api/dpll.rst | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

base-commit: 8d6198a14e2bfb09f190055b387c90b4ac9b49a4

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

PATCH 1/2 Documentation: dpll: Fix code blocks

kernel test robot and Stephen Rothwell report htmldocs warnings:

Documentation/driver-api/dpll.rst:427: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 18 supplied.

.. code-block:: c

	<snipped>...

Documentation/driver-api/dpll.rst:444: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 21 supplied.

.. code-block:: c

	<snipped>...

Documentation/driver-api/dpll.rst:474: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 12 supplied.

.. code-block:: c

	<snipped>...

Fix these above by adding missing blank line separator after code-block directive.

---
 Documentation/driver-api/dpll.rst | 3 +++
 1 file changed, 3 insertions(+)
Documentation/driver-api/dpll.rst +3 -0
index bb52f1b8c0be31..01eb4de867036f 100644
@@ -425,6 +425,7 @@ The simplest implementation is in the OCP TimeCard driver. The ops
 structures are defined like this:
 
 .. code-block:: c
+
 	static const struct dpll_device_ops dpll_ops = {
 		.lock_status_get = ptp_ocp_dpll_lock_status_get,
 		.mode_get = ptp_ocp_dpll_mode_get,
@@ -442,6 +443,7 @@ structures are defined like this:
 The registration part is then looks like this part:
 
 .. code-block:: c
+
         clkid = pci_get_dsn(pdev);
         bp->dpll = dpll_device_get(clkid, 0, THIS_MODULE);
         if (IS_ERR(bp->dpll)) {
@@ -472,6 +474,7 @@ The registration part is then looks like this part:
 In the error path we have to rewind every allocation in the reverse order:
 
 .. code-block:: c
+
         while (i) {
                 --i;
                 dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]);
Signature · 1 line
An old man doll... just what I always wanted! - Clara
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] Documentation: dpll: Fix code blocks

Quoted 21 lines · Bagas Sanjaya

kernel test robot and Stephen Rothwell report htmldocs warnings:

Documentation/driver-api/dpll.rst:427: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 18 supplied.

.. code-block:: c

	<snipped>...

Documentation/driver-api/dpll.rst:444: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 21 supplied.

.. code-block:: c

	<snipped>...

Documentation/driver-api/dpll.rst:474: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 12 supplied.

.. code-block:: c

	<snipped>...

Fix these above by adding missing blank line separator after code-block directive.

Quoted 6 lines
Quoted 32 lines
---
  Documentation/driver-api/dpll.rst | 3 +++
  1 file changed, 3 insertions(+)
Documentation/driver-api/dpll.rst +3 -0
index bb52f1b8c0be31..01eb4de867036f 100644
@@ -425,6 +425,7 @@ The simplest implementation is in the OCP TimeCard driver. The ops
  structures are defined like this:
 
  .. code-block:: c
+
  	static const struct dpll_device_ops dpll_ops = {
  		.lock_status_get = ptp_ocp_dpll_lock_status_get,
  		.mode_get = ptp_ocp_dpll_mode_get,
@@ -442,6 +443,7 @@ structures are defined like this:
  The registration part is then looks like this part:
 
  .. code-block:: c
+
          clkid = pci_get_dsn(pdev);
          bp->dpll = dpll_device_get(clkid, 0, THIS_MODULE);
          if (IS_ERR(bp->dpll)) {
@@ -472,6 +474,7 @@ The registration part is then looks like this part:
  In the error path we have to rewind every allocation in the reverse order:
 
  .. code-block:: c
+
          while (i) {
                  --i;
                  dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]);
#3 lore raw

PATCH 2/2 Documentation: dpll: wrap DPLL_CMD_PIN_GET output in a code block

In reply to Bagas Sanjaya

DPLL_CMD_PIN_GET netlink command output for mux-type pins looks ugly with normal paragraph formatting. Format it as a code block instead.

---
 Documentation/driver-api/dpll.rst | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
Documentation/driver-api/dpll.rst +12 -12
index 01eb4de867036f..69670deb8c4e09 100644
@@ -119,19 +119,19 @@ with.
 If a pin was registered with multiple parent pins, they behave like a
 multiple output multiplexer. In this case output of a
 ``DPLL_CMD_PIN_GET`` would contain multiple pin-parent nested
-attributes with current state related to each parent, like:
+attributes with current state related to each parent, like::
 
-'pin': [{{
-  'clock-id': 282574471561216,
-  'module-name': 'ice',
-  'capabilities': 4,
-  'id': 13,
-  'parent-pin': [
-  {'parent-id': 2, 'state': 'connected'},
-  {'parent-id': 3, 'state': 'disconnected'}
-  ],
-  'type': 'synce-eth-port'
-  }}]
+        'pin': [{{
+          'clock-id': 282574471561216,
+          'module-name': 'ice',
+          'capabilities': 4,
+          'id': 13,
+          'parent-pin': [
+          {'parent-id': 2, 'state': 'connected'},
+          {'parent-id': 3, 'state': 'disconnected'}
+          ],
+          'type': 'synce-eth-port'
+          }}]
 
 Only one child pin can provide its signal to the parent MUX-type pin at
 a time, the selection is done by requesting change of a child pin state
Signature · 1 line
An old man doll... just what I always wanted! - Clara
maintainer Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] Documentation: dpll: wrap DPLL_CMD_PIN_GET output in a code block

Quoted 4 lines · Bagas Sanjaya

DPLL_CMD_PIN_GET netlink command output for mux-type pins looks ugly with normal paragraph formatting. Format it as a code block instead.

Quoted 40 lines
---
  Documentation/driver-api/dpll.rst | 24 ++++++++++++------------
  1 file changed, 12 insertions(+), 12 deletions(-)
Documentation/driver-api/dpll.rst +12 -12
index 01eb4de867036f..69670deb8c4e09 100644
@@ -119,19 +119,19 @@ with.
  If a pin was registered with multiple parent pins, they behave like a
  multiple output multiplexer. In this case output of a
  ``DPLL_CMD_PIN_GET`` would contain multiple pin-parent nested
-attributes with current state related to each parent, like:
+attributes with current state related to each parent, like::
 
-'pin': [{{
-  'clock-id': 282574471561216,
-  'module-name': 'ice',
-  'capabilities': 4,
-  'id': 13,
-  'parent-pin': [
-  {'parent-id': 2, 'state': 'connected'},
-  {'parent-id': 3, 'state': 'disconnected'}
-  ],
-  'type': 'synce-eth-port'
-  }}]
+        'pin': [{{
+          'clock-id': 282574471561216,
+          'module-name': 'ice',
+          'capabilities': 4,
+          'id': 13,
+          'parent-pin': [
+          {'parent-id': 2, 'state': 'connected'},
+          {'parent-id': 3, 'state': 'disconnected'}
+          ],
+          'type': 'synce-eth-port'
+          }}]
 
  Only one child pin can provide its signal to the parent MUX-type pin at
  a time, the selection is done by requesting change of a child pin state
maintainer
#5 lore raw
In reply to Bagas Sanjaya
Quoted 5 lines · Bagas Sanjaya

First of all, sorry for not reviewing dpll series [1] before it gets merged. I was prompted to post this doc fixup mini series because I was emailed by kernel test robot (see [1/2] for the warnings).

This fixup is all code block related.

Thanks for cleaning the documentation part.

Vadim