net: net_pkt: Simplify net_pkt_compact() API

Since db11fcd174 [net/net_pkt: Fully
separate struct net_pkt from struct net_buf], net_pkt_compact() can not
fail anymore.

This commit acknowledges this and simplifies the API accordingly.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This commit is contained in:
Reto Schneider 2022-09-14 21:39:12 +02:00 committed by Fabio Baltieri
parent 79f864028d
commit b11ba9ddc8
2 changed files with 2 additions and 6 deletions

View file

@ -1555,10 +1555,8 @@ void net_pkt_frag_insert(struct net_pkt *pkt, struct net_buf *frag);
*
* @details After this there is no more any free space in individual fragments.
* @param pkt Network packet.
*
* @return True if compact success, False otherwise.
*/
bool net_pkt_compact(struct net_pkt *pkt);
void net_pkt_compact(struct net_pkt *pkt);
/**
* @brief Get information about predefined RX, TX and DATA pools.

View file

@ -756,7 +756,7 @@ void net_pkt_frag_insert(struct net_pkt *pkt, struct net_buf *frag)
pkt->frags = frag;
}
bool net_pkt_compact(struct net_pkt *pkt)
void net_pkt_compact(struct net_pkt *pkt)
{
struct net_buf *frag, *prev;
@ -812,8 +812,6 @@ bool net_pkt_compact(struct net_pkt *pkt)
prev = frag;
frag = frag->frags;
}
return true;
}
void net_pkt_get_info(struct k_mem_slab **rx,