diff mbox series

[02/28] docs: networking: convert 6lowpan.txt to ReST

Message ID bfa773f25584a3939e0a3e1fc6bc0e91f415cd91.1581002063.git.mchehab+huawei@kernel.org (mailing list archive)
State New, archived
Headers show
Series Manually convert network text files to ReST (part 1) | expand

Commit Message

Mauro Carvalho Chehab Feb. 6, 2020, 3:17 p.m. UTC
- add SPDX header;
- use document title markup;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 .../networking/{6lowpan.txt => 6lowpan.rst}   | 29 ++++++++++---------
 Documentation/networking/index.rst            |  1 +
 2 files changed, 17 insertions(+), 13 deletions(-)
 rename Documentation/networking/{6lowpan.txt => 6lowpan.rst} (64%)

Comments

Stefan Schmidt Feb. 28, 2020, 8:46 a.m. UTC | #1
Hello.

On 06.02.20 16:17, Mauro Carvalho Chehab wrote:
> - add SPDX header;
> - use document title markup;
> - mark code blocks and literals as such;
> - adjust identation, whitespaces and blank lines;
> - add to networking/index.rst.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>   .../networking/{6lowpan.txt => 6lowpan.rst}   | 29 ++++++++++---------
>   Documentation/networking/index.rst            |  1 +
>   2 files changed, 17 insertions(+), 13 deletions(-)
>   rename Documentation/networking/{6lowpan.txt => 6lowpan.rst} (64%)
> 
> diff --git a/Documentation/networking/6lowpan.txt b/Documentation/networking/6lowpan.rst
> similarity index 64%
> rename from Documentation/networking/6lowpan.txt
> rename to Documentation/networking/6lowpan.rst
> index 2e5a939d7e6f..e70a6520cc33 100644
> --- a/Documentation/networking/6lowpan.txt
> +++ b/Documentation/networking/6lowpan.rst
> @@ -1,37 +1,40 @@
> +.. SPDX-License-Identifier: GPL-2.0
>   
> -Netdev private dataroom for 6lowpan interfaces:
> +==============================================
> +Netdev private dataroom for 6lowpan interfaces
> +==============================================
>   
>   All 6lowpan able net devices, means all interfaces with ARPHRD_6LOWPAN,
>   must have "struct lowpan_priv" placed at beginning of netdev_priv.
>   
> -The priv_size of each interface should be calculate by:
> +The priv_size of each interface should be calculate by::
>   
>    dev->priv_size = LOWPAN_PRIV_SIZE(LL_6LOWPAN_PRIV_DATA);
>   
>   Where LL_PRIV_6LOWPAN_DATA is sizeof linklayer 6lowpan private data struct.
> -To access the LL_PRIV_6LOWPAN_DATA structure you can cast:
> +To access the LL_PRIV_6LOWPAN_DATA structure you can cast::
>   
>    lowpan_priv(dev)-priv;
>   
>   to your LL_6LOWPAN_PRIV_DATA structure.
>   
> -Before registering the lowpan netdev interface you must run:
> +Before registering the lowpan netdev interface you must run::
>   
>    lowpan_netdev_setup(dev, LOWPAN_LLTYPE_FOOBAR);
>   
>   wheres LOWPAN_LLTYPE_FOOBAR is a define for your 6LoWPAN linklayer type of
>   enum lowpan_lltypes.
>   
> -Example to evaluate the private usually you can do:
> +Example to evaluate the private usually you can do::
>   
> -static inline struct lowpan_priv_foobar *
> -lowpan_foobar_priv(struct net_device *dev)
> -{
> + static inline struct lowpan_priv_foobar *
> + lowpan_foobar_priv(struct net_device *dev)
> + {
>   	return (struct lowpan_priv_foobar *)lowpan_priv(dev)->priv;
> -}
> + }
>   
> -switch (dev->type) {
> -case ARPHRD_6LOWPAN:
> + switch (dev->type) {
> + case ARPHRD_6LOWPAN:
>   	lowpan_priv = lowpan_priv(dev);
>   	/* do great stuff which is ARPHRD_6LOWPAN related */
>   	switch (lowpan_priv->lltype) {
> @@ -42,8 +45,8 @@ case ARPHRD_6LOWPAN:
>   	...
>   	}
>   	break;
> -...
> -}
> + ...
> + }
>   
>   In case of generic 6lowpan branch ("net/6lowpan") you can remove the check
>   on ARPHRD_6LOWPAN, because you can be sure that these function are called
> diff --git a/Documentation/networking/index.rst b/Documentation/networking/index.rst
> index 3ccb89bf5585..cc34c06477eb 100644
> --- a/Documentation/networking/index.rst
> +++ b/Documentation/networking/index.rst
> @@ -34,6 +34,7 @@ Contents:
>      tls
>      tls-offload
>      nfc
> +   6lowpan
>   
>   .. only::  subproject and html
>   
> 

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>

regards
Stefan Schmidt
Marcel Holtmann Feb. 28, 2020, 1:53 p.m. UTC | #2
Hi Mauro,

> - add SPDX header;
> - use document title markup;
> - mark code blocks and literals as such;
> - adjust identation, whitespaces and blank lines;
> - add to networking/index.rst.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> .../networking/{6lowpan.txt => 6lowpan.rst}   | 29 ++++++++++---------
> Documentation/networking/index.rst            |  1 +
> 2 files changed, 17 insertions(+), 13 deletions(-)
> rename Documentation/networking/{6lowpan.txt => 6lowpan.rst} (64%)

patch has been applied to bluetooth-next tree.

Regards

Marcel
diff mbox series

Patch

diff --git a/Documentation/networking/6lowpan.txt b/Documentation/networking/6lowpan.rst
similarity index 64%
rename from Documentation/networking/6lowpan.txt
rename to Documentation/networking/6lowpan.rst
index 2e5a939d7e6f..e70a6520cc33 100644
--- a/Documentation/networking/6lowpan.txt
+++ b/Documentation/networking/6lowpan.rst
@@ -1,37 +1,40 @@ 
+.. SPDX-License-Identifier: GPL-2.0
 
-Netdev private dataroom for 6lowpan interfaces:
+==============================================
+Netdev private dataroom for 6lowpan interfaces
+==============================================
 
 All 6lowpan able net devices, means all interfaces with ARPHRD_6LOWPAN,
 must have "struct lowpan_priv" placed at beginning of netdev_priv.
 
-The priv_size of each interface should be calculate by:
+The priv_size of each interface should be calculate by::
 
  dev->priv_size = LOWPAN_PRIV_SIZE(LL_6LOWPAN_PRIV_DATA);
 
 Where LL_PRIV_6LOWPAN_DATA is sizeof linklayer 6lowpan private data struct.
-To access the LL_PRIV_6LOWPAN_DATA structure you can cast:
+To access the LL_PRIV_6LOWPAN_DATA structure you can cast::
 
  lowpan_priv(dev)-priv;
 
 to your LL_6LOWPAN_PRIV_DATA structure.
 
-Before registering the lowpan netdev interface you must run:
+Before registering the lowpan netdev interface you must run::
 
  lowpan_netdev_setup(dev, LOWPAN_LLTYPE_FOOBAR);
 
 wheres LOWPAN_LLTYPE_FOOBAR is a define for your 6LoWPAN linklayer type of
 enum lowpan_lltypes.
 
-Example to evaluate the private usually you can do:
+Example to evaluate the private usually you can do::
 
-static inline struct lowpan_priv_foobar *
-lowpan_foobar_priv(struct net_device *dev)
-{
+ static inline struct lowpan_priv_foobar *
+ lowpan_foobar_priv(struct net_device *dev)
+ {
 	return (struct lowpan_priv_foobar *)lowpan_priv(dev)->priv;
-}
+ }
 
-switch (dev->type) {
-case ARPHRD_6LOWPAN:
+ switch (dev->type) {
+ case ARPHRD_6LOWPAN:
 	lowpan_priv = lowpan_priv(dev);
 	/* do great stuff which is ARPHRD_6LOWPAN related */
 	switch (lowpan_priv->lltype) {
@@ -42,8 +45,8 @@  case ARPHRD_6LOWPAN:
 	...
 	}
 	break;
-...
-}
+ ...
+ }
 
 In case of generic 6lowpan branch ("net/6lowpan") you can remove the check
 on ARPHRD_6LOWPAN, because you can be sure that these function are called
diff --git a/Documentation/networking/index.rst b/Documentation/networking/index.rst
index 3ccb89bf5585..cc34c06477eb 100644
--- a/Documentation/networking/index.rst
+++ b/Documentation/networking/index.rst
@@ -34,6 +34,7 @@  Contents:
    tls
    tls-offload
    nfc
+   6lowpan
 
 .. only::  subproject and html