Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Yassine Oudjana <yassine.oudjana@gmail.com>
Cc: Robert Foss <rfoss@kernel.org>, Todor Tomov <todor.too@gmail.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Lad Prabhakar <prabhakar.csengg@gmail.com>,
	Yassine Oudjana <y.oudjana@protonmail.com>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: camss: camss-video: Don't zero subdev format again after initialization
Date: Tue, 30 May 2023 20:42:25 +0300	[thread overview]
Message-ID: <20230530174225.GI22516@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230503075340.45755-1-y.oudjana@protonmail.com>

Hi Yassine,

Thank you for the patch.

On Wed, May 03, 2023 at 10:53:40AM +0300, Yassine Oudjana wrote:
> From: Yassine Oudjana <y.oudjana@protonmail.com>
> 
> In an earlier commit, setting the which field of the subdev format struct
> in video_get_subdev_format was moved to a designated initializer that also
> zeroes all other fields. However, the memset call that was zeroing the
> fields earlier was left in place, causing the which field to be cleared
> after being set in the initializer.
> 
> Remove the memset call from video_get_subdev_format to avoid clearing the
> initialized which field.
> 
> Fixes: ecefa105cc44 ("media: Zero-initialize all structures passed to subdev pad operations")
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

This is a regression fix, I'll send a pull request right away.

> ---
>  drivers/media/platform/qcom/camss/camss-video.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c
> index 898f32177b12..8640db306026 100644
> --- a/drivers/media/platform/qcom/camss/camss-video.c
> +++ b/drivers/media/platform/qcom/camss/camss-video.c
> @@ -353,7 +353,6 @@ static int video_get_subdev_format(struct camss_video *video,
>  	if (subdev == NULL)
>  		return -EPIPE;
>  
> -	memset(&fmt, 0, sizeof(fmt));
>  	fmt.pad = pad;
>  
>  	ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);

-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2023-05-30 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  7:53 [PATCH] media: camss: camss-video: Don't zero subdev format again after initialization Yassine Oudjana
2023-05-03  9:39 ` Bryan O'Donoghue
2023-05-22 13:51 ` Andrey Konovalov
2023-05-30 17:42 ` Laurent Pinchart [this message]
2023-05-30 17:45   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230530174225.GI22516@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=rfoss@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=skhan@linuxfoundation.org \
    --cc=todor.too@gmail.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=y.oudjana@protonmail.com \
    --cc=yassine.oudjana@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox