Bluetooth: Use more appropriate printf format specifiers
Now that the logging macros use printf we can use more appropriate format specifiers for various values. Change-Id: I01025133b6a075f3478957a60163a1574cd85df7 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
0821341d3f
commit
8aec59f010
4 changed files with 9 additions and 9 deletions
|
@ -67,7 +67,7 @@ void bt_conn_recv(struct bt_conn *conn, struct bt_buf *buf, uint8_t flags)
|
|||
struct bt_l2cap_hdr *hdr;
|
||||
uint16_t len;
|
||||
|
||||
BT_DBG("handle %u len %u flags %x\n", conn->handle, buf->len, flags);
|
||||
BT_DBG("handle %u len %u flags %02x\n", conn->handle, buf->len, flags);
|
||||
|
||||
/* Check packet boundary flags */
|
||||
switch (flags) {
|
||||
|
@ -130,7 +130,7 @@ void bt_conn_recv(struct bt_conn *conn, struct bt_buf *buf, uint8_t flags)
|
|||
|
||||
break;
|
||||
default:
|
||||
BT_ERR("Unexpected ACL flags (%u)\n", flags);
|
||||
BT_ERR("Unexpected ACL flags (0x%02x)\n", flags);
|
||||
bt_conn_reset_rx_state(conn);
|
||||
bt_buf_put(buf);
|
||||
return;
|
||||
|
|
|
@ -309,7 +309,7 @@ static void hci_cmd_done(uint16_t opcode, uint8_t status, struct bt_buf *buf)
|
|||
}
|
||||
|
||||
if (dev.sent_cmd->hci.opcode != opcode) {
|
||||
BT_ERR("Unexpected completion of opcode %x\n", opcode);
|
||||
BT_ERR("Unexpected completion of opcode 0x%04x\n", opcode);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ static void hci_event(struct bt_buf *buf)
|
|||
hci_le_meta_event(buf);
|
||||
break;
|
||||
default:
|
||||
BT_WARN("Unhandled event %u\n", hdr->evt);
|
||||
BT_WARN("Unhandled event 0x%02x\n", hdr->evt);
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ static void le_sig(struct bt_conn *conn, struct bt_buf *buf)
|
|||
len = sys_le16_to_cpu(hdr->len);
|
||||
bt_buf_pull(buf, sizeof(*hdr));
|
||||
|
||||
BT_DBG("LE signaling code %u ident %u len %u\n", hdr->code,
|
||||
BT_DBG("LE signaling code 0x%02x ident %u len %u\n", hdr->code,
|
||||
hdr->ident, len);
|
||||
|
||||
if (buf->len != len) {
|
||||
|
@ -152,7 +152,7 @@ static void le_sig(struct bt_conn *conn, struct bt_buf *buf)
|
|||
le_conn_param_rsp(conn, buf);
|
||||
break;
|
||||
default:
|
||||
BT_WARN("Unknown L2CAP PDU code %u\n", hdr->code);
|
||||
BT_WARN("Unknown L2CAP PDU code 0x%02x\n", hdr->code);
|
||||
rej_not_understood(conn, hdr->ident);
|
||||
break;
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void bt_l2cap_recv(struct bt_conn *conn, struct bt_buf *buf)
|
|||
bt_smp_recv(conn, buf);
|
||||
break;
|
||||
default:
|
||||
BT_WARN("Ignoring data for unknown CID %u\n", cid);
|
||||
BT_WARN("Ignoring data for unknown CID 0x%04x\n", cid);
|
||||
bt_buf_put(buf);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ void bt_smp_recv(struct bt_conn *conn, struct bt_buf *buf)
|
|||
goto done;
|
||||
}
|
||||
|
||||
BT_DBG("Received SMP code %u len %u\n", hdr->code, buf->len);
|
||||
BT_DBG("Received SMP code 0x%02x len %u\n", hdr->code, buf->len);
|
||||
|
||||
bt_buf_pull(buf, sizeof(*hdr));
|
||||
|
||||
|
@ -454,7 +454,7 @@ void bt_smp_recv(struct bt_conn *conn, struct bt_buf *buf)
|
|||
err = smp_pairing_random(conn, buf);
|
||||
break;
|
||||
default:
|
||||
BT_WARN("Unhandled SMP code %u\n", hdr->code);
|
||||
BT_WARN("Unhandled SMP code 0x%02x\n", hdr->code);
|
||||
err = BT_SMP_ERR_CMD_NOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue