Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp951396imm; Fri, 27 Jul 2018 08:47:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfyxVZPu9hNv2mG7a60yfQkiuINbaRHqxAjNLN2U+8wFq3nIS1l9bLA+3E5fdnHqW3HjfS/ X-Received: by 2002:a63:db4f:: with SMTP id x15-v6mr6641044pgi.214.1532706470994; Fri, 27 Jul 2018 08:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532706470; cv=none; d=google.com; s=arc-20160816; b=Xvm7JcKdqTCYH+A3ANbdtKd0qMpc9wrvsKb9dg16yERDN/yOiG8HBFhrzUW5lh8NOc iUhyrz0wAolzHjA1WR2fCIYxaNRAE/4D5otSEkqmXj04YN8r1+4qz5LGGcn5V8mRTBtf mLsPYJLS9HF43vbHHdOtai+VvfRrmLK3FD7p//HlrtpiNIkeQzyZfUK1BaJKBZlPFLWq iHmTUeJX5bEQgHNqxO9aA7BE6XD0bQBCTdIKrw2KJNgS0IrWUZE+zv1qXW4zde+iz4KE QOTKlw4MN+VfnrrYILs8g520O7H236yf6RQD5ZRARO2V7JTJMntCJpKid10uii8sf9dv F2dA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=j97HSwSohy+z/WZgacLHtQOvtWFHjrrR7dz/jfs0qNU=; b=Sy5T0FBsbI8goEcXlOvXG3s+fL2L0L51V8blCX4J1+i9WCQAsjCa8zeSqVoltmV1SH OSGvzF00yHw/u9kYgf2hyh6xM9dAJxeXp8decnG6zmXHb9Z7jwBNutFC1mxrPN/ZpJdD D9Ihppvyxu7/8Oung92G1/Vi4Wlj2b2F4Vxwo4+JzOUVXjLRPQdVQ2otaTQm7TEcWOd0 uOyppB/I8mLxNAcpUb2mFjbue0Iw5UgRw8A8y9ocGiD5vUz4BW2MljyH99eUIIWBkveo MYMtDAbWWa55jG/nY5qBkw6qB66V7GbJlzKjCjmCONQmcS0njI8kqcTcAGTL6IXSt1zl Le5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=dIwX2fCo; 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 l8-v6si3638130pgq.432.2018.07.27.08.47.36; Fri, 27 Jul 2018 08:47:50 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=dIwX2fCo; 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 S2388834AbeG0RIe (ORCPT + 99 others); Fri, 27 Jul 2018 13:08:34 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52232 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732981AbeG0RId (ORCPT ); Fri, 27 Jul 2018 13:08:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=j97HSwSohy+z/WZgacLHtQOvtWFHjrrR7dz/jfs0qNU=; b=dIwX2fCo3x6x/kWI3gkA7TsAQ/ NM7IUH1DJuoc7MJDCgdyGuVKxKBvtMI1eVCydHkwUk4tOzZFn3FM5/1i4Xn1zt7pmzcngqnjx2cyA gs4/geUuK7pawmBc3YEviXvwNZZuIB5c+A8IIBt2ajrOSJ1eCfMJSp3S7wz6CYvwbC7rD8nHTjKpn JNZLWOIRZC3OwEuNsITsCCSNo/QI7eAEuJos6h6QASx2ugRlDPkex7aQUFHUdPLR8CEFVg30+/xx1 ty7jZ4GvFmXeEoKoKc7+Q2xaDfRhQK5qAXQDCkrsZ4aKyJEfk9BhS0yl1Pws8NB9qd1TXQEAqRDJ1 hY40in/Q==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fj4wM-0004Ln-KJ; Fri, 27 Jul 2018 15:46:02 +0000 Subject: Re: [PATCH] hostap: hide unused procfs helpers To: YueHaibing , Kalle Valo , Arend van Spriel Cc: j@w1.fi, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, davem@davemloft.net References: <20180713070317.6724-1-yuehaibing@huawei.com> <5B485441.1080305@broadcom.com> <87r2jpvxme.fsf@codeaurora.org> <9c6401cd-c04c-1230-d360-922b476c6541@huawei.com> From: Randy Dunlap Message-ID: Date: Fri, 27 Jul 2018 08:46:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <9c6401cd-c04c-1230-d360-922b476c6541@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/27/2018 03:03 AM, YueHaibing wrote: > On 2018/7/27 17:25, Kalle Valo wrote: >> Arend van Spriel writes: >> >>> + Randy >>> >>> On 7/13/2018 9:03 AM, YueHaibing wrote: >>>> When CONFIG_PROC_FS isn't set, gcc warning this: >>>> >>>> drivers/net/wireless/intersil/hostap/hostap_hw.c:2901:12: warning: ‘prism2_registers_proc_show’ defined but not used [-Wunused-function] >>>> static int prism2_registers_proc_show(struct seq_file *m, void *v) >>>> >>>> drivers/net/wireless/intersil/hostap/hostap_proc.c:16:12: warning: ‘prism2_debug_proc_show’ defined but not used [-Wunused-function] >>>> static int prism2_debug_proc_show(struct seq_file *m, void *v) >>>> ^ >>>> drivers/net/wireless/intersil/hostap/hostap_proc.c:49:12: warning: ‘prism2_stats_proc_show’ defined but not used [-Wunused-function] >>>> static int prism2_stats_proc_show(struct seq_file *m, void *v) >>>> ^ >>>> drivers/net/wireless/intersil/hostap/hostap_proc.c:177:12: warning: ‘prism2_crypt_proc_show’ defined but not used [-Wunused-function] >>>> static int prism2_crypt_proc_show(struct seq_file *m, void *v) >>>> ^ >>>> >>>> fix this by adding #ifdef around them. >>>> hfa384x_read_reg is only used by prism2_registers_proc_show,so move it >>>> into #ifdef. >>> >>> There was already a fix for this posted by Randy Dunlap taking a >>> different approach, ie. use __maybe_unused classifier. To be honest I >>> prefer the ifdef approach as it is more explicit and does not feel >>> like a cheat. >> >> I also prefer the ifdef approach more so I'm planning to take this >> patch. > > It's ok if you prefer pick this. Right. -- ~Randy