From: "Michał Lowas-Rzechonek" <michal.lowas-rzechonek@silvair.com>
To: Inga Stotland <inga.stotland@intel.com>
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"
Date: Wed, 10 Jul 2019 10:29:45 +0200 [thread overview]
Message-ID: <20190710082945.t6jec7stdjkcylbk@mlowasrzechonek2133> (raw)
In-Reply-To: <20190710050959.7321-6-inga.stotland@intel.com>
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 <sys/time.h>
> #include <ell/ell.h>
>
> -#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 <michal.lowas-rzechonek@silvair.com>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND
next prev parent reply other threads:[~2019-07-10 8:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 5:09 [PATCH BlueZ 0/9] mesh: Configuration storage re-org Inga Stotland
2019-07-10 5:09 ` [PATCH BlueZ 1/9] mesh: Move network config setup from storage.c to node.c Inga Stotland
2019-07-10 5:09 ` [PATCH BlueZ 2/9] mesh: Rename mesh-db.c to mesh-config-json.c Inga Stotland
2019-07-10 5:09 ` [PATCH BlueZ 3/9] mesh: Change mesh_db prefix to mesh_config Inga Stotland
2019-07-10 5:09 ` [PATCH BlueZ 4/9] mesh: Generalize mesh-config APIs Inga Stotland
2019-07-10 7:38 ` Michał Lowas-Rzechonek
2019-07-10 15:01 ` Michał Lowas-Rzechonek
2019-07-10 15:58 ` Stotland, Inga
2019-07-10 5:09 ` [PATCH BlueZ 5/9] mesh: Change variable prefix "jconfig" to "config" Inga Stotland
2019-07-10 8:29 ` Michał Lowas-Rzechonek [this message]
2019-07-10 5:09 ` [PATCH BlueZ 6/9] mesh: Define storage format specific read/write routines Inga Stotland
2019-07-10 7:52 ` Michał Lowas-Rzechonek
2019-07-10 16:53 ` Stotland, Inga
2019-07-10 17:00 ` michal.lowas-rzechonek
2019-07-10 17:20 ` Gix, Brian
2019-07-10 19:32 ` Michal Lowas-Rzechonek
2019-07-10 5:09 ` [PATCH BlueZ 7/9] mesh: Implement config read/write for mesh json format Inga Stotland
2019-07-10 5:09 ` [PATCH BlueZ 8/9] mesh: Switch to using mesh-config routines for storage Inga Stotland
2019-07-10 5:09 ` [PATCH BlueZ 9/9] mesh: Make storage.c json-c agnostic Inga Stotland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190710082945.t6jec7stdjkcylbk@mlowasrzechonek2133 \
--to=michal.lowas-rzechonek@silvair.com \
--cc=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=jakub.witowski@silvair.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox