Skip to content

Commit a5e3a33

Browse files
aescolarfabiobaltieri
authored andcommitted
ipc: icmsg & icbmsg: Fix alloc_tx_buffer() doxygen description
The return values were not correct, and the parameters descriptions were not too easy to understand. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
1 parent f840f66 commit a5e3a33

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

subsys/ipc/ipc_service/backends/ipc_icbmsg.c

+7-6
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,16 @@ static int buffer_to_index_validate(const struct channel_config *ch_conf,
320320
/**
321321
* Allocate buffer for transmission
322322
*
323-
* @param[in,out] size Required size of the buffer. If zero, first available block is
324-
* allocated and all subsequent available blocks. Size actually
325-
* allocated which is not less than requested.
326-
* @param[out] buffer Allocated buffer data.
323+
* @param[in,out] size Required size of the buffer. If set to zero, the first available block will
324+
* be allocated, together with all contiguous free blocks that follow it.
325+
* On success, size will contain the actually allocated size, which will be
326+
* at least the requested size.
327+
* @param[out] buffer Pointer to the newly allocated buffer.
327328
* @param[in] timeout Timeout.
328329
*
329330
* @return Positive index of the first allocated block or negative error.
330-
* @retval -EINVAL If requested size is bigger than entire allocable space.
331-
* @retval -ENOSPC If timeout was K_NO_WAIT and there was not enough space.
331+
* @retval -ENOMEM If requested size is bigger than entire allocable space, or
332+
* the timeout was K_NO_WAIT and there was not enough space.
332333
* @retval -EAGAIN If timeout occurred.
333334
*/
334335
static int alloc_tx_buffer(struct backend_data *dev_data, uint32_t *size,

0 commit comments

Comments
 (0)