From patchwork Wed Sep 18 19:53:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 173999 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp98065ill; Wed, 18 Sep 2019 12:54:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGERg7jUdID2cNtqbTnoZl6H1K73ufxBHcYLXRyWPeEtnPvIJ7wFfQHn0t+J4xiprhpmLt X-Received: by 2002:a63:2807:: with SMTP id o7mr5679120pgo.131.1568836473168; Wed, 18 Sep 2019 12:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568836473; cv=none; d=google.com; s=arc-20160816; b=0sqPJmHUPB0zB9r1hWGixrTqCtArlwLkM5Qt97DG5fyBp/1RDwp1k12oUfRlArnYPv lLrVY8nkPtcjGxkV+YO3+dAtY2+4isEoIpMDthSidM4ypU91SiE1ynL9kFO2QS9e3EM9 cYV3Nts/0Pnq0SLFzx4AWIstr/flyZILyYUxnTHhLG5/0MV+LEz3xZWjVeyzpgEQ+09P w+y1qnSQL/VCYSQPp6Mo9YP7mAQrq3Xjg6IR2n6c8sZxypDgqo9GEu3zqI5+UaT0vyhm I1bmVqdn1Jb/pPUBE0x5x7d4BluiOsmZqJ0f1tboKQVAUdY8TKBb7D0WGOwHKGVTbr7m Py9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=leLAjF14tAkwK2GGY83w7lYayLD302EhcAF23zREEfY=; b=AOWaPOyM62RdjKMEEm7yTxGagBlMwMSwQY9UnfwEDAMiU3Ijn4+3H5Q0WC4m4PgJDG Qr0YJWWjiIOfytaHfinGd7kj9dVtCAhUhUQnKqwP0EQwEV9vhMHaUuX7UPi/DJ0j6+rb UMnb9cTfKHtOCC/AMXV5VsxHpd3URTqLO+RNvv5indW+8HwqXqkPDUvwLmcpSuCgA6oD D3iiCRXRqmcYzRVrAdLMK9FR/vJK+aRMsrCt3U1eiRSnK+/QF/p9iYwE1PgA+F7h2t9T unyvuvdARafaX/mfYFOxRJw1xIl31fEVpa6MKpwiWI9NdNpLssj5GuHTc+/7gFQHyWAg IW6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id r71si2657009pjb.40.2019.09.18.12.54.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Sep 2019 12:54:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AEEB6FD26; Wed, 18 Sep 2019 19:54:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id A83476FD21 for ; Wed, 18 Sep 2019 19:54:27 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MdeSn-1hbcGC3xB3-00ZgA4; Wed, 18 Sep 2019 21:54:22 +0200 From: Arnd Bergmann To: Harry Wentland , Leo Li , Alex Deucher , =?utf-8?q?Christian_K=C3=B6?= =?utf-8?q?nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH] drm/amd/display: hide an unused variable Date: Wed, 18 Sep 2019 21:53:58 +0200 Message-Id: <20190918195418.2042610-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:e6RffvOmDj1nBJMeY+rrjixyu4FDdjpSMSkcA7dDa86QdgX8VAy vXJqdQHJ2VyuGNpIZmusNm/tmO6LSPOHGvbK29dNEXgwRjzOWBgH3zzgBys0a78d4gFJvgo po/+E1JWRhHgORmC1rtGZTv2ShsBdo79xTDlO7Eo10j0iqPbRuIQyj+h2JOyNBiQ1YeSiXh LEyb/3BeWh7FWoIm+goxQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:SHiyb5ey+ic=:V8Ia1QvLm+87GxeewHaNIj +MQq8F2/vjHgW/LvBnX+bhxFxBSm4ML23WPlTYZ0wjJB1nIdj1VkZ0LTPaIgMCdDygijEKJmJ CLTRQ/9/A4fdswCadvZxgZVt38EeaHzpNJ/AnGsWJ7hSgB6qnqhXOZVxknwraLTdxbt65Ec9e mEdMKNYWaRiD3FisIkIq/8n8NlMTcJwRBdqJGTZDcqKQyZzVtdsdAay8FTq3IPMvyy9KHXm4V EVzTuO2vv+5jQHw4HMfICR9cdfGrfHzjAD9MmiiI8ZNvtHHfWw3qyhluD2f99sGP8AkxHx+6N FrBdNc0APae8lL9NbzPNZ752lVbZlDM5EZHCt8HLhB9TRbMtB/EMJc+37GhkZx0PQ3eZBqgUg blPHdXp2XrbYBkuBJ40E/KJY1End+dyZtDT9HxCxazHooVlQfE18+RFSrtsV6psQ5XDvJq6aZ eWDNopJAleGAhBWPw+cLhRwo1fBxC5UvpAL3D3x6fuCW/nKQaatIEc/B2pAmZ04MI6KxYgGbi LR6nmsfDosZobbLs3rrupbrYoXkoGi/lhtAVuIbZmgvqVhAmmr3Fi6v7IKaB2cbdHRdwhI+1u kfmlfOnQ/i5aK3GkNrwIJRMymQI3N5LYg1TL8DoquPj34rGvs3dZkdgSwp0n2ufKiYP0qgrqE N37X5BrJ4OPDim6fEiwKDnPX6DJxzeQjWp2tJoIR3Kmb/xK3o1cZer+q3b1JZHEnDO0r9gmUE Fb9dWjayXMttGo7QBlt7rfkpZ7Rv/b/JFwxP42F0f8GTrYtTQ56kAQ4czEeIU6hQBIoG9tYIE /tzOM9tFEfF88iR558bdS8BwGR5e7jslFmDy/Fq6f2DasJMIS0GYKdWUQlnv4CszXzYehBDCE D26Smq1Ru9yEUHCzXu/A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dingchen Zhang , Arnd Bergmann , David Francis , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Without CONFIG_DEBUG_FS, we get a warning for an unused variable: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6020:33: error: unused variable 'source' [-Werror,-Wunused-variable] Hide the variable in an #ifdef like its only users. Fixes: 14b2584636c6 ("drm/amd/display: add functionality to grab DPRX CRC entries.") Signed-off-by: Arnd Bergmann Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index e1b09bb432bd..74252f57bafb 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6017,7 +6017,9 @@ static void amdgpu_dm_enable_crtc_interrupts(struct drm_device *dev, struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state, *new_crtc_state; int i; +#ifdef CONFIG_DEBUG_FS enum amdgpu_dm_pipe_crc_source source; +#endif for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {