From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Rob Clark <rclark@redhat.com>, Ben Skeggs <bskeggs@redhat.com>
Subject: [PATCH] drm/nouveau: fix compile errors
Date: Wed, 25 Jan 2017 12:30:40 -0500 [thread overview]
Message-ID: <20170125173040.28834-1-robdclark@gmail.com> (raw)
From: Rob Clark <rclark@redhat.com>
Perhaps some newer versions of gcc are more clever about this.
drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c: In function 'gk104_top_oneinit':
include/linux/device.h:1164:45: error: 'inst' may be used uninitialized in this function [-Werror=maybe-uninitialized]
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
^
drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c:32:18: note: 'inst' was declared here
u32 data, type, inst;
^
Signed-off-by: Rob Clark <rclark@redhat.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c
index efac340..d352bbb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c
@@ -29,7 +29,7 @@ gk104_top_oneinit(struct nvkm_top *top)
struct nvkm_subdev *subdev = &top->subdev;
struct nvkm_device *device = subdev->device;
struct nvkm_top_device *info = NULL;
- u32 data, type, inst;
+ u32 data, type = 0, inst = 0;
int i;
for (i = 0; i < 64; i++) {
--
2.9.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2017-01-25 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 17:30 Rob Clark [this message]
2017-01-26 10:30 ` [PATCH] drm/nouveau: fix compile errors Daniel Vetter
2017-01-26 14:58 ` Rob Clark
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=20170125173040.28834-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=rclark@redhat.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;
as well as URLs for NNTP newsgroup(s).