From: "Christian König" <deathsimple@vodafone.de>
To: "Rickard Strandqvist" <rickard_strandqvist@spectrumdigital.se>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] gpu: drm: radeon: r600_cp.c: Cleaning up uninitialized variables
Date: Mon, 02 Jun 2014 09:48:25 +0200 [thread overview]
Message-ID: <538C2C49.9060000@vodafone.de> (raw)
In-Reply-To: <1401577805-4609-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Am 01.06.2014 01:10, schrieb Rickard Strandqvist:
> There is a risk that the variable will be used without being initialized.
>
> This was largely found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
On the one hand it looks like a valid fix to me, but on the other hand
the r600_cp.c code is deprecated for something like five years now.
I would like to avoid touching it in any way and just let it rest
peacefully until we can remove it entirely.
Christian.
> ---
> drivers/gpu/drm/radeon/r600_cp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
> index 8c9b7e2..0770ad6 100644
> --- a/drivers/gpu/drm/radeon/r600_cp.c
> +++ b/drivers/gpu/drm/radeon/r600_cp.c
> @@ -2615,7 +2615,7 @@ int r600_cs_legacy_ioctl(struct drm_device *dev, void *data, struct drm_file *fp
> struct drm_radeon_cs *cs = data;
> struct drm_buf *buf;
> unsigned family;
> - int l, r = 0;
> + int l = 0, r = 0;
> u32 *ib, cs_id = 0;
>
> if (dev_priv == NULL) {
next prev parent reply other threads:[~2014-06-02 7:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-31 23:10 [PATCH] gpu: drm: radeon: r600_cp.c: Cleaning up uninitialized variables Rickard Strandqvist
2014-06-02 7:48 ` Christian König [this message]
2014-06-02 16:47 ` Rickard Strandqvist
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=538C2C49.9060000@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
/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