Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3392424ybi; Fri, 5 Jul 2019 06:37:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzB+2+SQNm4grkfO2PSda2oDVjTwupxt1yL+FFcqkUFCuC8H9V/cdv3vJFZKUB1X+eHnQdL X-Received: by 2002:a63:56:: with SMTP id 83mr5751393pga.145.1562333820067; Fri, 05 Jul 2019 06:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562333820; cv=none; d=google.com; s=arc-20160816; b=fQXnxy4ONlkxY77GyH0HYjEpHEjUJ3XJRGRkcDqO7ntgCznDSg2/iXRC+/07iTAaG6 gOtKChN7LMs2Rzn7iHHpQYWQAFS4NALCIKOhAWX61q76nx/par7YFwn8GW3Yhvv5b90y kbgQImdT9ib3yzs37GKxHqfPOlzPeJzL9sj8UOHszybXpS0ByeesiajMPagpXsgNA7M4 FKm1BEQrmgVkHRKv9ZCgf8WSOGo7m8AsCU7IvehF6QleZuejkQUsEwXBxjJv+zsARMmc R7y7t6F3hclTxIEnbaz4PK+hpO4ol8+RM7e3UuTypBrNsEVSO/A9lORq6Ok3vKrUDiUD bAaA== 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=ZVUzhjENRbcMH6LKQ742ijO+uYUVhO5dqzkVPaeVrdI=; b=jRUXygcC16qJeeAQyAOi/R+Fe1A0LNxLhFWOfYirH/djkryKVA2/29i0cpvtDj42Wn KjMXq60MQRgjGLmiMAfiBxeoHt30PTdJDw6VBVPOql3UT+94yLHKy26ZxOCdOR8oHIy6 AT6iExVvftpc189/QWKAEnNjrY34KY+43OGtJo2S066DiK4LwZ1fyVfPD8u19887ievH gTKTdsbgzLYKQaRT4x1S7LpLDAOtV3z501McCVcO01IhU9h1PuzvJrvqiWSYK19YV4Ai Dq5er35r+ROaHRr7Q6pFVsQIqKqj2af/QH5D1LzbnZPYAJFKd46QEuKl3/FIhbMRjytD olIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=AUl149XS; 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 o6si9039800pgk.52.2019.07.05.06.36.44; Fri, 05 Jul 2019 06:37:00 -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=AUl149XS; 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 S1728317AbfGEM4M (ORCPT + 99 others); Fri, 5 Jul 2019 08:56:12 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:33376 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727667AbfGEM4M (ORCPT ); Fri, 5 Jul 2019 08:56:12 -0400 Received: by mail-oi1-f195.google.com with SMTP id u15so7111262oiv.0 for ; Fri, 05 Jul 2019 05:56:11 -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=ZVUzhjENRbcMH6LKQ742ijO+uYUVhO5dqzkVPaeVrdI=; b=AUl149XSHoo0htyvS+BOmPZG6sm5El6IDSsGcn5VL3E7i/ECKJnu2XSdOdBZoJ/ClB AJZ/o+YRp19SZmGRZQh8lwv9EbWE7ebjda7kdYpLHu/02F9leVWKqXQ+GF4pXCDxXH4H //4rTnhY6JS52+zQHj7n4jd/9Tp48sCuxZ7TC1YMPfXjLTpMTVFbh9THkr9BSep9g9XZ H28S90W7MBAGEF2Ln7tOqFUp9SlxU/DXOm1Jm6NBJ6QL/+QAYFSNof5tv42c9uOihQcf WaA5DKZ0HcF5jibu3t9p4hNpo9BZ1Z078beJhy2+LLkWaavctzWr0jbfXKvhnuusHvsI 8+7w== 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=ZVUzhjENRbcMH6LKQ742ijO+uYUVhO5dqzkVPaeVrdI=; b=Lvn1mW8DzJxCAJvhIOTQQcyO3F8KWJpfTXRks3xLtpM62SiqLPeit3PHcgi/dz0ii2 z7Bd+0IJuXuG7RC+MH3qrc4KGlhl/IIHGWcUDpAqfhtCwUJgsPkKeCStPahCAUU9XubJ v/DTxkM1tOvw1l/ow5XK0WGOK/0qqMeZ5iXXg2bkEk9ZSCLBqEVsifhrjMJ51LzPHmvf heBikzHJIhGx396f0ImQaKoW/p5cyLkv+HAPtHUP79BS+0g5g5ANTFdtOGL/+i0b8z6S zzMMOGFYou/kK8anR6yi+3jLHwX/q8AysPZqrQx8U5VWTF1Sd6YblsLIYE61hciOO3Wi PGRA== X-Gm-Message-State: APjAAAUyEal3DV8cKIvl8l7xpdemJgzpe2S4zECF8qnRaryBWCHEp+i0 7NvXKGlYHqfAP7wa2FKhKCZCHRBZE15EC1RYL6PSTw== X-Received: by 2002:aca:b06:: with SMTP id 6mr1955935oil.175.1562331371427; Fri, 05 Jul 2019 05:56:11 -0700 (PDT) MIME-Version: 1.0 References: <20190705123220.54008-1-yuehaibing@huawei.com> <74ffe8ea-e6fb-bd2a-42bd-08392eb27c69@huawei.com> In-Reply-To: <74ffe8ea-e6fb-bd2a-42bd-08392eb27c69@huawei.com> From: Bartosz Golaszewski Date: Fri, 5 Jul 2019 14:56:00 +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: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 functi= on debugfs_create_file; > >> did you mean bus_create_file? [-Werror=3Dimplicit-function-declaratio= n] > >> debugfs_create_file("tegra_gpio", 0444, NULL, tgi, > >> ^~~~~~~~~~~~~~~~~~~ > >> bus_create_file > >> drivers/gpio/gpio-tegra.c:666:9: error: tegra_dbg_gpio_fops undeclared= (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_devic= e *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