Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5850926ybl; Tue, 10 Dec 2019 12:32:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzN4uZSlUoleTkN7ur3FAPkwyVpViJLwywXgly7yVSPULcml1UrfBP3/pfdF/bVXlyzKy+a X-Received: by 2002:a9d:7a4b:: with SMTP id z11mr27437029otm.46.1576009975970; Tue, 10 Dec 2019 12:32:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576009975; cv=none; d=google.com; s=arc-20160816; b=ppYe5hvXjqiVjYbOaMVCxpNYJarYRwxfgXPQpmzAeVBYmIcTP4Zg6Hh8I305YljbnU 1b9arI0MElFCcNFGZDF5QlG5mVFMPZ5ls8wiYQ0mOAKpLjMRofWD6YPMAv+eqVSOmbaH d5bvFqAzfI+Y0S3d2519lWirVuAI9QcIZubiUPeYdgOpq9nFrN6eUfOwF9/CEmIzgJL2 nf5IOEHta6qPZ8HIY9XAVtmiYYH1TMkmuUVf7346j5I84Yl1pf1Wugno5OHCEKEnqyjC xQ5OrnUvj29fRbJoT45oiA5OhfgKZB+5oNFpLIiFSY3A24A0UUz7Tofo86w4TjC3/IBB WGGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=SzUb66JUNHmPosCXzY6RWnqBBjTOvoNd94gnS9oOfxA=; b=Iat57jZUJu16Ch/PxDM8CB13NgF+NUn+G1LxwP2ZzXK/J6mgLowXjjnas5KH0LdeBv Cu7unwfqWcVnZxIKk+Rsxxi3DzG1TXESa7JV5agMpGjV8w1W2sbmjMHMqkTNPtt68g2R 2d8QQTE5a0WAxHuxZd7Wmrjo1hu0QBUHi2EeWhdcRpOjvIg/tcsUtW3pJv0VkPgGjOUv sMtXbjd8aAyPdPt+RZQS2D6lyFsfDKzZzNUOZ3wYE3iD2OwUWFK8gcq/lgsBk5FnSJUh qLI5t2ILxP5nKtBzTiEIIMMYXN6qe8jLtD1cjBRZp4Py78Oa+oZPF//j/MeBmFLTi9uB eYsQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r8si2507818otp.194.2019.12.10.12.32.44; Tue, 10 Dec 2019 12:32:55 -0800 (PST) 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; 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 S1726911AbfLJUbN (ORCPT + 99 others); Tue, 10 Dec 2019 15:31:13 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:46133 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbfLJUbN (ORCPT ); Tue, 10 Dec 2019 15:31:13 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mw8gc-1hpI030rKO-00s44T; Tue, 10 Dec 2019 21:31:03 +0100 From: Arnd Bergmann To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Zhan Liu Cc: Arnd Bergmann , Dmytro Laktyushkin , Bhawanpreet Lakha , Jun Lei , Charlene Liu , Eric Yang , Nikola Cornij , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: fix undefined struct member reference Date: Tue, 10 Dec 2019 21:30:46 +0100 Message-Id: <20191210203101.2663341-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:6Y2/uQlFVUAl2FLpNaMIEOkGmiPd6/841XgCPxFoFzLNddBwEXH Gv0mA5U4F2XyfY5t7Irv9sGvE7omtf7B7anfrVJBcEa6nJh0oGgFa3a8TjQPfIv9chsmwPT jvm00bAGb9IDmiVsEt/HDimufrl4EuajG0pezWC+Cd9W5Z3cXKjNuVPnbUu6xNF5mo57oYn vjtK9SqzVDqza+VajFYtg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nvvWyV4d47I=:igjZJHss92gevPEg0s6AeJ irNg5oTb0g/mz1SP58BRWPJSUPXagn9fT5Q282PRr4qjKcGuqUqdPcXxozfe+lB8JSjqAtAGw uGrMQgtCqCSRhrmYPiIvqAvYo7eKNTHjgm5zzL+bvo9/CHEzMDRNSIV7lUKhGjbHAClQMc8c7 GlE5a+tlT+8othshZhcQR4ci6Pr2UmYOudQalhqK0FT3R1UV5qW9PQ02gnzVmeqVwr8kIlJDv 8hlVZ1hkWffCyUrLjn0vH+xN/T6TWgnWt+pJTNBPdIYjibiIKuItvsKNill74VNUq3R/Kgh/V 6C6ONZlPZdxOlv3KSBoMTYET6qDuqe7QIqBbeqar9KHm+OhvaT8Oi2mBTCr9Ebb4ITtqpVHIZ k50AT2eOTHY5gRKN3y6dURvxJPLaNTVNVRSDQLVquHAsvnq16pI2hRHsyfUddNkOdKg8FVKGf BToTy7SZam/OruTSwmLzD2ZboH7k3sc+6HbQ+hBNHkDSNS/fzNmcpKJZ0pn1TdrdbIdJVqMC/ jMwXwnoDMWLCak14H7Wgws8CcQkZCddWhNXS2qO3EOHS34zybzsKNNXd0Y8WmYupY8xDr+ec+ sbZB7GEbT3OhMcmh9VKJsGypjTr45ZjUJjJzf4ZhnrukVS/57Y/133obTCJn3PUT9bdP6a0Gq CCQSrwldYAAxNi+wQCxvY7r/8JJO6YxFLt/UEeXdDcYWXY+qwESm3KQEQdgsusLFVxLYdhoHK 83cyamaR95AcqjPE+P6lB3yo112Lk2GKxGxl4T/yNKfnnecQcJQoQ96ep8o7xWFSso8fdyte9 xYjZnAYcSEBleU5p/+5gbGi1R2S9x1j3AMcpJo1yAJn3p4G8DD0Q8XSAHsyN9rJksdRVvZxI0 jyJZTahwNkriE15CwfTw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org An initialization was added for two optional struct members. One of these is always present in the dcn20_resource file, but the other one depends on CONFIG_DRM_AMD_DC_DSC_SUPPORT and causes a build failure if that is missing: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:926:14: error: excess elements in struct initializer [-Werror] .num_dsc = 5, Add another #ifdef around the assignment. Fixes: c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc within NV14's resource caps") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index faab89d1e694..fdf93e6edf43 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -923,7 +923,9 @@ static const struct resource_caps res_cap_nv14 = { .num_dwb = 1, .num_ddc = 5, .num_vmid = 16, +#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT .num_dsc = 5, +#endif }; static const struct dc_debug_options debug_defaults_drv = { -- 2.20.0