Bluetooth: Fix checkpatch error/warnings
Fixes some checkpatch's errors/warning in HCI stack code. Change-Id: I105fb491b5509f72549ab788764b1386ce3af47f Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
parent
5a3d40beec
commit
158cdbf91a
7 changed files with 12 additions and 11 deletions
|
@ -1040,7 +1040,7 @@ static uint8_t att_read_group_req(struct bt_att *att, struct net_buf *buf)
|
|||
if (bt_uuid_cmp(&u.uuid, BT_UUID_GATT_PRIMARY) &&
|
||||
bt_uuid_cmp(&u.uuid, BT_UUID_GATT_SECONDARY)) {
|
||||
send_err_rsp(conn, BT_ATT_OP_READ_GROUP_REQ, start_handle,
|
||||
BT_ATT_ERR_UNSUPPORTED_GROUP_TYPE);
|
||||
BT_ATT_ERR_UNSUPPORTED_GROUP_TYPE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -932,6 +932,7 @@ static int ssp_passkey_neg_reply(struct bt_conn *conn)
|
|||
static void timeout_fiber(int arg1, int arg2)
|
||||
{
|
||||
struct bt_conn *conn = (struct bt_conn *)arg1;
|
||||
|
||||
ARG_UNUSED(arg2);
|
||||
|
||||
conn->timeout = NULL;
|
||||
|
@ -977,7 +978,7 @@ void bt_conn_set_state(struct bt_conn *conn, bt_conn_state_t state)
|
|||
}
|
||||
|
||||
/* Actions needed for entering the new state */
|
||||
switch (conn->state){
|
||||
switch (conn->state) {
|
||||
case BT_CONN_CONNECTED:
|
||||
nano_fifo_init(&conn->tx_queue);
|
||||
fiber_start(conn->stack, sizeof(conn->stack), conn_tx_fiber,
|
||||
|
|
|
@ -257,7 +257,7 @@ struct bt_gatt_attr *bt_gatt_attr_next(const struct bt_gatt_attr *attr)
|
|||
return attr->_next;
|
||||
#else
|
||||
return ((attr < db || attr > &db[attr_count - 2]) ? NULL :
|
||||
(struct bt_gatt_attr *) &attr[1]);
|
||||
(struct bt_gatt_attr *)&attr[1]);
|
||||
#endif /* CONFIG_BLUETOOTH_GATT_DYNAMIC_DB */
|
||||
}
|
||||
|
||||
|
|
|
@ -2717,7 +2717,7 @@ static int set_ad(uint16_t hci_op, const struct bt_data *ad, size_t ad_len)
|
|||
set_data->data[set_data->len++] = ad[i].type;
|
||||
|
||||
memcpy(&set_data->data[set_data->len], ad[i].data,
|
||||
ad[i].data_len);
|
||||
ad[i].data_len);
|
||||
set_data->len += ad[i].data_len;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ static inline bool bt_addr_le_is_rpa(const bt_addr_le_t *addr)
|
|||
return false;
|
||||
|
||||
if ((addr->val[5] & 0xc0) == 0x40)
|
||||
return true;
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr)
|
|||
}
|
||||
|
||||
static inline bool bt_le_conn_params_valid(uint16_t min, uint16_t max,
|
||||
uint16_t latency, uint16_t timeout)
|
||||
uint16_t latency, uint16_t timeout)
|
||||
{
|
||||
if (min > max || min < 6 || max > 3200) {
|
||||
return false;
|
||||
|
|
|
@ -82,7 +82,7 @@ struct bt_keys *bt_keys_find(int type, const bt_addr_le_t *addr)
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(key_pool); i++) {
|
||||
if ((key_pool[i].keys & type) &&
|
||||
!bt_addr_le_cmp(&key_pool[i].addr, addr)) {
|
||||
!bt_addr_le_cmp(&key_pool[i].addr, addr)) {
|
||||
return &key_pool[i];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -596,6 +596,7 @@ static void smp_reset(struct bt_smp *smp)
|
|||
static void smp_timeout(int arg1, int arg2)
|
||||
{
|
||||
struct bt_smp *smp = (struct bt_smp *)arg1;
|
||||
|
||||
ARG_UNUSED(arg2);
|
||||
|
||||
BT_ERR("SMP Timeout");
|
||||
|
@ -623,7 +624,7 @@ static void smp_restart_timer(struct bt_smp *smp)
|
|||
}
|
||||
|
||||
smp->timeout = fiber_delayed_start(smp->stack, sizeof(smp->stack),
|
||||
smp_timeout, (int) smp, 0, 7, 0,
|
||||
smp_timeout, (int)smp, 0, 7, 0,
|
||||
SMP_TIMEOUT);
|
||||
}
|
||||
|
||||
|
@ -1182,7 +1183,6 @@ static uint8_t smp_encrypt_info(struct bt_smp *smp, struct net_buf *buf)
|
|||
memcpy(keys->ltk.val, req->ltk, 16);
|
||||
}
|
||||
|
||||
|
||||
atomic_set_bit(&smp->allowed_cmds, BT_SMP_CMD_MASTER_IDENT);
|
||||
|
||||
return 0;
|
||||
|
@ -2733,7 +2733,7 @@ int bt_smp_sign_verify(struct bt_conn *conn, struct net_buf *buf)
|
|||
h(keys->remote_csrk.val, 16), keys->remote_csrk.cnt);
|
||||
|
||||
err = smp_sign_buf(keys->remote_csrk.val, buf->data,
|
||||
buf->len - sizeof(sig));
|
||||
buf->len - sizeof(sig));
|
||||
if (err) {
|
||||
BT_ERR("Unable to create signature for %s",
|
||||
bt_addr_le_str(&conn->le.dst));
|
||||
|
@ -2880,7 +2880,7 @@ static int smp_aes_cmac_test(void)
|
|||
}
|
||||
|
||||
static int sign_test(const char *prefix, const uint8_t *key, const uint8_t *m,
|
||||
uint16_t len, const uint8_t *sig)
|
||||
uint16_t len, const uint8_t *sig)
|
||||
{
|
||||
uint8_t msg[len + sizeof(uint32_t) + 8];
|
||||
uint8_t orig[len + sizeof(uint32_t) + 8];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue