Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3424806ybi; Fri, 5 Jul 2019 07:08:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1IOHLXwbB3kUrrKAnAGc4VXASXR8VSlMNb5c1u/dMpSvPMb8HpoG328ZZwGR7hcF0NLT7 X-Received: by 2002:a17:902:4643:: with SMTP id o61mr5889660pld.101.1562335682847; Fri, 05 Jul 2019 07:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562335682; cv=none; d=google.com; s=arc-20160816; b=fbPRr5iRQhG9762U3io4vnB00JRSm18CK9CJmxxG1EXpQ3tf71zDifenCDs6zKOEaN Q2MMSo48vCF9GmWoP4gQO6O2H7pSdk/JdG9jtBnN5HW/AgPEL9Acfds38BnIpdir18w/ +TCAB9VveacWhSmnTgd6FSVgYa1oLjoRmS5bIHiIeQgqX7lv58tiyNzRHyXQULmiNnFx F1d0PJ+3lU7hmisyd9p50/46PvFOpQUQ1FOszhx9KFNsY95ckARpTXjO0ZfJYC07mfrL QYUjTz+aQUIcMBNPe6cWLO+7StZ+MA424NFnMswaMoyvOAUvesWXzeOKnJkBxZ12a3uj jqNA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SKIXJ9uk8+noml0z1EOUmEbUXXdqORK26jJChLARAIU=; b=jFv0/SIyt4x6B0K7D8chD9Z/GcCkRpuUs2Q7xSu4/Vdo5YF3Gsy3BbW1h4gxKrNpve tj2CnfEGQmU22PBVptESVsr+Ho+bw9YD9qQHcYxD2dIzQR1amTL6xu9YNPxZcMqOBCcP C0k+DmxSJhEe4/yTz42FxN4gNCvErfmAWxTcmuJRk8ECMjK7RFuLx8z8tzW2RklaeWv/ HpUA0P9oi0gcjFIP/wc+d6pGy7N+RTOkasAcgHwHF1UZWMDkg1pFtOJ+bhudOstpP9Y3 gdnrMcZqnsOyNkHVp30co5xfIE0rhvMHhGcA19QLUfG7i2FnRhVOTqBhzMV0IXVjtzrP gMig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=lLSPXtlF; 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 i9si8739698plb.284.2019.07.05.07.07.46; Fri, 05 Jul 2019 07:08:02 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=lLSPXtlF; 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 S1728574AbfGEM7g (ORCPT + 99 others); Fri, 5 Jul 2019 08:59:36 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:41489 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728443AbfGEM7g (ORCPT ); Fri, 5 Jul 2019 08:59:36 -0400 Received: by mail-ot1-f67.google.com with SMTP id o101so8969627ota.8 for ; Fri, 05 Jul 2019 05:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SKIXJ9uk8+noml0z1EOUmEbUXXdqORK26jJChLARAIU=; b=lLSPXtlFTXfLtYLuxrSByeoKH+54f9rR1agmM+dC5pxulQnGUWLjTFcuRDTIAgl4nY jz8u2J60wKT9TodJaxIzc5alXgeawJ0ut//xd5TtqLN7mWXZE8f24jbHnml6biC/KmCc d7/aTeQTMgjA0Ti508aD+82RxsmxkGXzENhjmZXbpCX/UekuBlAA31AADLUre9dWPf4P c4OAaokBMZHBVeHC4INq6/S+Y4DKjpXeH6COB0S2oK2ARQSasn0DiYB2iA/YcdOzOsQK xr0q+dqGAzo+buPuJy5K/9tReDi0us66oZex+ZWjewgPs2qY+1jqrjguSkxXuXltJY3V ZmKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SKIXJ9uk8+noml0z1EOUmEbUXXdqORK26jJChLARAIU=; b=THCF+qh1xy9yxXqqrmGGo281VeWsyNCDXJsT/Ndfnag3yh4Yk3u52am17ef3eKCyfI /6EUs/+dDZ+WN2RgcifBaUE5dJW18XViEe5cLFFQmfJ40hKMr3gxv26m2ssNUr3eA8p1 mBhloFJovMfPqpwdpU5i3r6v0Eup41Lh6moz8X95i+aEIpitOhV41sOToCsEgcFRm4Ic knOTnZKfdEJHzkbbY1cOjKkBn8JDWl98OSryc3fqKkOq7PGIpo3dARNS+55tVab/N0OE oKvXO8BRrj+024qLsZrVqnLhgmNDXQQv7pWOu8VmDIWNoFmDL13wFMDe4iMUtlSc5hS0 c1jA== X-Gm-Message-State: APjAAAWnB0VMAkO++YBxiuglSwwIi1ePvqtHAgQxylxII6GrJ3gAkBNo /V18mngnJwH74Rzc3K+R1q4oZ5i/9g2fr14hAd0Cxw== X-Received: by 2002:a05:6830:1681:: with SMTP id k1mr2706281otr.256.1562331575545; Fri, 05 Jul 2019 05:59:35 -0700 (PDT) MIME-Version: 1.0 References: <20190705123220.54008-1-yuehaibing@huawei.com> <74ffe8ea-e6fb-bd2a-42bd-08392eb27c69@huawei.com> In-Reply-To: From: Bartosz Golaszewski Date: Fri, 5 Jul 2019 14:59:24 +0200 Message-ID: Subject: Re: [PATCH] gpio: tegra: Fix build error without CONFIG_DEBUG_FS To: Yuehaibing Cc: Linus Walleij , Thierry Reding , Jonathan Hunter , LKML , linux-gpio , linux-tegra@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pt., 5 lip 2019 o 14:56 Bartosz Golaszewski napisa=C5=82(a): > > pt., 5 lip 2019 o 14:44 Yuehaibing napisa=C5=82(a= ): > > > > On 2019/7/5 20:40, Bartosz Golaszewski wrote: > > > pt., 5 lip 2019 o 14:34 YueHaibing napisa=C5= =82(a): > > >> > > >> If CONFIG_DEBUG_FS is not set, building fails: > > >> > > >> drivers/gpio/gpio-tegra.c: In function tegra_gpio_probe: > > >> drivers/gpio/gpio-tegra.c:665:2: error: implicit declaration of func= tion debugfs_create_file; > > >> did you mean bus_create_file? [-Werror=3Dimplicit-function-declarat= ion] > > >> debugfs_create_file("tegra_gpio", 0444, NULL, tgi, > > >> ^~~~~~~~~~~~~~~~~~~ > > >> bus_create_file > > >> drivers/gpio/gpio-tegra.c:666:9: error: tegra_dbg_gpio_fops undeclar= ed (first use in this function); > > >> did you mean tegra_gpio_pm_ops? > > >> &tegra_dbg_gpio_fops); > > >> ^~~~~~~~~~~~~~~~~~~ > > >> tegra_gpio_pm_ops > > >> > > >> Reported-by: Hulk Robot > > >> Fixes: a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation") > > >> Signed-off-by: YueHaibing > > >> --- > > >> drivers/gpio/gpio-tegra.c | 2 ++ > > >> 1 file changed, 2 insertions(+) > > >> > > >> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c > > >> index 59b99d8..40fd6bd 100644 > > >> --- a/drivers/gpio/gpio-tegra.c > > >> +++ b/drivers/gpio/gpio-tegra.c > > >> @@ -662,8 +662,10 @@ static int tegra_gpio_probe(struct platform_dev= ice *pdev) > > >> } > > >> } > > >> > > >> +#ifdef CONFIG_DEBUG_FS > > >> debugfs_create_file("tegra_gpio", 0444, NULL, tgi, > > >> &tegra_dbg_gpio_fops); > > >> +#endif > > >> > > >> return 0; > > >> } > > >> -- > > >> 2.7.4 > > >> > > >> > > > > > > Nack, there are inline stubs for all debugfs functions in > > > ./include/linux/debugfs.h if CONFIG_DEBUG_FS is not selected. Just > > > move the #include to the top of the source file. > > > > yes, agree this, but 'tegra_dbg_gpio_fops' is still undeclared. > > > > > > > > Bart > > > > > > . > > > > > > > Can you attach the config you're using? > > Bart Wait, nevermind. I think that commit a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation") is wrong and we missed that. Linus what do you think about reverting it? Bart