From: "Thierry Reding" <thierry.reding@gmail.com>
To: "Ricardo Ribalda" <ribalda@chromium.org>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Sowjanya Komatineni" <skomatineni@nvidia.com>,
"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Hans Verkuil" <hverkuil@xs4all.nl>
Cc: <linux-media@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] staging: media: tegra-video: Fix -Wmaybe-unitialized warn in gcc
Date: Mon, 25 Mar 2024 14:46:58 +0100 [thread overview]
Message-ID: <D02VLMHNDLXY.16ACXUWB3TWZF@gmail.com> (raw)
In-Reply-To: <20240323-gcc-arm-warnings-v1-1-0b45cc52f39e@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
On Sat Mar 23, 2024 at 11:41 AM CET, Ricardo Ribalda wrote:
> Make sure that tegra20_vi_get_input_formats always assign a value for
> yuv_input_format.
>
> Fix:
> drivers/staging/media/tegra-video/tegra20.c:624:72: warning: ‘yuv_input_format’ may be used uninitialized [-Wmaybe-uninitialized]
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
> drivers/staging/media/tegra-video/tegra20.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/tegra-video/tegra20.c b/drivers/staging/media/tegra-video/tegra20.c
> index c25286772603c..c39b52d0e4447 100644
> --- a/drivers/staging/media/tegra-video/tegra20.c
> +++ b/drivers/staging/media/tegra-video/tegra20.c
> @@ -176,6 +176,7 @@ static void tegra20_vi_get_input_formats(struct tegra_vi_channel *chan,
> (*yuv_input_format) = VI_INPUT_YUV_INPUT_FORMAT_YUYV;
> break;
> case MEDIA_BUS_FMT_YVYU8_2X8:
> + default:
This default seems rather arbitrary. Maybe we should follow the
tegra20_vi_get_output_formats() and default to UYVY? Also, maybe follow
the same scheme as that function (i.e. assign the default near the top
of the function rather than add a default case)?
Thierry
> (*yuv_input_format) = VI_INPUT_YUV_INPUT_FORMAT_YVYU;
> break;
> }
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-03-25 13:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-23 10:41 [PATCH 0/3] media: Fix gcc warnings Ricardo Ribalda
2024-03-23 10:41 ` [PATCH 1/3] staging: media: tegra-video: Fix -Wmaybe-unitialized warn in gcc Ricardo Ribalda
2024-03-25 13:46 ` Thierry Reding [this message]
2024-03-23 10:41 ` [PATCH 2/3] media: radio-shark2: Avoid led_names truncations Ricardo Ribalda
2024-03-23 10:41 ` [PATCH 3/3] media: dvbdev: Initialize sbuf Ricardo Ribalda
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=D02VLMHNDLXY.16ACXUWB3TWZF@gmail.com \
--to=thierry.reding@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=skomatineni@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.