From: Stefan Agner <stefan@agner.ch>
To: Alex Deucher <alexander.deucher@amd.com>
Cc: "David Airlie" <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, "James Zhu" <James.Zhu@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: [PATCH] drm/amdgpu: use first uvd instance to avoid clang build error
Date: Sun, 17 Jun 2018 10:52:12 +0200 [thread overview]
Message-ID: <20180617085218.7753-1-stefan@agner.ch> (raw)
Explicitly use the first uvd instance to avoid a build error when
using clang 6:
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1148:52: error: expected ')'
container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
^
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1148:3: note: to match this '('
container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
^
./include/linux/kernel.h:967:21: note: expanded from macro 'container_of'
((type *)(__mptr - offsetof(type, member))); })
^
./include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
^
./include/linux/compiler-gcc.h:170:20: note: expanded from macro
'__compiler_offsetof'
__builtin_offsetof(a, b)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1147:24: error: initializing
'struct amdgpu_device *' with an expression of incompatible type 'void'
struct amdgpu_device *adev =
^
2 errors generated.
Fixes: 10dd74eac4db ("drm/amdgpu/vg20:Restruct uvd.inst to support multiple instances")
Cc: James Zhu <James.Zhu@amd.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index bcf68f80bbf0..6666a5888c44 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1145,7 +1145,7 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
{
struct amdgpu_device *adev =
- container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
+ container_of(work, struct amdgpu_device, uvd.inst[0].idle_work.work);
unsigned fences = 0, i, j;
for (i = 0; i < adev->uvd.num_uvd_inst; ++i) {
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2018-06-17 8:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-17 8:52 Stefan Agner [this message]
[not found] ` <20180617085218.7753-1-stefan-XLVq0VzYD2Y@public.gmane.org>
2018-06-18 2:03 ` [PATCH] drm/amdgpu: use first uvd instance to avoid clang build error James Zhu
[not found] ` <625b2c05-c923-cd5c-cc48-cbc51ba3d3ee-5C7GfCeVMHo@public.gmane.org>
2018-06-18 14:37 ` Alex Deucher
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=20180617085218.7753-1-stefan@agner.ch \
--to=stefan@agner.ch \
--cc=James.Zhu@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.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