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: <ade2d23b-bfc9-b828-aa18-ff5e1c87a40d@huawei.com>
Date:   Fri, 13 Jul 2018 17:29:18 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <rjw@...ysocki.net>, <lenb@...nel.org>
CC:     <linux-kernel@...r.kernel.org>, <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH] ACPI: button: hide unused procfs helpers

sorry for noise,there has a fix:

[PATCH] acpi/button.c: fix defined but not used warning
https://lkml.org/lkml/2018/7/11/231

On 2018/7/13 15:19, YueHaibing wrote:
> When CONFIG_PROC_FS isn't set, gcc warning this:
> 
> drivers/acpi/button.c:255:12: warning: ‘acpi_button_state_seq_show’ defined but not used [-Wunused-function]
>  static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
>             ^
> fix this by adding #ifdef around it.
> 
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  drivers/acpi/button.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
> index 2345a5e..8538e25 100644
> --- a/drivers/acpi/button.c
> +++ b/drivers/acpi/button.c
> @@ -252,6 +252,7 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
>  	return ret;
>  }
>  
> +#ifdef CONFIG_PROC_FS
>  static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
>  {
>  	struct acpi_device *device = seq->private;
> @@ -262,6 +263,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
>  		   state < 0 ? "unsupported" : (state ? "open" : "closed"));
>  	return 0;
>  }
> +#endif
>  
>  static int acpi_button_add_fs(struct acpi_device *device)
>  {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ