From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: smiapp: avoid printing an uninitialized variable
Date: Fri, 4 Dec 2020 00:55:10 +0200 [thread overview]
Message-ID: <20201203225509.GP852@paasikivi.fi.intel.com> (raw)
In-Reply-To: <20201203222828.1029943-1-arnd@kernel.org>
Hi Arnd,
Thanks for the patch.
On Thu, Dec 03, 2020 at 11:28:16PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> There is no intialization for the 'reg' variable, so printing
> it produces undefined behavior as well as a compile-time warning:
>
> drivers/media/i2c/ccs/ccs-core.c:314:49: error: variable 'reg' is uninitialized when used here [-Werror,-Wuninitialized]
> "0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg,
>
> Remove the variable and stop printing it.
>
> Fixes: b24cc2a18c50 ("media: smiapp: Rename as "ccs"")
The patch introducing this was
fd9065812c7b ("media: smiapp: Obtain frame descriptor from CCS limits")
so I'll use it instead. Also s/smiapp/ccs/ in the subject.
Interesting that GCC 8.3 didn't complain.
--
Kind regards,
Sakari Ailus
prev parent reply other threads:[~2020-12-03 22:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 22:28 Arnd Bergmann
2020-12-03 22:55 ` Sakari Ailus [this message]
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=20201203225509.GP852@paasikivi.fi.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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
all inboxes | Powered by JetHome®