[libcamera-devel,22/31] libcamera: byte_stream_buffer: Fix documentation of read() and write()

Message ID 20200229164254.23604-23-laurent.pinchart@ideasonboard.com
State Superseded
Headers show
Series
  • libcamera: Add support for array controls
Related show

Commit Message

Laurent Pinchart Feb. 29, 2020, 4:42 p.m. UTC
From: Jacopo Mondi <jacopo@jmondi.org>

The documentation of the read() and write() functions refer to
inexistent 'size' and 'data' parameters in their brief. Fix them.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/byte_stream_buffer.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kieran Bingham March 5, 2020, 3:32 p.m. UTC | #1
On 29/02/2020 16:42, Laurent Pinchart wrote:
> From: Jacopo Mondi <jacopo@jmondi.org>
> 
> The documentation of the read() and write() functions refer to
> inexistent 'size' and 'data' parameters in their brief. Fix them.

s/inexistent/non existent/

> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/byte_stream_buffer.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp
> index 23d624dd0a06..cd1d8a36d464 100644
> --- a/src/libcamera/byte_stream_buffer.cpp
> +++ b/src/libcamera/byte_stream_buffer.cpp
> @@ -225,7 +225,7 @@ int ByteStreamBuffer::skip(size_t size)
>  
>  /**
>   * \fn template<typename T> int ByteStreamBuffer::read(T *t)
> - * \brief Read \a size \a data from the managed memory buffer
> + * \brief Read data from the managed memory buffer into \a t
>   * \param[out] t Pointer to the memory containing the read data
>   * \return 0 on success, a negative error code otherwise
>   * \retval -EACCES attempting to read from a write buffer
> @@ -234,7 +234,7 @@ int ByteStreamBuffer::skip(size_t size)
>  
>  /**
>   * \fn template<typename T> int ByteStreamBuffer::write(const T *t)
> - * \brief Write \a data of \a size to the managed memory buffer
> + * \brief Write \a t to the managed memory buffer
>   * \param[in] t The data to write to memory
>   * \return 0 on success, a negative error code otherwise
>   * \retval -EACCES attempting to write to a read buffer
>

Patch

diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp
index 23d624dd0a06..cd1d8a36d464 100644
--- a/src/libcamera/byte_stream_buffer.cpp
+++ b/src/libcamera/byte_stream_buffer.cpp
@@ -225,7 +225,7 @@  int ByteStreamBuffer::skip(size_t size)
 
 /**
  * \fn template<typename T> int ByteStreamBuffer::read(T *t)
- * \brief Read \a size \a data from the managed memory buffer
+ * \brief Read data from the managed memory buffer into \a t
  * \param[out] t Pointer to the memory containing the read data
  * \return 0 on success, a negative error code otherwise
  * \retval -EACCES attempting to read from a write buffer
@@ -234,7 +234,7 @@  int ByteStreamBuffer::skip(size_t size)
 
 /**
  * \fn template<typename T> int ByteStreamBuffer::write(const T *t)
- * \brief Write \a data of \a size to the managed memory buffer
+ * \brief Write \a t to the managed memory buffer
  * \param[in] t The data to write to memory
  * \return 0 on success, a negative error code otherwise
  * \retval -EACCES attempting to write to a read buffer