From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Jan Moskyto Matejka" <mq@suse.cz>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jslaby@suse.cz>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [linux-next] serial: sc16is7xx: fix defined-but-not-used warnings
Date: Wed, 30 Apr 2014 17:10:03 +0400 [thread overview]
Message-ID: <1398863403.902420096@f316.i.mail.ru> (raw)
In-Reply-To: <1398863224-19900-1-git-send-email-mq@suse.cz>
Wed, 30 Apr 2014 15:07:04 +0200 от Jan Moskyto Matejka <mq@suse.cz>:
> drivers/tty/serial/sc16is7xx.c:1060:12: warning: 'sc16is7xx_probe' defined but not used [-Wunused-function]
> static int sc16is7xx_probe(struct device *dev,
> ^
> drivers/tty/serial/sc16is7xx.c:1176:12: warning: 'sc16is7xx_remove' defined but not used [-Wunused-function]
> static int sc16is7xx_remove(struct device *dev)
> ^
> drivers/tty/serial/sc16is7xx.c:1215:29: warning: 'regcfg' defined but not used [-Wunused-variable]
> static struct regmap_config regcfg = {
> ^
>
> Fixed these warnings by #ifdef-ing them to CONFIG_REGMAP_I2C and
> recursively #ifdef-ing also some other functions that got defined but not used.
>
> Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
> ---
> drivers/tty/serial/sc16is7xx.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
> index 7206a64..bd76277 100644
> --- a/drivers/tty/serial/sc16is7xx.c
> +++ b/drivers/tty/serial/sc16is7xx.c
> @@ -389,6 +389,7 @@ static const struct sc16is7xx_devtype sc16is762_devtype = {
> .nr_uart = 2,
> };
>
> +#ifdef CONFIG_REGMAP_I2C
> static bool sc16is7xx_regmap_volatile(struct device *dev, unsigned int reg)
No. This is not a good way.
The Kconfig should be patched for dependency of I2C.
---
prev parent reply other threads:[~2014-04-30 13:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 13:07 [PATCH] [linux-next] serial: sc16is7xx: fix defined-but-not-used warnings Jan Moskyto Matejka
2014-04-30 13:10 ` Alexander Shiyan [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=1398863403.902420096@f316.i.mail.ru \
--to=shc_work@mail.ru \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mq@suse.cz \
/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