Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH 1/1] media: v4l2-ctrl: Improve v4l2_ctrl_g_ctrl{,int64} documentation
@ 2026-12-01 10:19 Sakari Ailus
  2026-12-01 13:25 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Sakari Ailus @ 2026-12-01 10:19 UTC (permalink / raw)
  To: linux-media; +Cc: hans

Improve documentation of v4l2_ctrl_g_ctrl() and v4l2_ctrl_g_ctrl_int64()
by documenting what the function returns on error (i.e. 0).

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 include/media/v4l2-ctrls.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index cec9217d97ac..ac94bca52a3d 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -1111,6 +1111,8 @@ const s64 *v4l2_ctrl_get_int_menu(u32 id, u32 *len);
  * used from within the &v4l2_ctrl_ops functions.
  *
  * This function is for integer type controls only.
+ *
+ * Returns: the value of the control or 0 on error.
  */
 s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl);
 
@@ -1162,6 +1164,8 @@ static inline int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val)
  * used from within the &v4l2_ctrl_ops functions.
  *
  * This function is for 64-bit integer type controls only.
+ *
+ * Returns: the value of the control or 0 on error.
  */
 s64 v4l2_ctrl_g_ctrl_int64(struct v4l2_ctrl *ctrl);
 
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] media: v4l2-ctrl: Improve v4l2_ctrl_g_ctrl{,int64} documentation
  2026-12-01 10:19 [PATCH 1/1] media: v4l2-ctrl: Improve v4l2_ctrl_g_ctrl{,int64} documentation Sakari Ailus
@ 2026-12-01 13:25 ` Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2026-12-01 13:25 UTC (permalink / raw)
  To: Sakari Ailus, linux-media

On 01/12/2026 11:19, Sakari Ailus wrote:
> Improve documentation of v4l2_ctrl_g_ctrl() and v4l2_ctrl_g_ctrl_int64()
> by documenting what the function returns on error (i.e. 0).
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Hans Verkuil <hverkuil+cisco@kernel.org>

Regards,

	Hans

> ---
>  include/media/v4l2-ctrls.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
> index cec9217d97ac..ac94bca52a3d 100644
> --- a/include/media/v4l2-ctrls.h
> +++ b/include/media/v4l2-ctrls.h
> @@ -1111,6 +1111,8 @@ const s64 *v4l2_ctrl_get_int_menu(u32 id, u32 *len);
>   * used from within the &v4l2_ctrl_ops functions.
>   *
>   * This function is for integer type controls only.
> + *
> + * Returns: the value of the control or 0 on error.
>   */
>  s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl);
>  
> @@ -1162,6 +1164,8 @@ static inline int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val)
>   * used from within the &v4l2_ctrl_ops functions.
>   *
>   * This function is for 64-bit integer type controls only.
> + *
> + * Returns: the value of the control or 0 on error.
>   */
>  s64 v4l2_ctrl_g_ctrl_int64(struct v4l2_ctrl *ctrl);
>  


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-01 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 10:19 [PATCH 1/1] media: v4l2-ctrl: Improve v4l2_ctrl_g_ctrl{,int64} documentation Sakari Ailus
2026-12-01 13:25 ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox