Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2685686imm; Sun, 17 Jun 2018 01:53:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKdPDD5RJfsPUCmzbd0VIakf+X6dthsrDLWg48uK5s8Nggn0SeQ2vRdhVK0YBk65dLOAd6y X-Received: by 2002:a63:7315:: with SMTP id o21-v6mr7358553pgc.253.1529225607495; Sun, 17 Jun 2018 01:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529225607; cv=none; d=google.com; s=arc-20160816; b=a5hhfoVORr8trsJfypOpWGiUYPbOYVrLYI4aVWa6B4d7qLz2VMRGx0WVUX1CFEHP51 /gij1iZC1GzFmeiLzJb3o99O91zfleYl3oAstC5PZGEQGj8IRm5dZVfigSIHW/w4VjNp pHjIGCOqnvPBl/x/tWhEkrfLi1LjT2Z5VJGuupOBlvyTS+YUy6qTTp/6NvuXLB/9jtKs ZbolNoLvObbDlo4YtbzFp2JLX2oCfGjKaPXHIm+89aSgY/ne4u98dpVgnEAhb87PwxQQ 8bh9cRPvDrVVYFN0Rqlu+iF7MiTBWscGKNEj9yJUX/1NDMA7wMz/5qR+HLpzvJZ3IJ5j VU3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=CB48aVpV0RgnRWL0sppEAN3vWmirvHvhS94TraMA13g=; b=tWy2EFjOVXzTZ3Et/b7Pxs+TbTUTUN5mn/wIoYq+JXjEyH8Ge1Mydb7X9vfRB2S5k5 ke9nIl+PSQvtbljSEjKeXnWvCm46cev0Uw64Ls+PUGxC4P8dFJll8OGxeol4sgvQUIJj xQtIq4pMXB334tLFBQTlADubMxHZ2F590DBeqoCxmxA747qlmXJhzaNAWaEpd+ykE0P5 HuAl2IAIUvBnXqHWYvZgQumOyrpqNKWgiuWBrCGqtQcAKQfXopuU9LNA19I9LR/afOWY IMuKDrQArkqQXdn2nF/aZlkDz5O0AqxdyaRsmp+i/+wxA7h8b7R/QvrZ6gi46Et0E3+k KUog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=yYn2khpG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10-v6si12598718pfe.121.2018.06.17.01.53.12; Sun, 17 Jun 2018 01:53:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=yYn2khpG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932707AbeFQIwu (ORCPT + 99 others); Sun, 17 Jun 2018 04:52:50 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:43772 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932478AbeFQIwt (ORCPT ); Sun, 17 Jun 2018 04:52:49 -0400 Received: from trochilidae.lan (unknown [37.17.239.3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 74AFE5C037A; Sun, 17 Jun 2018 10:52:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1529225568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:references; bh=CB48aVpV0RgnRWL0sppEAN3vWmirvHvhS94TraMA13g=; b=yYn2khpG7QgwV/00vQJnzwqQOmBAXTyvaBwUCaU3T6aIIZ1UYO+pXxOlFtlLlo66MGcSlx bU0Od8wNfr1TJbFBVNXHDejPRt9LFo8spnxXIVsi3L6E/jeEDcPAK1Oiv97MQaRTZzSvaC Rsf3TKBd43KEdWlh5Ihx9lcUGEkU7q4= From: Stefan Agner To: Alex Deucher Cc: Stefan Agner , James Zhu , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amdgpu: use first uvd instance to avoid clang build error Date: Sun, 17 Jun 2018 10:52:12 +0200 Message-Id: <20180617085218.7753-1-stefan@agner.ch> X-Mailer: git-send-email 2.17.1 X-Spamd-Result: default: False [-2.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[9]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_CONTAINS_FROM(1.00)[]; ASN(0.00)[asn:13030, ipnet:37.17.238.0/23, country:CH]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Stefan Agner --- 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