Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1000203imm; Fri, 13 Jul 2018 09:45:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe4EIjf1G6fBamOX6q4SpZR5xjlh+f++PE3wk93AWaPpB0Dl5cIBb9V7R9bxJ3wr66IaT+F X-Received: by 2002:a17:902:820a:: with SMTP id x10-v6mr7139248pln.261.1531500310295; Fri, 13 Jul 2018 09:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531500310; cv=none; d=google.com; s=arc-20160816; b=GDXHZ1TsnDrXWPQELW4SCNblxP1P6Cl09qMeyb3e0/+F30SCZi4B/HJGU2QWiq3nuK V9IWMgd5eKa3VEdPH1rv4MmFkmVbDrs8m0ZwnHQ3DS+PqYZ33lJZB9zGnnXmF2RXkwih 7ReaXAR0khNA85UpPSuWoBIthITKzxZuYUFD7vpuBehrzX8RcxUMcw0EXBXShKJFU1se KOWZX4zrSaAIDabY0kEGKMY7Rt0Uv1z4CWqz78zcn9Z9XnQjjhkUDbCLcYWhbRQKD+GV sTpggRmO9dl4GIdAL7Ob/AGX5Zt6z2h77srxroM8s8wnHY3VFXdCwu4Dl62dJTHvyE5f iTGA== 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=6Nm04pnDekcA+lc3AskuXThditEW148sN/pMoikKjFE=; b=MJJsIVJ8Ng+Lif3ILWXC/JYDEWpMj7TTfI32i2VY3azNBWVXz5xhe7O0YVXljhKwn9 g+8obPU9TSUPpYrU3Gp6QW6Z1mgo4gCiss7SBJ/9/We04rymerJLwwXDre/FuH+26+0p Gk8AePbAkaRbXwd0Koe6P4wuBYuipEWFKmFncKKcQQFcEzmxHMk0hfG/FN5fCSVZGzdo WeWyYCx/dcuAcT+QjjIN2B6HoCg8SoAOdYz8ynwefPOvxZ5gF4ovSv/Oyy0qxJKzlitf znLrIB0AoO7izWh6o1+9VRrnqEqj9muUGL1oP8/IvIr7gc33ZqZcd0kRTmyB2g05fcL1 B6WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=aRiEFt6O; 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 z68-v6si7951561pfz.163.2018.07.13.09.44.55; Fri, 13 Jul 2018 09:45:10 -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=bombadil.20170209 header.b=aRiEFt6O; 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 S2387780AbeGMQ6c (ORCPT + 99 others); Fri, 13 Jul 2018 12:58:32 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40012 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729626AbeGMQ6c (ORCPT ); Fri, 13 Jul 2018 12:58:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=6Nm04pnDekcA+lc3AskuXThditEW148sN/pMoikKjFE=; b=aRiEFt6OWlllsepPLaJWId1ua I/jgn7m2S+fNj58Qk+aAp/E+mDKevkc5CvhudfcGErY84aN38QHJUvsAbDL1ZPo0CtMtIyykXVvjL iGjAb9xBmPS+bSP1qkf2qBOPfExRZVAE+Z+ShCDgPzFJui5b/GqLut6wimM8oXUvbH/KSMn98dcew 0m9Q377EQ40ZNotJnxgDniBAu6aOtjDLSGLiJJvmJ2HVjZ9+p5kQ7k+42VZM7Sz72q9wrxWhVDcHB EOUBVTENwP4sJue4tBwqv4Bq7oVhaHsKqXyZxuCEd/ySn37qXXzXiW0WXIIaJZ1gLlADlwhcaB/Ub BvRGoZ2Kg==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fe19u-0005ah-0o; Fri, 13 Jul 2018 16:43:06 +0000 Subject: Re: [PATCH] hostap: hide unused procfs helpers To: Arend van Spriel , YueHaibing , j@w1.fi, kvalo@codeaurora.org Cc: 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> From: Randy Dunlap Message-ID: <7a2dee6c-eca3-ca0f-8af6-2ecc14f6d0a9@infradead.org> Date: Fri, 13 Jul 2018 09:43:05 -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: <5B485441.1080305@broadcom.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/13/2018 12:26 AM, Arend van Spriel wrote: > + 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. Hi, You are welcome to merge (or ack or have someone else merge) either of them. I'm not counting patches, just trying to help out (in this case by reducing noise). > Actually some of the functions are between a flag already PRISM2_NO_PROCFS_DEBUG which is in a private header file hostap_config.h. Seems like this would be better placed in Kconfig and depend on CONFIG_PROCFS. Anyway, this driver is old cruft. Maybe some people are still running it, but it is probably not worth the effort so fine with either fix. > > Regards, > Arend -- ~Randy