Re: [PATCHv2 2/2] media: atomisp: don't use sizeof(NULL)

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

 



Le vendredi 02 février 2024 à 11:17 +0100, Hans Verkuil a écrit :
> Check the size of another pointer instead of NULL. This fixes this
> smatch warning:
> 
> drivers/staging/media/atomisp/pci/sh_css.c:3609 ia_css_pipe_enqueue_buffer() warn: sizeof(NUMBER)?
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"")

You sent v2 the same day. Please have a look at my comment in the v1.

cheers,
Nicolas

> ---
> Changes since v1: replace NULL by void *, that's better than using a pointer variable.
> ---
>  drivers/staging/media/atomisp/pci/sh_css.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
> index 1d1fbda75da1..938a4ea89c59 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css.c
> @@ -3606,7 +3606,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
> 
>  	assert(pipeline || pipe_id == IA_CSS_PIPE_ID_COPY);
> 
> -	assert(sizeof(NULL) <= sizeof(ddr_buffer.kernel_ptr));
> +	assert(sizeof(void *) <= sizeof(ddr_buffer.kernel_ptr));
>  	ddr_buffer.kernel_ptr = HOST_ADDRESS(NULL);
>  	ddr_buffer.cookie_ptr = buffer->driver_cookie;
>  	ddr_buffer.timing_data = buffer->timing_data;






[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