From: YueHaibing <yuehaibing@huawei.com>
To: <isdn@linux-pingi.de>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<keescook@chromium.org>, <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] isdn/capi: hide unused procfs helpers
Date: Fri, 13 Jul 2018 17:33:31 +0800 [thread overview]
Message-ID: <73c5ff9a-1da9-d42a-6b68-ae90fcf77f49@huawei.com> (raw)
In-Reply-To: <20180713041114.16112-1-yuehaibing@huawei.com>
pls ignore this,there has a fix from Randy.
On 2018/7/13 12:11, YueHaibing wrote:
> When CONFIG_PROC_FS isn't set, gcc warning this:
>
> drivers/isdn/capi/capi.c:1324:12: warning: ‘capi20_proc_show’ defined but not used [-Wunused-function]
> static int capi20_proc_show(struct seq_file *m, void *v)
> ^
> drivers/isdn/capi/capi.c:1347:12: warning: ‘capi20ncci_proc_show’ defined but not used [-Wunused-function]
> static int capi20ncci_proc_show(struct seq_file *m, void *v)
> ^
> drivers/isdn/capi/capidrv.c:2454:12: warning: ‘capidrv_proc_show’ defined but not used [-Wunused-function]
> static int capidrv_proc_show(struct seq_file *m, void *v)
> ^
>
> We can fix the warning by adding the same #ifdef around them.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/isdn/capi/capi.c | 2 ++
> drivers/isdn/capi/capidrv.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
> index 6e0c281..594f767 100644
> --- a/drivers/isdn/capi/capi.c
> +++ b/drivers/isdn/capi/capi.c
> @@ -1317,6 +1317,7 @@ static inline void capinc_tty_exit(void) { }
>
> /* -------- /proc functions ----------------------------------------- */
>
> +#ifdef CONFIG_PROC_FS
> /*
> * /proc/capi/capi20:
> * minor applid nrecvctlpkt nrecvdatapkt nsendctlpkt nsenddatapkt
> @@ -1359,6 +1360,7 @@ static int capi20ncci_proc_show(struct seq_file *m, void *v)
> mutex_unlock(&capidev_list_lock);
> return 0;
> }
> +#endif
>
> static void __init proc_init(void)
> {
> diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
> index ee510f9..c6f45d7 100644
> --- a/drivers/isdn/capi/capidrv.c
> +++ b/drivers/isdn/capi/capidrv.c
> @@ -2447,6 +2447,7 @@ lower_callback(struct notifier_block *nb, unsigned long val, void *v)
> return NOTIFY_OK;
> }
>
> +#ifdef CONFIG_PROC_FS
> /*
> * /proc/capi/capidrv:
> * nrecvctlpkt nrecvdatapkt nsendctlpkt nsenddatapkt
> @@ -2460,6 +2461,7 @@ static int capidrv_proc_show(struct seq_file *m, void *v)
> global.ap.nsentdatapkt);
> return 0;
> }
> +#endif
>
> static void __init proc_init(void)
> {
>
prev parent reply other threads:[~2018-07-13 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 4:11 [PATCH] isdn/capi: hide unused procfs helpers YueHaibing
2018-07-13 9:33 ` YueHaibing [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73c5ff9a-1da9-d42a-6b68-ae90fcf77f49@huawei.com \
--to=yuehaibing@huawei.com \
--cc=isdn@linux-pingi.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox