Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp739257yba; Wed, 3 Apr 2019 19:03:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHdB1xOnGa+Guxnyqk6yW4bkiTnZKEtnObXYLTx397bGsao6zlXKYbvhIITOzVUla1RC0H X-Received: by 2002:a63:f541:: with SMTP id e1mr2939119pgk.388.1554343391721; Wed, 03 Apr 2019 19:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554343391; cv=none; d=google.com; s=arc-20160816; b=VdkQgHgjzv/4nd/Xa/2UdBac7P8HqqLI4yUdWUTMmfgalCOWGCeFIuseOO8pdMCk8O g+WfjclxyphRt0mzWcJNUHMBk9GubNnVNfUXMSXUgk8/gCe+gqp9HNvTYHuO4TKYGUQR AppYUB6KTC1eChelHs+fSpsXnV5RK8yijLncE8DYcn07zahIfwq5Dkd9VEPHPmpNs8zL JmYY+CwX28qnnICQnKP8NjijzFx1hk858mev6MyMKbzcddurjkuIBCN88r70DUDnuyqn 9NaSpWhdxm+NTEUxYQWHRPjgbyhobbHEH+4ruH1Ba1vWoDL6nj5jfDIvSAe4gLtiOImt c0BA== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject; bh=Y4IeWyItvtzBefjQF4ynzsDlCb/OmZP0I+AtBA5Q1zI=; b=OoL7sF0cAEzYw+5ElJyIpF2Hv6NJQkixAuhI98q3SQwX0HLYYyVzA07aoYCbWAFa8i 6vGxijkXfoCP87bmQeDvX5+taNFyXZ3TLgYy7g5vw8tpFp17j0g32ZioR7EjEHlvehgo hXowywiWrg9FOGcomNNXlsk8Hgy1t5vSdHuAewsBW8QHyRBVdKlmlsWxgwXKi5lGscp1 PZWpvzbk0C/jLuSqzdkBSAZ29INMV70tTbtAIatnd3u63QC3OCmuhyGZGrYuV+3eKnR2 YzjCGTCPnB4izRfvTi+5Oq/X+ZrRlsphRNRCGq3VG7YvQaD90dhq5vaY+kfYHyCw/uyn mZfA== 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 q88si15140882pfa.222.2019.04.03.19.02.54; Wed, 03 Apr 2019 19:03:11 -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 S1726427AbfDDCCP (ORCPT + 99 others); Wed, 3 Apr 2019 22:02:15 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35426 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726167AbfDDCCP (ORCPT ); Wed, 3 Apr 2019 22:02:15 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [10.3.19.204]) by Forcepoint Email with ESMTP id B9008DB6D5746784416C; Thu, 4 Apr 2019 10:02:12 +0800 (CST) Received: from [127.0.0.1] (10.177.31.96) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.408.0; Thu, 4 Apr 2019 10:02:08 +0800 Subject: Re: [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS To: , , , , , , , References: <20190403064811.25832-1-yuehaibing@huawei.com> <20190403153639.GA13713@jcrouse1-lnx.qualcomm.com> From: YueHaibing Message-ID: Date: Thu, 4 Apr 2019 10:02:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20190403153639.GA13713@jcrouse1-lnx.qualcomm.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.96] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/3 23:36, Jordan Crouse wrote: > On Wed, Apr 03, 2019 at 02:48:11PM +0800, Yue Haibing wrote: >> From: YueHaibing >> >> When building CONFIG_DEBUG_FS is not set >> gcc warn this: >> >> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c: In function a6xx_show: >> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:1124:2: error: implicit declaration of function adreno_show; did you mean adreno_dump? [-Werror=implicit-function-declaration] >> adreno_show(gpu, state, p); >> ^~~~~~~~~~~ >> >> Reported-by: Hulk Robot >> Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state") >> Signed-off-by: YueHaibing >> --- >> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c >> index e686331..d327eb5 100644 >> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c >> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c >> @@ -1121,7 +1121,9 @@ void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state, >> if (IS_ERR_OR_NULL(state)) >> return; >> >> +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP) >> adreno_show(gpu, state, p); >> +#endif > > I agree that this is a problem, but I think I would prefer if we just made a > stub function for adreno_show instead of doing a inline ifdef, so in > adreno_gpu.c: > > #ifdef defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP) > ... > #else > void adreno_show(struct msm_gpu *gpu, msm_gpu_state *state, > struct drm_printer *p) > { > } > #endif > > If you want, I can do a quick patch. Sure, it's ok for me. > > Jordan >