Re: [PATCH v4 9/9] media: v4l: subdev: Warn on stream when accessing stream-unaware data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/10/2023 09:03, Sakari Ailus wrote:
> Warn if the stream is set ot a non-zero value on sub-device pad state
> access functions. A driver bug is required for triggering the warning.

More confusion here: why not merge this into patch 2?

Regards,

	Hans

> 
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> ---
>  drivers/media/v4l2-core/v4l2-subdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
> index bd0d89c2996f..b7d2de6e750a 100644
> --- a/drivers/media/v4l2-core/v4l2-subdev.c
> +++ b/drivers/media/v4l2-core/v4l2-subdev.c
> @@ -1681,7 +1681,7 @@ __v4l2_subdev_state_get_format_stream(struct v4l2_subdev_state *state,
>  		return NULL;
>  
>  	if (state->pads) {
> -		if (stream)
> +		if (WARN_ON(stream))
>  			return NULL;
>  
>  		if (WARN_ON(pad >= state->sd->entity.num_pads))
> @@ -1715,7 +1715,7 @@ __v4l2_subdev_state_get_crop_stream(struct v4l2_subdev_state *state,
>  		return NULL;
>  
>  	if (state->pads) {
> -		if (stream)
> +		if (WARN_ON(stream))
>  			return NULL;
>  
>  		if (WARN_ON(pad >= state->sd->entity.num_pads))
> @@ -1749,7 +1749,7 @@ __v4l2_subdev_state_get_compose_stream(struct v4l2_subdev_state *state,
>  		return NULL;
>  
>  	if (state->pads) {
> -		if (stream)
> +		if (WARN_ON(stream))
>  			return NULL;
>  
>  		if (WARN_ON(pad >= state->sd->entity.num_pads))




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux