Skip to contentSkip to conversation

docs: net: Convert netdev-FAQ to RST

PATCH Superseded Tobin C. Harding 3 participants 8 messages Jul 25, 2018

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover docs: net: Convert netdev-FAQ to RST

Jon,

Is it ok for this to go through Dave's tree? Patch one touches a line in Documentation/networking/index.rst Patch two depends on patch one so it needs to go through the same tree please.

Dave (and Jon),

Kernel docs are prefer restructured text (RST) format. In doing the conversion I tried a bunch of different ways to break it up to ease review. Nothing I tried worked since so many of the changes touch so many lines. In the end I did the whole conversion as a single patch and listed in the patch commit log each type of change that was made.

Also, with these conversions I'm finding it difficult to split the changes into separate patches and still keep the tree sane after each patch.

In an effort to catch mistakes I did the conversion over three days - there is only so many times you can read a docs file in one day without your eyes starting to bleed.

Any tips and/or suggestions on making this and future conversions easier to review much appreciated. If changes are not widespread it seems to be better to split the file rename into a separate patch then make the changes after that. (For this one it didn't help.)

thanks,
Tobin.

Tobin C. Harding (2):
docs: Add rest label the_canonical_path_format
docs: net: Convert netdev-FAQ to restructured text

 Documentation/networking/index.rst           |   1 +
 Documentation/networking/netdev-FAQ.rst      | 259 +++++++++++++++++++
 Documentation/networking/netdev-FAQ.txt      | 244 -----------------
 Documentation/process/submitting-patches.rst |   1 +
 4 files changed, 261 insertions(+), 244 deletions(-)
 create mode 100644 Documentation/networking/netdev-FAQ.rst
 delete mode 100644 Documentation/networking/netdev-FAQ.txt
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 docs: Add rest label the_canonical_path_format

In preparation to convert Documentation/network/netdev-FAQ.rst to restructured text format we would like to be able to reference 'the canonical patch format' section.

Add rest label: 'the_canonical_path_format'.

---
 Documentation/process/submitting-patches.rst | 1 +
 1 file changed, 1 insertion(+)
Documentation/process/submitting-patches.rst +1 -0
index 908bb55be407..c0917107b90a 100644
@@ -611,6 +611,7 @@ which stable kernel versions should receive your fix. This is the preferred
 method for indicating a bug fixed by the patch. See :ref:`describe_changes`
 for more details.
 
+.. _the_canonical_patch_format:
 
 14) The canonical patch format
 ------------------------------
Signature · 1 line
2.17.1
#4 lore raw

PATCH 2/2 docs: net: Convert netdev-FAQ to restructured text

In reply to Tobin C. Harding

Preferred kernel docs format is now restructured text. Convert netdev-FAQ.txt to restructured text.

- Add SPDX license identifier.

- Change file heading 'Information you need to know about netdev' to 'netdev FAQ' to better suit displayed index (in HTML).

- Change question/answer layout to suit rst. Copy format in Documentation/bpf/bpf_devel_QA.rst

- Fix indentation of code snippets

- If multiple consecutive URLs appear put them in a list (to maintain whitespace).

- Use uniform spelling of 'bug fix' throughout document (not bugfix or bug-fix).

- Add double back ticks to 'net' and 'net-next' when referring to the trees.

- Use rst references for Documentation/ links.

- Add rst label 'netdev-FAQ' for referencing by other docs files.

---
 Documentation/networking/index.rst      |   1 +
 Documentation/networking/netdev-FAQ.rst | 259 ++++++++++++++++++++++++
 Documentation/networking/netdev-FAQ.txt | 244 ----------------------
 3 files changed, 260 insertions(+), 244 deletions(-)
 create mode 100644 Documentation/networking/netdev-FAQ.rst
 delete mode 100644 Documentation/networking/netdev-FAQ.txt
Documentation/networking/index.rst +1 -0
index f0ae9b65dfba..884a26145f20 100644
@@ -6,6 +6,7 @@ Contents:
 .. toctree::
    :maxdepth: 2
 
+   netdev-FAQ
    af_xdp
    batman-adv
    can
Documentation/networking/netdev-FAQ.rst new file +259 -0

259 lines not on this page · raw message

Documentation/networking/netdev-FAQ.txt deleted +0 -244

244 lines not on this page · raw message

Signature · 1 line
2.17.1
#5 lore raw
In reply to Tobin C. Harding

On Wed, Jul 25, 2018 at 12:50:03PM +1000, Tobin C. Harding wrote:

Please drop this. I've forgotten to deal with the links from Documentation/*.rst to Documentation/networking/netdev-FAQ.txt

Since I've already botched it can I ask for guidance here. The problem is updating the links means making changes that will cause merge conflicts if they go through net-dev tree (since most references are in Documentation/*.rst). But we can't go through docs tree either since that could lead to merge conflicts later as well.

My idea was to leave netdev-FAQ.txt in place but with all content removed except

'This file has moved to netdev-FAQ.rst. This file will be removed once netdev RST conversion is complete'

And then do the same for each file conversion under Documentation/networking/. Once all the files are converted a single patch set updating all references into Documentation/networking/*.rst could be posted to the docs tree.

One other idea was to leave a symlink netdev-FAQ.txt -> netdev-FAQ.rst but I don't know how that would play with the build system (docs or otherwise).

thanks,
Tobin.

maintainer
#6 lore raw
Quoted 5 lines · On Wed, 25 Jul 2018 13:28:10 +1000 "Tobin C. Harding" <[email protected]> wrote:

Since I've already botched it can I ask for guidance here. The problem is updating the links means making changes that will cause merge conflicts if they go through net-dev tree (since most references are in Documentation/*.rst). But we can't go through docs tree either since that could lead to merge conflicts later as well.

Merge conflicts are a way of life in Documentation/ - everybody messes with it. They are usually pretty easy to resolve.

I only see a handful of references to netdev-FAQ.txt in the tree; I would suggest just making the change and being done with it. There shouldn't be any need to do a more complicated dance than that.

And to answer your other question, yes of course it's fine (and expected) for this to go through Dave's tree.

Thanks,

jon

#2 lore raw

Re: [PATCH net-next 1/2] docs: Add rest label the_canonical_path_format

In reply to Tobin C. Harding
Quoted 5 lines · Tobin C. Harding

In preparation to convert Documentation/network/netdev-FAQ.rst to restructured text format we would like to be able to reference 'the canonical patch format' section.

Add rest label: 'the_canonical_path_format'.

Here and in the Subject, 'patch' is typoed as 'path'.

#3 lore raw

Re: [PATCH net-next 1/2] docs: Add rest label the_canonical_path_format

Quoted 7 lines · Edward Cree
Quoted 5 lines · Tobin C. Harding

In preparation to convert Documentation/network/netdev-FAQ.rst to restructured text format we would like to be able to reference 'the canonical patch format' section.

Add rest label: 'the_canonical_path_format'.

Here and in the Subject, 'patch' is typoed as 'path'.

Thanks for the review Edward, will fix for next spin.

Tobin

#7 lore raw
In reply to Jonathan Corbet
Quoted 9 lines · Jonathan Corbet
Quoted 5 lines · On Wed, 25 Jul 2018 13:28:10 +1000 "Tobin C. Harding" <[email protected]> wrote:

Since I've already botched it can I ask for guidance here. The problem is updating the links means making changes that will cause merge conflicts if they go through net-dev tree (since most references are in Documentation/*.rst). But we can't go through docs tree either since that could lead to merge conflicts later as well.

Quoted 6 lines

Merge conflicts are a way of life in Documentation/ - everybody messes with it. They are usually pretty easy to resolve.

I only see a handful of references to netdev-FAQ.txt in the tree; I would suggest just making the change and being done with it. There shouldn't be any need to do a more complicated dance than that.

Ok, I'll re-spin with all references fixed.

Quoted 2 lines

And to answer your other question, yes of course it's fine (and expected) for this to go through Dave's tree.

And accept abuse for all merge conflicts in person at Plumbers in November :)

Thanks,
Tobin.