diff mbox series

[net-next,v2] docs: ctucanfd: Use 'kernel-figure' directive instead of 'figure'

Message ID 5986752a-1c2a-5d64-f91d-58b1e6decd17@gmail.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] docs: ctucanfd: Use 'kernel-figure' directive instead of 'figure' | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 3 maintainers not CCed: edumazet@google.com corbet@lwn.net pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Akira Yokosawa May 10, 2022, 11:45 p.m. UTC
Two issues were observed in the ReST doc added by commit c3a0addefbde
("docs: ctucanfd: CTU CAN FD open-source IP core documentation.")
with Sphinx versions 2.4.4 and 4.5.0.

The plain "figure" directive broke "make pdfdocs" due to a missing
PDF figure.  For conversion of SVG -> PDF to work, the "kernel-figure"
directive, which is an extension for kernel documentation, should
be used instead.

The directive of "code:: raw" causes a warning from both
"make htmldocs" and "make pdfdocs", which reads:

    [...]/can/ctu/ctucanfd-driver.rst:75: WARNING: Pygments lexer name
    'raw' is not known

A plain literal-block marker should suffice where no syntax
highlighting is intended.

Fix the issues by using suitable directive and marker.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Fixes: c3a0addefbde ("docs: ctucanfd: CTU CAN FD open-source IP core documentation.")
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Cc: Martin Jerabek <martin.jerabek01@gmail.com>
Cc: Ondrej Ille <ondrej.ille@gmail.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
---
Changes in v1 -> v2
 - no change in diff
 - added explicit Sphinx versions the issues were observed
 - picked Pavel's Acked-by

--
 .../networking/device_drivers/can/ctu/ctucanfd-driver.rst     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Akira Yokosawa May 16, 2022, 11:24 a.m. UTC | #1
On Wed, 11 May 2022 08:45:43 +0900, Akira Yokosawa wrote:
> Two issues were observed in the ReST doc added by commit c3a0addefbde
> ("docs: ctucanfd: CTU CAN FD open-source IP core documentation.")
> with Sphinx versions 2.4.4 and 4.5.0.
> 
> The plain "figure" directive broke "make pdfdocs" due to a missing
> PDF figure.  For conversion of SVG -> PDF to work, the "kernel-figure"
> directive, which is an extension for kernel documentation, should
> be used instead.
> 
> The directive of "code:: raw" causes a warning from both
> "make htmldocs" and "make pdfdocs", which reads:
> 
>     [...]/can/ctu/ctucanfd-driver.rst:75: WARNING: Pygments lexer name
>     'raw' is not known
> 
> A plain literal-block marker should suffice where no syntax
> highlighting is intended.
> 
> Fix the issues by using suitable directive and marker.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> Fixes: c3a0addefbde ("docs: ctucanfd: CTU CAN FD open-source IP core documentation.")
> Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
> Cc: Martin Jerabek <martin.jerabek01@gmail.com>
> Cc: Ondrej Ille <ondrej.ille@gmail.com>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> Changes in v1 -> v2
>  - no change in diff
>  - added explicit Sphinx versions the issues were observed
>  - picked Pavel's Acked-by
> 
Gentle ping to netdev maintainers.

I believe this one should go upstream together with the
offending commit.

If there is something I can do better, please let me know.

        Thanks, Akira

> --
>  .../networking/device_drivers/can/ctu/ctucanfd-driver.rst     | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst b/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst
> index 2fde5551e756..40c92ea272af 100644
> --- a/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst
> +++ b/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst
> @@ -72,7 +72,7 @@ it is reachable (on which bus it resides) and its configuration –
>  registers address, interrupts and so on. An example of such a device
>  tree is given in .
>  
> -.. code:: raw
> +::
>  
>             / {
>                 /* ... */
> @@ -451,7 +451,7 @@ the FIFO is maintained, together with priority rotation, is depicted in
>  
>  |
>  
> -.. figure:: fsm_txt_buffer_user.svg
> +.. kernel-figure:: fsm_txt_buffer_user.svg
>  
>     TX Buffer states with possible transitions
>
Pavel Pisa May 16, 2022, 7:31 p.m. UTC | #2
Dear Akira,

On Monday 16 of May 2022 13:24:49 Akira Yokosawa wrote:
> On Wed, 11 May 2022 08:45:43 +0900, Akira Yokosawa wrote:
> > Two issues were observed in the ReST doc added by commit c3a0addefbde
> > ("docs: ctucanfd: CTU CAN FD open-source IP core documentation.")
> > with Sphinx versions 2.4.4 and 4.5.0.
> >
> > The plain "figure" directive broke "make pdfdocs" due to a missing
> > PDF figure.  For conversion of SVG -> PDF to work, the "kernel-figure"
> > directive, which is an extension for kernel documentation, should
> > be used instead.
> >
> > The directive of "code:: raw" causes a warning from both
> > "make htmldocs" and "make pdfdocs", which reads:
> >
> >     [...]/can/ctu/ctucanfd-driver.rst:75: WARNING: Pygments lexer name
> >     'raw' is not known
> >
> > A plain literal-block marker should suffice where no syntax
> > highlighting is intended.
> >
> > Fix the issues by using suitable directive and marker.
> >
> > Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> > Fixes: c3a0addefbde ("docs: ctucanfd: CTU CAN FD open-source IP core
> > documentation.") Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
> > Cc: Martin Jerabek <martin.jerabek01@gmail.com>
> > Cc: Ondrej Ille <ondrej.ille@gmail.com>
> > Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> > ---
> > Changes in v1 -> v2
> >  - no change in diff
> >  - added explicit Sphinx versions the issues were observed
> >  - picked Pavel's Acked-by
>
> Gentle ping to netdev maintainers.
>
> I believe this one should go upstream together with the
> offending commit.

I think that the patch is on the right route thanks
to Marc Kleine-Budde already, it is in the linux-can-next
testing

https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/commit/?h=testing&id=f898bbb9c92e33dcbe7ee29b8861b707c2cd509e

I hope that it would reach net-next after next
linux-can-next merge.

Best wishes,

                Pavel
diff mbox series

Patch

diff --git a/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst b/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst
index 2fde5551e756..40c92ea272af 100644
--- a/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst
+++ b/Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst
@@ -72,7 +72,7 @@  it is reachable (on which bus it resides) and its configuration –
 registers address, interrupts and so on. An example of such a device
 tree is given in .
 
-.. code:: raw
+::
 
            / {
                /* ... */
@@ -451,7 +451,7 @@  the FIFO is maintained, together with priority rotation, is depicted in
 
 |
 
-.. figure:: fsm_txt_buffer_user.svg
+.. kernel-figure:: fsm_txt_buffer_user.svg
 
    TX Buffer states with possible transitions