diff --git a/net/bluetooth/buf.c b/net/bluetooth/buf.c index d5eb6988e37..537ec4b6b52 100644 --- a/net/bluetooth/buf.c +++ b/net/bluetooth/buf.c @@ -150,7 +150,10 @@ struct bt_buf *bt_buf_hold(struct bt_buf *buf) void *bt_buf_add(struct bt_buf *buf, size_t len) { uint8_t *tail = buf->data + buf->len; -#if defined(CONFIG_BLUETOOTH_DEBUG_BUF) + + BT_DBG("buf %p len %u\n", buf, len); + +#if defined(CONFIG_BLUETOOTH_DEBUG) if (bt_buf_tailroom(buf) < len) { BT_ERR("buf %p overflow! len %u tailroom %u\n", buf, len, bt_buf_tailroom(buf)); @@ -162,7 +165,9 @@ void *bt_buf_add(struct bt_buf *buf, size_t len) void *bt_buf_push(struct bt_buf *buf, size_t len) { -#if defined(CONFIG_BLUETOOTH_DEBUG_BUF) + BT_DBG("buf %p len %u\n", buf, len); + +#if defined(CONFIG_BLUETOOTH_DEBUG) if (bt_buf_headroom(buf) < len) { BT_ERR("buf %p underflow! len %u headroom %u\n", buf, len, bt_buf_headroom(buf)); @@ -175,7 +180,9 @@ void *bt_buf_push(struct bt_buf *buf, size_t len) void *bt_buf_pull(struct bt_buf *buf, size_t len) { -#if defined(CONFIG_BLUETOOTH_DEBUG_BUF) + BT_DBG("buf %p len %u\n", buf, len); + +#if defined(CONFIG_BLUETOOTH_DEBUG) if (buf->len < len) { BT_ERR("buf %p overflow! len %u buf->len %u\n", buf, len, buf->len);