From e3cca46a1b8a6811349f3d1de927ab8ab19dd6a7 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Fri, 16 Dec 2016 13:14:48 +0100 Subject: [PATCH] net: buf: Let's make use of func/line parameters when available It clutters a bit the code with ifdefs but it's quite useful when debugging. Change-Id: I4f6899d052921b8ef8a7ec2f6e7df927a1bca2f1 Signed-off-by: Tomasz Bursztyka --- subsys/net/buf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subsys/net/buf.c b/subsys/net/buf.c index 6ba5b042d91..fc2986f3b13 100644 --- a/subsys/net/buf.c +++ b/subsys/net/buf.c @@ -80,7 +80,7 @@ struct net_buf *net_buf_alloc(struct net_buf_pool *pool, int32_t timeout) NET_BUF_ASSERT(pool); - NET_BUF_DBG("pool %p timeout %d", pool, timeout); + NET_BUF_DBG("%s():%d: pool %p timeout %d", func, line, pool, timeout); /* We need to lock interrupts temporarily to prevent race conditions * when accessing pool->uninit_count. @@ -154,7 +154,7 @@ struct net_buf *net_buf_get(struct k_fifo *fifo, int32_t timeout) { struct net_buf *buf, *frag; - NET_BUF_DBG("fifo %p timeout %d", fifo, timeout); + NET_BUF_DBG("%s():%d: fifo %p timeout %d", func, line, fifo, timeout); buf = k_fifo_get(fifo, timeout); if (!buf) { @@ -162,7 +162,7 @@ struct net_buf *net_buf_get(struct k_fifo *fifo, int32_t timeout) return NULL; } - NET_BUF_DBG("buf %p fifo %p", buf, fifo); + NET_BUF_DBG("%s():%d: buf %p fifo %p", func, line, buf, fifo); /* Get any fragments belonging to this buffer */ for (frag = buf; (frag->flags & NET_BUF_FRAGS); frag = frag->frags) {