Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp442105ybf; Fri, 28 Feb 2020 00:52:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzwBVyThSL3OgV/IbVvxgyxrzLAAaK4Canjc3I9/G2jEFvy+iN/gvTkARGxeyZcFTzuvHTH X-Received: by 2002:a9d:76d6:: with SMTP id p22mr2488565otl.37.1582879969801; Fri, 28 Feb 2020 00:52:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582879969; cv=none; d=google.com; s=arc-20160816; b=iEZRB6Re0AZ8N3P7Q/yJ1pYqRIfr4n7WR1QnLbwAXzGyf0Jfoudq4hliY7o+rCHcK/ 1Azmxrct1Hb/UeUlG79ommdqbOBghYPZzhNjjYLY239F9oJenwSrRLXOjqlUiy1LGWkj nUvlQTmrjfyUm+GCoWhkaxm+MciKHwX16NCj0gvOFHseaE8KL5jGAMJ80UaRGDt1yZAU THBCKtf9dO3c67QIwQMdAvMUOVpmIFOMuLU50YN4MlJVjqZegO2mw4+fs4VlEgZ1kiKo APwNHTVeRa03FvG8E48SodNakS7MFFRLjXLaijzIg9W2AcIoA1ABQMu4zNcR1OsA089e 6BZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=0gZKNMFJ5LJSyvoqCDv2DPMODKd8mOcVPB2J5NUKo6s=; b=HY2WjqLOGOQDOiMQAuTdsWAOCyZjYsgDV3b/2rb/hZKEwJpPt5hgDGH937kl8LRfFD keibrvHXCQ+z3krm364IacNhF375ltkxSPTN/X3Nx/Q5d9nLvTP2qQd06sbGA74bDVOG i8bUD/fMrWT7pWl4X3diGoNl4lwrhqfuZYeIoB5xKHw4JWjv/2a8f5bL/lg26hpAx2n7 lTOLkNPR5Dc29ZDCb3ex5yPyt6vFvvpcu3dibppsbZeaLD4lwYHTxvPnkaLtM+IfbtJY OqvpBg9c0VYktX60QP2BpAvRPfWAvNs1quhd2N/pZBPZ0X/YRAf5/QfAIlsXJ3xDERnh 8w6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l139si1533783oih.233.2020.02.28.00.52.24; Fri, 28 Feb 2020 00:52:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726287AbgB1IwV (ORCPT + 99 others); Fri, 28 Feb 2020 03:52:21 -0500 Received: from proxima.lasnet.de ([78.47.171.185]:53174 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbgB1IwV (ORCPT ); Fri, 28 Feb 2020 03:52:21 -0500 X-Greylist: delayed 348 seconds by postgrey-1.27 at vger.kernel.org; Fri, 28 Feb 2020 03:52:19 EST Received: from localhost.localdomain (p200300E9D71B9939E2C0865DB6B8C4EC.dip0.t-ipconnect.de [IPv6:2003:e9:d71b:9939:e2c0:865d:b6b8:c4ec]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@datenfreihafen.org) by proxima.lasnet.de (Postfix) with ESMTPSA id 53688C3201; Fri, 28 Feb 2020 09:46:30 +0100 (CET) Subject: Re: [PATCH 02/28] docs: networking: convert 6lowpan.txt to ReST To: Mauro Carvalho Chehab , Linux Media Mailing List Cc: Mauro Carvalho Chehab , "David S. Miller" , Jakub Kicinski , Jonathan Corbet , Alexander Aring , Jukka Rissanen , netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org References: From: Stefan Schmidt Message-ID: Date: Fri, 28 Feb 2020 09:46:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 > --- > .../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 regards Stefan Schmidt