From 129f93fdd20d2d5b39da293c9919ec00e39a16fd Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Mon, 4 Feb 2019 21:23:49 +0100 Subject: [PATCH] net/private: Rename net_print_frags() function Though unused anywhere, this function seems to have some usage while debugging. Let's rename it to a more semantically relevant name. Signed-off-by: Tomasz Bursztyka --- subsys/net/ip/net_private.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/subsys/net/ip/net_private.h b/subsys/net/ip/net_private.h index 1fc2f4e5df0..4f0de73a39c 100644 --- a/subsys/net/ip/net_private.h +++ b/subsys/net/ip/net_private.h @@ -154,10 +154,9 @@ static inline void net_pkt_hexdump(struct net_pkt *pkt, const char *str) } } -/* Print fragment chain */ -static inline void net_print_frags(const char *str, struct net_pkt *pkt) +static inline void net_pkt_print_buffer_info(struct net_pkt *pkt, const char *str) { - struct net_buf *frag = pkt->frags; + struct net_buf *buf = pkt->buffer; if (str) { printk("%s", str); @@ -165,15 +164,16 @@ static inline void net_print_frags(const char *str, struct net_pkt *pkt) printk("%p[%d]", pkt, atomic_get(&pkt->atomic_ref)); - if (frag) { + if (buf) { printk("->"); } - while (frag) { - printk("%p[%d/%d]", frag, frag->ref, frag->len); + while (buf) { + printk("%p[%d/%u (%u)]", + buf, atomic_get(&pkt->atomic_ref), buf->len, buf->size); - frag = frag->frags; - if (frag) { + buf = buf->frags; + if (buf) { printk("->"); } }