Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8919125ybi; Wed, 10 Jul 2019 01:37:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2gpOzp/enrzPIM7QFWwX26yW3ovFx1/mQ4xv0deYQuevYX4EYZ85qk4tYVDnUA23NfM3n X-Received: by 2002:a17:90a:a00d:: with SMTP id q13mr5492511pjp.80.1562747876640; Wed, 10 Jul 2019 01:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562747876; cv=none; d=google.com; s=arc-20160816; b=EO+8v5VGY+xGQLZAMJSC2/y9dW7qtHaj5fuJr+k8P7eQB1YK71Lm7uJYSNjaeWb+tB NYLIw2N2ZDQ9EGoy+deWwPRSwuSad1ogYtI/rMguP/CxVEvnVc5luIdrDi1DwEEoWqSP x8/xAET+S38aliKz/oqpQMyO+pEpUvmaLa4j3XicYZ4jjo7daryXvcTi2DUOdKpDDPPD ka0LHAX7pbaCVzpJ+PZmG7Bc/oaGi08mZJXe04EE9ks+XZBCz4yJh7j/eblOKF0DKzyd EoMyhVl7uMUuZL5uUWAdzzsihSPyCiMMjl8Zsqiuym++fA7pPSflD+yCjTv+QKqcgq4P H95w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fYB1rhP9twGtZy8aIGANkO2jvok8GoG9Tiq0ViOTJrk=; b=exJ9RNl+gm/z4TwnEs9t4FSzHynAAMwRpJbGFk/JPseg3BnJqLeP4xS7heqsWsIniV OAR4+oKZV8iuxGqVVBQGntoCoX3VvtonqxbJtrt3Vc+4AnY5m98TfeQN1qv/A+dj3CVj LVzsZDRu2OyuPP/aO7kcxN2ke40Rt8zbnUgqhCjaxxODmH68JTtSHECAYULy73QJtlRq aCK8dOVJi5QIrGF1BylssFuje3TkrqHo4yi3XcLbAr6FNKws2RhwUOk/1f8Ss7lVLF2i k2/aAPYl/Q2CAWmZhXWgNHuOKEeEA8FpBBA8+1lqtaoOqS23bU1haBqT5gzHsILuItAb UXxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=HRRkRTJ5; 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 a23si1508830pls.189.2019.07.10.01.37.28; Wed, 10 Jul 2019 01:37:56 -0700 (PDT) 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; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=HRRkRTJ5; 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 S1726162AbfGJI3w (ORCPT + 99 others); Wed, 10 Jul 2019 04:29:52 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42684 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbfGJI3v (ORCPT ); Wed, 10 Jul 2019 04:29:51 -0400 Received: by mail-lf1-f66.google.com with SMTP id s19so964280lfb.9 for ; Wed, 10 Jul 2019 01:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=fYB1rhP9twGtZy8aIGANkO2jvok8GoG9Tiq0ViOTJrk=; b=HRRkRTJ53K9LPUY2Vq5407nn7EFinD9E2NNLx5F31KliCEFW9E2nYubJ1PMCfWiDXq qKnJlV8PuxIcjF+Gh+5k+uhpg4IHUEgkynXe7JQHOa6tOggaA6TZ3zdGVHnKdmNYxy/l SYIwFejrm7fBMvS2rnpE2RmOHG4s5G8M6HiEWIV5+4tdX5jRxEIYzV+X6rycrrdOWU2k ROHMNrioYegXb6LIjA8tQVgMd1hQhuSS6r5O/0AV73RA9YTYrmksOYA5CFV/i0gcFQrI kE24hYqUxSB/uqcolGfaGMfeew3uDNl5oxkVNm8iiRfaW4BywJk5yIo+c0HHaVuNyWuP vUBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=fYB1rhP9twGtZy8aIGANkO2jvok8GoG9Tiq0ViOTJrk=; b=b2Zet4A25g4VUNnJgmQEoZK7zQQnvg/c6/dlUDHS7597qz1GWji/dIxQ3/mplHdCL3 3NcmSyN72Uw/mj054ytYOL1wsmfv+jj9/c86WM9l11CaqCc+WdSJYYio+hAFqrvbDVdH 3RytCz1iWjIUfaTE1GMXXYGjVd2H14Mqcd2K/klhlemS+WD/6fDYNc4ZfUt+NVQVPURP RL+coPxPoC7I7scwxR5Yeru80tB+6+S0Foa6+X/Yck/0d+nvU75d9Z4iWbsJE2vhiqIA 2PNU6otvUz1al8KjsoxVALqoJIWyDZ/AfR/NvA4icMHCo0Rgic39SuuajrWM3eUTfAL7 E7mw== X-Gm-Message-State: APjAAAVzkBCLCnpqJgLdq62SbDc/2zQ2ip/lb1qLpMTyRCl2Ezxr61Qj AKv5HdPue1XtKCpydY6JS59h4w== X-Received: by 2002:ac2:46ce:: with SMTP id p14mr14804177lfo.148.1562747388995; Wed, 10 Jul 2019 01:29:48 -0700 (PDT) Received: from mlowasrzechonek2133 ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id a9sm243767lfj.79.2019.07.10.01.29.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 01:29:48 -0700 (PDT) Date: Wed, 10 Jul 2019 10:29:45 +0200 From: =?utf-8?Q?Micha=C5=82?= Lowas-Rzechonek To: Inga Stotland Cc: linux-bluetooth@vger.kernel.org, brian.gix@intel.com, jakub.witowski@silvair.com Subject: Re: [PATCH BlueZ 5/9] mesh: Change variable prefix "jconfig" to "config" Message-ID: <20190710082945.t6jec7stdjkcylbk@mlowasrzechonek2133> Mail-Followup-To: Inga Stotland , linux-bluetooth@vger.kernel.org, brian.gix@intel.com, jakub.witowski@silvair.com References: <20190710050959.7321-1-inga.stotland@intel.com> <20190710050959.7321-6-inga.stotland@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190710050959.7321-6-inga.stotland@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Inga, On 07/09, Inga Stotland wrote: > This adjust variable naming by changing "jconfig" prefix to more generic > "config. This also removes #include json-c/json.h for model.c, > cfg-server.c and node.c as they no longer rely on the specifics of node > configuration storage implementation. > --- > mesh/cfgmod-server.c | 16 +++++++--------- > mesh/model.c | 1 - > mesh/node.c | 25 ++++++++++++------------- > mesh/node.h | 4 ++-- > mesh/storage.c | 34 +++++++++++++++++----------------- > 5 files changed, 38 insertions(+), 42 deletions(-) > > diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c > index 0479a9185..1aa7c85da 100644 > --- a/mesh/cfgmod-server.c > +++ b/mesh/cfgmod-server.c > @@ -24,8 +24,6 @@ > #include > #include > > -#include "json-c/json.h" > - > #include "mesh/mesh-defs.h" > #include "mesh/node.h" > #include "mesh/net.h" > @@ -197,7 +195,7 @@ static bool config_pub_set(struct mesh_node *node, uint16_t src, uint16_t dst, > > /* Remove model publication from config file */ > if (status == MESH_STATUS_SUCCESS) > - mesh_config_model_pub_del(node_jconfig_get(node), > + mesh_config_model_pub_del(node_config_get(node), > ele_addr, vendor ? mod_id : mod_id & 0x0000ffff, > vendor); > goto done; > @@ -219,7 +217,7 @@ static bool config_pub_set(struct mesh_node *node, uint16_t src, uint16_t dst, > memcpy(db_pub.virt_addr, pub_addr, 16); > > /* Save model publication to config file */ > - if (!mesh_config_model_pub_add(node_jconfig_get(node), ele_addr, > + if (!mesh_config_model_pub_add(node_config_get(node), ele_addr, > vendor ? mod_id : mod_id & 0x0000ffff, > vendor, &db_pub)) > status = MESH_STATUS_STORAGE_FAIL; > @@ -331,18 +329,18 @@ static bool save_config_sub(struct mesh_node *node, uint16_t ele_addr, > > if (opcode == OP_CONFIG_MODEL_SUB_VIRT_OVERWRITE || > opcode == OP_CONFIG_MODEL_SUB_OVERWRITE) > - mesh_config_model_sub_del_all(node_jconfig_get(node), > + mesh_config_model_sub_del_all(node_config_get(node), > ele_addr, vendor ? mod_id : mod_id & 0x0000ffff, > vendor); > > if (opcode != OP_CONFIG_MODEL_SUB_VIRT_DELETE && > opcode != OP_CONFIG_MODEL_SUB_DELETE) > - return mesh_config_model_sub_add(node_jconfig_get(node), > + return mesh_config_model_sub_add(node_config_get(node), > ele_addr, > vendor ? mod_id : mod_id & 0x0000ffff, > vendor, &db_sub); > else > - return mesh_config_model_sub_del(node_jconfig_get(node), > + return mesh_config_model_sub_del(node_config_get(node), > ele_addr, > vendor ? mod_id : mod_id & 0x0000ffff, > vendor, &db_sub); > @@ -419,7 +417,7 @@ static void config_sub_set(struct mesh_node *node, uint16_t src, uint16_t dst, > status = mesh_model_sub_del_all(node, ele_addr, mod_id); > > if (status == MESH_STATUS_SUCCESS) > - mesh_config_model_sub_del_all(node_jconfig_get(node), > + mesh_config_model_sub_del_all(node_config_get(node), > ele_addr, vendor ? mod_id : mod_id & 0x0000ffff, > vendor); > break; > @@ -878,7 +876,7 @@ static bool cfg_srv_pkt(uint16_t src, uint32_t dst, > > count = (pkt[0] >> 5) + 1; > interval = ((pkt[0] & 0x1f) + 1) * 10; > - if (storage_set_transmit_params(node_jconfig_get(node), count, > + if (storage_set_transmit_params(node_config_get(node), count, > interval)) Given the signature: bool storage_set_transmit_params(struct mesh_node *node, uint8_t count, uint8_t interval) shouldn't that be: if (storage_set_transmit_params(node, count, interval)) and in other places as well? -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND