lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1398863403.902420096@f316.i.mail.ru>
Date:	Wed, 30 Apr 2014 17:10:03 +0400
From:	Alexander Shiyan <shc_work@...l.ru>
To:	Jan Moskyto Matejka <mq@...e.cz>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>,
	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [linux-next] serial: sc16is7xx: fix defined-but-not-used warnings

Wed, 30 Apr 2014 15:07:04 +0200 от Jan Moskyto Matejka <mq@...e.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@...e.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.

---

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ