[v3,2/5] media: vsp1: Initialise partition windows
diff mbox series

Message ID 20190411161256.19607-3-kieran.bingham+renesas@ideasonboard.com
State New
Delegated to: Kieran Bingham
Headers show
Series
  • media: vsp1: Phased partition overlap support
Related show

Commit Message

Kieran Bingham April 11, 2019, 4:12 p.m. UTC
Ensure that the partition window is correctly initialised before being
utilised.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
---
 drivers/media/platform/vsp1/vsp1_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart April 18, 2019, 6:32 a.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Thu, Apr 11, 2019 at 05:12:53PM +0100, Kieran Bingham wrote:
> Ensure that the partition window is correctly initialised before being
> utilised.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
>  drivers/media/platform/vsp1/vsp1_video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
> index ee2fb8261a6a..563f9a02c373 100644
> --- a/drivers/media/platform/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/vsp1/vsp1_video.c
> @@ -189,7 +189,7 @@ static void vsp1_video_calculate_partition(struct vsp1_pipeline *pipe,
>  					   unsigned int index)
>  {
>  	const struct v4l2_mbus_framefmt *format;
> -	struct vsp1_partition_window window;
> +	struct vsp1_partition_window window = { 0, };

This isn't needed as-is. If this change is required by a patch further
in this series, you can squash it there.

>  	unsigned int modulus;
>  
>  	/*
Kieran Bingham May 7, 2019, 10:20 a.m. UTC | #2
Hi Laurent,

On 18/04/2019 07:32, Laurent Pinchart wrote:
> Hi Kieran,
> 
> Thank you for the patch.
> 
> On Thu, Apr 11, 2019 at 05:12:53PM +0100, Kieran Bingham wrote:
>> Ensure that the partition window is correctly initialised before being
>> utilised.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
>> ---
>>  drivers/media/platform/vsp1/vsp1_video.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
>> index ee2fb8261a6a..563f9a02c373 100644
>> --- a/drivers/media/platform/vsp1/vsp1_video.c
>> +++ b/drivers/media/platform/vsp1/vsp1_video.c
>> @@ -189,7 +189,7 @@ static void vsp1_video_calculate_partition(struct vsp1_pipeline *pipe,
>>  					   unsigned int index)
>>  {
>>  	const struct v4l2_mbus_framefmt *format;
>> -	struct vsp1_partition_window window;
>> +	struct vsp1_partition_window window = { 0, };
> 
> This isn't needed as-is. If this change is required by a patch further
> in this series, you can squash it there.

Ok, I think this might have got put in because of my debug patch which
prints the tables and was showing uninitialised data in unused fields.

I guess they can stay uninitiailised if/when they are unused :D.


> 
>>  	unsigned int modulus;
>>  
>>  	/*
>

Patch
diff mbox series

diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
index ee2fb8261a6a..563f9a02c373 100644
--- a/drivers/media/platform/vsp1/vsp1_video.c
+++ b/drivers/media/platform/vsp1/vsp1_video.c
@@ -189,7 +189,7 @@  static void vsp1_video_calculate_partition(struct vsp1_pipeline *pipe,
 					   unsigned int index)
 {
 	const struct v4l2_mbus_framefmt *format;
-	struct vsp1_partition_window window;
+	struct vsp1_partition_window window = { 0, };
 	unsigned int modulus;
 
 	/*