Commit 9aafa973 authored by Johan Hedberg's avatar Johan Hedberg Committed by Anas Nashif
Browse files

Bluetooth: Fix incorrect logging format specifiers



Fix compilation issues that show up if SYS_LOG is mapped to printk
instead of printf. Unlike printf, printk is annotated so that the
compiler catches incorrect format specifiers passed to it.

Change-Id: I4d6f635a0ed61de698727028ea8767dc0ef28bb1
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent fc21a76d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ static int h4_read(struct device *uart, uint8_t *buf,
			break;
		}

		BT_DBG("read %d remaining %d", rx, len - rx);
		BT_DBG("read %d remaining %zu", rx, len - rx);
		len -= rx;
		total += rx;
		buf += rx;
+1 −1
Original line number Diff line number Diff line
@@ -1770,7 +1770,7 @@ struct net_buf *bt_att_create_pdu(struct bt_conn *conn, uint8_t op, size_t len)
	}

	if (len + sizeof(op) > att->chan.tx.mtu) {
		BT_WARN("ATT MTU exceeded, max %u, wanted %u",
		BT_WARN("ATT MTU exceeded, max %u, wanted %zu",
			att->chan.tx.mtu, len + sizeof(op));
		return NULL;
	}
+3 −3
Original line number Diff line number Diff line
@@ -1359,9 +1359,9 @@ static int bt_hci_connect_le_cancel(struct bt_conn *conn)
int bt_conn_le_param_update(struct bt_conn *conn,
			    const struct bt_le_conn_param *param)
{
	BT_DBG("conn %p features 0x%x params (%d-%d %d %d)", conn,
	       conn->le.features[0], param->interval_min, param->interval_max,
	       param->latency, param->timeout);
	BT_DBG("conn %p features 0x%02x params (%d-%d %d %d)", conn,
	       conn->le.features[0][0], param->interval_min,
	       param->interval_max, param->latency, param->timeout);

	/* Check if there's a need to update conn params */
	if (conn->le.interval >= param->interval_min &&
+2 −2
Original line number Diff line number Diff line
@@ -1190,7 +1190,7 @@ static struct net_buf *l2cap_alloc_frag(struct bt_l2cap_le_chan *chan)
		return NULL;
	}

	BT_DBG("frag %p tailroom %u", frag, net_buf_tailroom(frag));
	BT_DBG("frag %p tailroom %zu", frag, net_buf_tailroom(frag));

	net_buf_frag_add(chan->_sdu, frag);

@@ -1203,7 +1203,7 @@ static void l2cap_chan_le_recv_sdu(struct bt_l2cap_le_chan *chan,
	struct net_buf *frag;
	uint16_t len;

	BT_DBG("chan %p len %u sdu %u", chan, buf->len,
	BT_DBG("chan %p len %u sdu %zu", chan, buf->len,
	       net_buf_frags_len(chan->_sdu));

	if (net_buf_frags_len(chan->_sdu) + buf->len > chan->_sdu_len) {
+1 −1
Original line number Diff line number Diff line
@@ -956,7 +956,7 @@ static uint16_t l2cap_br_conf_opt_mtu(struct bt_l2cap_chan *chan,

	/* Core 4.2 [Vol 3, Part A, 5.1] MTU payload length */
	if (len != 2) {
		BT_ERR("tx MTU length %u invalid", len);
		BT_ERR("tx MTU length %zu invalid", len);
		result = BT_L2CAP_CONF_REJECT;
		goto done;
	}
Loading