Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp965363ybb; Wed, 8 Apr 2020 13:30:35 -0700 (PDT) X-Google-Smtp-Source: APiQypI8RSni52Gihobme4QjLo5DBUzykpE5YkNCvIsDzxxs43GPtMgrW5CvyZsT8fjboxJlxNpR X-Received: by 2002:a4a:8926:: with SMTP id f35mr7333052ooi.97.1586377835480; Wed, 08 Apr 2020 13:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586377835; cv=none; d=google.com; s=arc-20160816; b=bbx5G/rpx8lG+g4YtEHm+JyPP5jElKu9EX4hbowMVuihBxbH5TUiy741RMVdlzoHt2 vK5pJjpW02EG/yA4sZXkbxhsLjYAlxd21VuMh4qe8zQEfdDcdQ2eJOD9VWc04NhQTjM0 V7/mSLWPM/8sXB+K+KM5WtFw4hI8oXr8xSUlf/AoQxRFI09PxlACA4KrujK8Ro/u/TjA uLEYbJ4KKF4z/AsLXro5wuD07Wi2clbq0PiZdrGJurUU2BMgrRNcHAmq5vfjMySpraYG wHfih4gGAN7+JAnQRQ7YKPCtZ++FXjU90l8SdeNM0u14DM+/oH8jTcN11Rry4JibKtOi Tf3Q== 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=2hiPnQm6M2h6S8xl9SLcKfyt4Ux24r8GAJjlG36CLv4=; b=UR+ZdXqrCRpwtDSZOuGRAfYBUIzBZkn4rCgxYZjou8kosNW8uml64FO/42fn9GT4F3 nilDD5T0ct9zWKxPrv7jF25/QzKniG5mAB1CbdV+MxYSwdxw/NWGtNO1SQGz6V98TRaI MK11CBOhIrb1UWBv7PZkR9sT8XJv7pd5Igtq0di92Sy06C9CkJVTEF+CfuqyZf3eS7CB FS5hP1kAYvrQvcAIZiyvThibEoGw9N5l2t0BUdJu/60BQ1MUQGczl3Cb58ZJG05CrvUr frNYrMWjO1cnRiGx65w4jpLhMgoMdZc3BdCRQKe8Pcck+qw4ImNz4WP2zgwck681s/v/ Fyzw== 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 y64si2973161oiy.12.2020.04.08.13.30.23; Wed, 08 Apr 2020 13:30:35 -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; 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 S1729826AbgDHTPN (ORCPT + 99 others); Wed, 8 Apr 2020 15:15:13 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:57817 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbgDHTPN (ORCPT ); Wed, 8 Apr 2020 15:15:13 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MG9Xu-1jW9e42yUO-00GXX9; Wed, 08 Apr 2020 21:15:00 +0200 From: Arnd Bergmann To: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jordan Crouse Cc: Arnd Bergmann , Rob Clark , "Kristian H. Kristensen" , Allison Randal , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS Date: Wed, 8 Apr 2020 21:14:22 +0200 Message-Id: <20200408191458.1260397-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:fdpx1d/DLJfitrFpYrv8Gkkt6VAi33wDZasxO8tqJ48cXnNukcc VB/q8aFUWkBATecQB02IKtYojv/7l+Y0/mI+xOkGkohuj0ZY4xA6z2cp4m13/z+BJ0uyHvn yA6d6TySZK/ah969Kwpn8hB3N5sX/O/4aiSFnMFZXs2FeFCV0pXCA3Gg2HWS8es86yMdTJp UwUjR8Rc/Y7boiWmcahiA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:kF1greHftFI=:ivJ7OWNComZDWHcSPqHuVF fQMfSIdFDMDjxV7GJQtasTwesVIjnbxOV3ownNUKiWq7W4MmZ4/XEbw1+54eOK8dO2yRHdFAO NEVksE9tiSX25TanxKVRdD6CudBu/Y4jb5750M3LUoD2vwOvlf16CjXqNdWh2APT8ZuibJWvE o2tiuVNIucvkYERGk4fSWF6wsu7u1O6Po2lCq30E1NjRMTE5Dwa63rtXtiik5SX/Ukx9wqGHe gST/LpfRaMbauz6fxk4xCxEW/If7kUB50d1Ls3zpWQXZTPQckX2Jgk8zN0X9243OLFs7Gwaje GrRasgfxmZW9uqthJzj6odDkV/EWXn8e01lHb6iHK2+Rqm5xcBGZnGXpLf1lqjXOjcURmPIjt 7jxvVts3EpHJ3CmN7su87024TaZeiU/63E8KScvBXle7nRZW/gubk+dyYhx4L3D+lr/IXNqS5 ZUylcVDrWpAiW58UFyVbUl1q4o3BArcu1ZeKrgFNMAMg1BAyz63jlrXCUJOTOS/g3Mw+ebBMB QKPemHcn1TsdD5CXVQC+paAf2IfcdxBfzAgr7PDkF1qkeyFr4lESb3zWerIJhuX98S2V/IKOm 2pjVCNR+I9/mnFscvygahOdh3eFe2wPgL2vKAV7vY+HlKEkr3f9H3Pep+SOCXVcyM7vzvoRyh 1+PRFyl4gOalwGSgcG7klIUbrVX4krfAT9sfWE+3e4KJLoRuGA4wzROscPdwN9Y7Lm8UfJkic 33UsM8NfMjkjuZc9EMwc8xbAvdckusmkA6IKvS/oUimisy+sB0pAxBbYwuh121fspv3WeZ3qX KmQQTuYd2KN8PuaOJPPaDdfSswvNBaI3+baHmXL7eWV9VhnvUY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I ran into a randconfig link error with debugfs disabled: arm-linux-gnueabi-ld: drivers/gpu/drm/msm/msm_gpu.o: in function `should_dump': msm_gpu.c:(.text+0x1cc): undefined reference to `rd_full' Change the helper to only look at this variable if debugfs is present. Fixes: e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/msm_gem.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index 30584eaf8cc8..eb4aeaf291ea 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -167,7 +167,10 @@ static inline bool should_dump(struct msm_gem_submit *submit, int idx) { extern bool rd_full; - return rd_full || (submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP); + if (IS_ENABLED(CONFIG_DEBUG_FS) && rd_full) + return true; + + return submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP; } #endif /* __MSM_GEM_H__ */ -- 2.26.0