Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3423157ybi; Fri, 5 Jul 2019 07:06:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2dc6c5v3GeqLQDGlM6SuuQg1QQq1YYl7GtXQBBpkAFS/YOkL/OlKFD4vcaaI01JnQO3df X-Received: by 2002:a17:902:204:: with SMTP id 4mr5870075plc.178.1562335591363; Fri, 05 Jul 2019 07:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562335591; cv=none; d=google.com; s=arc-20160816; b=wPesYbf5Et7OFsHOzJI2Co1QzCsmZ9lMJLKObtHzlC+kDe3UrDlTOxPQkvn4vQ/SJi xMFRJ/26PCaGikRr/q07nhPZTJ3ucjyFENVhVc6RchXyP+oErbsk6RJ4OVcn56aMYpfF EHPtTtjAO0Acgsv9sGMnR0AV6ID4xmML48urrbvDtLjAVKkTTx6EXFxCW1lQ1Llpv4qx Nm/dZeeTza2P78yPT2zXYU2yzEiUKUIN22wYBOCY0GJ+cSc++Cd9KmGPLQsNmI2JENiV 5qBBle28wONteTxhvVhqqEW5NcfpQ4MnDLzbWJm+j8v3ro03Je4gjhMbkCisKFqOLpYI Ydrw== 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=kh734GQAOHG1UpY17xEI2o1yu9kYpFamhX1CJVle/PY=; b=AQRwQTGSmwsKNXox3i1IWovh0JcKkfIu+ETTqjKUUK33zZjTEdwKD6whR9oAGfP7XT 9bJwHmSawcVNq5LurRuZxzGLJ+H7AROw5SVTsnGaP5Q8yBjkidVQA1srUXsFgO0yP5MB 8g3j/fohO/F+4l0CHuBaEEh5lPLoI3qIFmdb+0SFbg/N+awizwpXDG7gtwAlom+CWg/K spjsohjI5EkMOMMur2Np/zzYjvBQysyuZj+PxIQxjV0hHs2rAZrR3KT/46oV+7Vl8bDE 0BxQ5s5WKphhkjdLtdRNZTPdSKrjA/uwtrOWWnF49ba2xWUKJOAPz08FMayL6FsPc6sA gCkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=jx0baOOq; 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 o63si8787755pjo.94.2019.07.05.07.06.15; Fri, 05 Jul 2019 07:06:31 -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=jx0baOOq; 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 S1728909AbfGEMkY (ORCPT + 99 others); Fri, 5 Jul 2019 08:40:24 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:45540 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727652AbfGEMkY (ORCPT ); Fri, 5 Jul 2019 08:40:24 -0400 Received: by mail-ot1-f67.google.com with SMTP id x21so8885952otq.12 for ; Fri, 05 Jul 2019 05:40:24 -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=kh734GQAOHG1UpY17xEI2o1yu9kYpFamhX1CJVle/PY=; b=jx0baOOqQJA11G9mT7UCNY6F5L2AwD+PA3hOWXOKDOpgv7onJ5Vr9jeqbQv1AaY4X/ A2W3+6Fls4oaR8JMVRsuvG3HtU4rxvaxP1NVy8/z9WvnS5fAkPrB1jt/P24LYmXsQ1oC RvlYi6MvYl9jMQbvv2cFjOaL+12vH7xVvVY7Mi91P5yb6jBnwk38VWWYAB+1rZyj9HRC 70nyoHVYXE73AWZ6x4rJHiSAInmDg/ZI13abxkqKMqZBMWMza63SxMEZPG0msIaaqVQ0 gx0pfL2crbZ0z0L3xJ0vQSk8N2JA1+mf4jag0lae19tlXoBYYNs3N/FwvlWqbReQy8jj 5jMw== 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=kh734GQAOHG1UpY17xEI2o1yu9kYpFamhX1CJVle/PY=; b=kuXSWv2m3XQgeQckDW/A1IoJD/mCa2J+c1aDt3PFutvu/pvqBoQjere1/pV0u6SN/3 zDmMiQB7uUmTpx7B9+FmM51WXv9O7qTyhajwAtKBfMVSZVUZv00jniky0kLnHiMK7pO7 Wc0pWnDQvWebTCZP68lUzDL91laCunA3uH2WrzAdlJqkwriEe1puZfEO6AXONIYVCUxt B6lGtDAej3U8nfUx5A6axXqUJb0mGMXflmTbOb//AEijUuY2ZO7viyAf9bIn8qWdvDSt p5l9GIjNIVdCM3C7cT3hmSxn41jCKbRXe7u0bs8JghoOTTL4+VGWJU1+/l982Wd6G4XB +31g== X-Gm-Message-State: APjAAAVANaYvC2SMoEmGY8uBuVnU2hZMtUQedt/L0WEHpwKxgxETOcNA N3BmdH4kGZmUgo2T5LIBGl/YAScRXz72rGHM+MpuKQ== X-Received: by 2002:a9d:7352:: with SMTP id l18mr2758476otk.292.1562330423731; Fri, 05 Jul 2019 05:40:23 -0700 (PDT) MIME-Version: 1.0 References: <20190705123220.54008-1-yuehaibing@huawei.com> In-Reply-To: <20190705123220.54008-1-yuehaibing@huawei.com> From: Bartosz Golaszewski Date: Fri, 5 Jul 2019 14:40:12 +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: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 function = debugfs_create_file; > did you mean bus_create_file? [-Werror=3Dimplicit-function-declaration] > debugfs_create_file("tegra_gpio", 0444, NULL, tgi, > ^~~~~~~~~~~~~~~~~~~ > bus_create_file > drivers/gpio/gpio-tegra.c:666:9: error: tegra_dbg_gpio_fops undeclared (f= irst 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_device *= 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. Bart