Skip to content

Commit 1d6f653

Browse files
llyespressif-bot
authored andcommitted
ble_mesh: stack: Remove some not used variables & functions
1 parent 7542c86 commit 1d6f653

File tree

4 files changed

+1
-62
lines changed

4 files changed

+1
-62
lines changed

components/bt/esp_ble_mesh/mesh_core/cfg_cli.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#include "mesh_common.h"
2121
#include "cfg_cli.h"
2222

23-
s32_t config_msg_timeout;
24-
25-
static bt_mesh_config_client_t *cli;
26-
2723
static const bt_mesh_client_op_pair_t cfg_op_pair[] = {
2824
{ OP_BEACON_GET, OP_BEACON_STATUS },
2925
{ OP_BEACON_SET, OP_BEACON_STATUS },
@@ -1383,16 +1379,6 @@ int bt_mesh_cfg_net_transmit_set(bt_mesh_client_common_param_t *param, u8_t tran
13831379
return send_msg_with_u8(param, OP_NET_TRANSMIT_SET, transmit);
13841380
}
13851381

1386-
s32_t bt_mesh_cfg_cli_timeout_get(void)
1387-
{
1388-
return config_msg_timeout;
1389-
}
1390-
1391-
void bt_mesh_cfg_cli_timeout_set(s32_t timeout)
1392-
{
1393-
config_msg_timeout = timeout;
1394-
}
1395-
13961382
int bt_mesh_cfg_cli_init(struct bt_mesh_model *model, bool primary)
13971383
{
13981384
config_internal_data_t *internal = NULL;
@@ -1433,8 +1419,6 @@ int bt_mesh_cfg_cli_init(struct bt_mesh_model *model, bool primary)
14331419
bt_mesh_client_clear_list(client->internal_data);
14341420
}
14351421

1436-
cli = client;
1437-
14381422
/* Configuration Model security is device-key based */
14391423
model->keys[0] = BLE_MESH_KEY_DEV;
14401424

@@ -1469,11 +1453,9 @@ int bt_mesh_cfg_cli_deinit(struct bt_mesh_model *model, bool primary)
14691453

14701454
/* Free the allocated internal data */
14711455
bt_mesh_free(client->internal_data);
1472-
cli->internal_data = NULL;
1456+
client->internal_data = NULL;
14731457
}
14741458

1475-
client = NULL;
1476-
14771459
bt_mesh_cfg_client_mutex_free();
14781460

14791461
return 0;

components/bt/esp_ble_mesh/mesh_core/health_cli.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
#include "mesh_common.h"
1919
#include "health_cli.h"
2020

21-
s32_t health_msg_timeout;
22-
23-
static bt_mesh_health_client_t *health_cli;
24-
2521
static const bt_mesh_client_op_pair_t health_op_pair[] = {
2622
{ OP_HEALTH_FAULT_GET, OP_HEALTH_FAULT_STATUS },
2723
{ OP_HEALTH_FAULT_CLEAR, OP_HEALTH_FAULT_STATUS },
@@ -350,28 +346,6 @@ int bt_mesh_health_fault_get(bt_mesh_client_common_param_t *param, u16_t cid)
350346
return err;
351347
}
352348

353-
s32_t bt_mesh_health_cli_timeout_get(void)
354-
{
355-
return health_msg_timeout;
356-
}
357-
358-
void bt_mesh_health_cli_timeout_set(s32_t timeout)
359-
{
360-
health_msg_timeout = timeout;
361-
}
362-
363-
int bt_mesh_health_cli_set(struct bt_mesh_model *model)
364-
{
365-
if (!model || !model->user_data) {
366-
BT_ERR("No Health Client context for given model");
367-
return -EINVAL;
368-
}
369-
370-
health_cli = model->user_data;
371-
372-
return 0;
373-
}
374-
375349
int bt_mesh_health_cli_init(struct bt_mesh_model *model, bool primary)
376350
{
377351
health_internal_data_t *internal = NULL;
@@ -409,11 +383,6 @@ int bt_mesh_health_cli_init(struct bt_mesh_model *model, bool primary)
409383

410384
bt_mesh_health_client_mutex_new();
411385

412-
/* Set the default health client pointer */
413-
if (!health_cli) {
414-
health_cli = client;
415-
}
416-
417386
return 0;
418387
}
419388

@@ -443,9 +412,5 @@ int bt_mesh_health_cli_deinit(struct bt_mesh_model *model, bool primary)
443412

444413
bt_mesh_health_client_mutex_free();
445414

446-
if (health_cli) {
447-
health_cli = NULL;
448-
}
449-
450415
return 0;
451416
}

components/bt/esp_ble_mesh/mesh_core/include/cfg_cli.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ int bt_mesh_cfg_hb_pub_get(bt_mesh_client_common_param_t *param);
135135

136136
int bt_mesh_cfg_node_reset(bt_mesh_client_common_param_t *param);
137137

138-
s32_t bt_mesh_cfg_cli_timeout_get(void);
139-
void bt_mesh_cfg_cli_timeout_set(s32_t timeout);
140-
141138
/* Configuration Client Status Message Context */
142139

143140
struct bt_mesh_cfg_comp_data_status {

components/bt/esp_ble_mesh/mesh_core/include/health_cli.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ extern const struct bt_mesh_model_op bt_mesh_health_cli_op[];
3434
BLE_MESH_MODEL(BLE_MESH_MODEL_ID_HEALTH_CLI, \
3535
bt_mesh_health_cli_op, NULL, cli_data)
3636

37-
int bt_mesh_health_cli_set(struct bt_mesh_model *model);
38-
3937
int bt_mesh_health_fault_get(bt_mesh_client_common_param_t *param, u16_t cid);
4038

4139
int bt_mesh_health_fault_clear(bt_mesh_client_common_param_t *param,
@@ -54,9 +52,6 @@ int bt_mesh_health_attention_get(bt_mesh_client_common_param_t *param);
5452
int bt_mesh_health_attention_set(bt_mesh_client_common_param_t *param,
5553
u8_t attention, bool need_ack);
5654

57-
s32_t bt_mesh_health_cli_timeout_get(void);
58-
void bt_mesh_health_cli_timeout_set(s32_t timeout);
59-
6055
/* Health Client Status Message Context */
6156

6257
struct bt_mesh_health_current_status {

0 commit comments

Comments
 (0)