Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A99FFC169C4 for ; Wed, 6 Feb 2019 17:46:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 79370218C3 for ; Wed, 6 Feb 2019 17:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729690AbfBFRqE (ORCPT ); Wed, 6 Feb 2019 12:46:04 -0500 Received: from mga11.intel.com ([192.55.52.93]:30322 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbfBFRqD (ORCPT ); Wed, 6 Feb 2019 12:46:03 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2019 09:46:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,340,1544515200"; d="scan'208";a="122470253" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga008.fm.intel.com with ESMTP; 06 Feb 2019 09:46:03 -0800 Received: from orsmsx114.amr.corp.intel.com (10.22.240.10) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 6 Feb 2019 09:46:03 -0800 Received: from orsmsx103.amr.corp.intel.com ([169.254.5.210]) by ORSMSX114.amr.corp.intel.com ([169.254.8.248]) with mapi id 14.03.0415.000; Wed, 6 Feb 2019 09:46:02 -0800 From: "Gix, Brian" To: "linux-bluetooth@vger.kernel.org" , "Stotland, Inga" CC: "luiz.dentz@gmail.com" , "johan.hedberg@gmail.com" Subject: Re: [PATCH BlueZ 1/5] mesh: Separate functions for net key add and update Thread-Topic: [PATCH BlueZ 1/5] mesh: Separate functions for net key add and update Thread-Index: AQHUve4EBD0YaahL70uk8hHCIC0bqaXTkeQA Date: Wed, 6 Feb 2019 17:46:02 +0000 Message-ID: <1549475160.20217.6.camel@intel.com> References: <20190206073115.28232-1-inga.stotland@intel.com> <20190206073115.28232-2-inga.stotland@intel.com> In-Reply-To: <20190206073115.28232-2-inga.stotland@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.54.166] Content-Type: text/plain; charset="utf-8" Content-ID: <32EC8E916C498C49BFBF4607E4BF6F05@intel.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org SGkgSW5nYSwNCg0KT25lIGFkanVzdG1lbnQgbmVlZGVkIGhlcmUuLi4NCg0KT24gVHVlLCAyMDE5 LTAyLTA1IGF0IDIzOjMxIC0wODAwLCBJbmdhIFN0b3RsYW5kIHdyb3RlOg0KPiBUaGlzIHNwbGl0 cyBtZXNoX25ldF9rZXlfYWRkKCkgaW50byB0d28gc2VwYXJhdGUgZnVuY3Rpb25zOg0KPiBtZXNo X25ldF9rZXlfYWRkKCkgYW5kIG1lc2hfbmV0X2tleV91cGRhdGUoKS4NCj4gbWVzaF9uZXRfa2V5 X3VwZGF0ZSgpIGVzc2VudGlhbGx5IHJlcGxhY2VzIG1lc2hfbmV0X2tyX3BoYXNlX29uZSgpDQo+ IHNpbmNlIHN3aXRjaGluZyB0byBLZXkgUmVmcmVzaCBwaGFzZSBvbmUgY2FuIG9ubHkgYmUgdHJp Z2dlcmVkDQo+IGJ5IHN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