From patchwork Wed Aug 2 21:43:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 9877805 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ACE78603B4 for ; Wed, 2 Aug 2017 21:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F9F3286E1 for ; Wed, 2 Aug 2017 21:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94A6227F8E; Wed, 2 Aug 2017 21:43:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9670288D9 for ; Wed, 2 Aug 2017 21:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751162AbdHBVnX (ORCPT ); Wed, 2 Aug 2017 17:43:23 -0400 Received: from mail-wr0-f177.google.com ([209.85.128.177]:38275 "EHLO mail-wr0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbdHBVnW (ORCPT ); Wed, 2 Aug 2017 17:43:22 -0400 Received: by mail-wr0-f177.google.com with SMTP id f21so1408971wrf.5 for ; Wed, 02 Aug 2017 14:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HeiTrvyCiKitdEqUSbbBRUjididiMiZR8F3sGX9ftiw=; b=RaWnUpYmxsd2Kvd0nYpZk9sZCtGE1HTU2sEv/mYjyXdCf5A8HUD2OOHFbtz8YiTrb4 t/vAaiauny/6eZqio0V9zm1I/FPUWuoHavu6hPVW132h+G4x/HjBUS5SvCrKqNv9zlj8 0rqs4WImWL/fPKBFfXo2kUb4XfZxUd4C/cf7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HeiTrvyCiKitdEqUSbbBRUjididiMiZR8F3sGX9ftiw=; b=gOUXSvnX0KMwpS9+jlHE0g/1JV1rHuEVQ3YVUYl7s0GrcBafk5vveFxnx/XA+G6gWi lXOXrz6aaTUZWaJsS4KmvEYXZH41j193kAK3UfICgIzD9Xzw5Cv+LCer/RgC4vOpR0y9 Jp90CYXII1RUHhFGwslFSxiXOSSIo9sGwdOb3mZKF8UGbwmg4eHZg6sV9UG/ddhcJYhg g+yxmOihzHqsPg7JQsk4dITJR24XYzbhZkzHNJ5wPAV4NAxmRjxCh5VPiUZAosbct2Oj 7nXwTiDYd5cCICLfIvgA2f54C+1CBZyClqUM9snKO/hG9Zx4ugh5w1wEZba7lp2gphiT IUcg== X-Gm-Message-State: AIVw113TgEkgLlkhOhkwtwQXTIT58Z7adHuraYr9EUcVraMBEvb9vU7z S2+m076EF6Z8DP/w X-Received: by 10.223.129.180 with SMTP id 49mr19817950wra.9.1501710201563; Wed, 02 Aug 2017 14:43:21 -0700 (PDT) Received: from [10.177.251.80] ([192.19.248.250]) by smtp.gmail.com with ESMTPSA id d19sm243440wrb.93.2017.08.02.14.43.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 14:43:20 -0700 (PDT) Subject: Re: [PATCH v2 9/9] wil6210: make debugfs compilation optional To: Maya Erez , Kalle Valo Cc: Gidon Studinski , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com References: <1501707649-9665-1-git-send-email-qca_merez@qca.qualcomm.com> <1501707649-9665-10-git-send-email-qca_merez@qca.qualcomm.com> From: Arend van Spriel Message-ID: <07dd021a-ee9a-182c-704f-f7c48a8e299e@broadcom.com> Date: Wed, 2 Aug 2017 23:43:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1501707649-9665-10-git-send-email-qca_merez@qca.qualcomm.com> Content-Language: en-US Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 02-08-17 23:00, Maya Erez wrote: > From: Gidon Studinski > > Since debugfs is a kernel configuration option, enable the driver to > compile without debugfs. > > Signed-off-by: Gidon Studinski > Signed-off-by: Maya Erez > --- > drivers/net/wireless/ath/wil6210/debugfs.c | 14 ++++++++++---- > drivers/net/wireless/ath/wil6210/main.c | 1 + > drivers/net/wireless/ath/wil6210/txrx.c | 6 +++--- > drivers/net/wireless/ath/wil6210/wil6210.h | 2 +- > 4 files changed, 15 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c > index d4e8865..5e803e2 100644 > --- a/drivers/net/wireless/ath/wil6210/debugfs.c > +++ b/drivers/net/wireless/ath/wil6210/debugfs.c > @@ -14,6 +14,10 @@ > * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > */ > > +#include "wil6210.h" > + > +#ifdef CONFIG_DEBUG_FS > + [...] > +#else /* !CONFIG_DEBUG_FS */ > +int wil6210_debugfs_init(struct wil6210_priv *wil) { return 0; } > +void wil6210_debugfs_remove(struct wil6210_priv *wil) {} > +#endif I think it would be better to have these stubs defined in the header file, ie. in wil6210.h. That way you can conditionally compile this source file through Makefile as below keeping debugfs.c clean. Regards, Arend diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile index 4ae21da..0f98904c 100644 --- a/drivers/net/wireless/ath/wil6210/Makefile +++ b/drivers/net/wireless/ath/wil6210/Makefile @@ -4,7 +4,7 @@ wil6210-y := main.o wil6210-y += netdev.o wil6210-y += cfg80211.o wil6210-y += pcie_bus.o -wil6210-y += debugfs.o +wil6210-$(CONFIG_DEBUG_FS) += debugfs.o wil6210-y += wmi.o wil6210-y += interrupt.o wil6210-y += txrx.o