Bluetooth: Fix alignment issues resulting from new integer types
The switch from C99 integer types to u16_t, etc. caused misalignment in structs and function definitions with multi-line parameter lists. Change-Id: Ic0e33dc199f834ad7772417bca4c0b2d2f779d15 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
acb872fd8c
commit
97f0241c07
16 changed files with 154 additions and 166 deletions
|
@ -898,8 +898,8 @@ static u8_t read_cb(const struct bt_gatt_attr *attr, void *user_data)
|
||||||
return BT_GATT_ITER_CONTINUE;
|
return BT_GATT_ITER_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_read_rsp(struct bt_att *att, u8_t op, u8_t rsp,
|
static u8_t att_read_rsp(struct bt_att *att, u8_t op, u8_t rsp, u16_t handle,
|
||||||
u16_t handle, u16_t offset)
|
u16_t offset)
|
||||||
{
|
{
|
||||||
struct bt_conn *conn = att->chan.chan.conn;
|
struct bt_conn *conn = att->chan.chan.conn;
|
||||||
struct read_data data;
|
struct read_data data;
|
||||||
|
@ -1205,8 +1205,8 @@ static u8_t write_cb(const struct bt_gatt_attr *attr, void *user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_write_rsp(struct bt_conn *conn, u8_t op, u8_t rsp,
|
static u8_t att_write_rsp(struct bt_conn *conn, u8_t op, u8_t rsp,
|
||||||
u16_t handle, u16_t offset,
|
u16_t handle, u16_t offset, const void *value,
|
||||||
const void *value, u8_t len)
|
u8_t len)
|
||||||
{
|
{
|
||||||
struct write_data data;
|
struct write_data data;
|
||||||
|
|
||||||
|
@ -1319,9 +1319,8 @@ static u8_t prep_write_cb(const struct bt_gatt_attr *attr, void *user_data)
|
||||||
return BT_GATT_ITER_CONTINUE;
|
return BT_GATT_ITER_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_prep_write_rsp(struct bt_att *att, u16_t handle,
|
static u8_t att_prep_write_rsp(struct bt_att *att, u16_t handle, u16_t offset,
|
||||||
u16_t offset, const void *value,
|
const void *value, u8_t len)
|
||||||
u8_t len)
|
|
||||||
{
|
{
|
||||||
struct bt_conn *conn = att->chan.chan.conn;
|
struct bt_conn *conn = att->chan.chan.conn;
|
||||||
struct prep_data data;
|
struct prep_data data;
|
||||||
|
@ -1592,56 +1591,49 @@ done:
|
||||||
return att_handle_rsp(att, NULL, 0, err);
|
return att_handle_rsp(att, NULL, 0, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_find_info_rsp(struct bt_att *att,
|
static u8_t att_handle_find_info_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
return att_handle_rsp(att, buf->data, buf->len, 0);
|
return att_handle_rsp(att, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_find_type_rsp(struct bt_att *att,
|
static u8_t att_handle_find_type_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
return att_handle_rsp(att, buf->data, buf->len, 0);
|
return att_handle_rsp(att, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_read_type_rsp(struct bt_att *att,
|
static u8_t att_handle_read_type_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
return att_handle_rsp(att, buf->data, buf->len, 0);
|
return att_handle_rsp(att, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_read_rsp(struct bt_att *att,
|
static u8_t att_handle_read_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
return att_handle_rsp(att, buf->data, buf->len, 0);
|
return att_handle_rsp(att, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_read_blob_rsp(struct bt_att *att,
|
static u8_t att_handle_read_blob_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
return att_handle_rsp(att, buf->data, buf->len, 0);
|
return att_handle_rsp(att, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_read_mult_rsp(struct bt_att *att,
|
static u8_t att_handle_read_mult_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
return att_handle_rsp(att, buf->data, buf->len, 0);
|
return att_handle_rsp(att, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_write_rsp(struct bt_att *att,
|
static u8_t att_handle_write_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
|
@ -1656,8 +1648,7 @@ static u8_t att_handle_prepare_write_rsp(struct bt_att *att,
|
||||||
return att_handle_rsp(att, buf->data, buf->len, 0);
|
return att_handle_rsp(att, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8_t att_handle_exec_write_rsp(struct bt_att *att,
|
static u8_t att_handle_exec_write_rsp(struct bt_att *att, struct net_buf *buf)
|
||||||
struct net_buf *buf)
|
|
||||||
{
|
{
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,6 @@ struct bt_l2cap_le_credits {
|
||||||
struct bt_l2cap_fixed_chan {
|
struct bt_l2cap_fixed_chan {
|
||||||
u16_t cid;
|
u16_t cid;
|
||||||
int (*accept)(struct bt_conn *conn, struct bt_l2cap_chan **chan);
|
int (*accept)(struct bt_conn *conn, struct bt_l2cap_chan **chan);
|
||||||
|
|
||||||
sys_snode_t node;
|
sys_snode_t node;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -928,8 +928,7 @@ static u8_t select_attrs(struct bt_sdp_attribute *attr, u8_t att_idx,
|
||||||
*
|
*
|
||||||
* @return len Length of the attribute list created
|
* @return len Length of the attribute list created
|
||||||
*/
|
*/
|
||||||
static u16_t create_attr_list(struct bt_sdp *sdp,
|
static u16_t create_attr_list(struct bt_sdp *sdp, struct bt_sdp_record *record,
|
||||||
struct bt_sdp_record *record,
|
|
||||||
u32_t *filter, u8_t num_filters,
|
u32_t *filter, u8_t num_filters,
|
||||||
u16_t max_att_len, u8_t cont_state_size,
|
u16_t max_att_len, u8_t cont_state_size,
|
||||||
u8_t next_att, struct search_state *state,
|
u8_t next_att, struct search_state *state,
|
||||||
|
@ -1313,8 +1312,7 @@ static u16_t sdp_svc_search_att_req(struct bt_sdp *sdp, struct net_buf *buf,
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
u8_t op_code;
|
u8_t op_code;
|
||||||
u16_t (*func)(struct bt_sdp *sdp, struct net_buf *buf,
|
u16_t (*func)(struct bt_sdp *sdp, struct net_buf *buf, u16_t tid);
|
||||||
u16_t tid);
|
|
||||||
} handlers[] = {
|
} handlers[] = {
|
||||||
{ BT_SDP_SVC_SEARCH_REQ, sdp_svc_search_req },
|
{ BT_SDP_SVC_SEARCH_REQ, sdp_svc_search_req },
|
||||||
{ BT_SDP_SVC_ATTR_REQ, sdp_svc_att_req },
|
{ BT_SDP_SVC_ATTR_REQ, sdp_svc_att_req },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue