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: <19389915.917i3WGPId@aspire.rjw.lan>
Date:   Wed, 11 Jul 2018 11:37:12 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     ACPI Devel Mailing List <linux-acpi@...r.kernel.org>,
        Len Brown <lenb@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] acpi/button.c: fix defined but not used warning

On Saturday, July 7, 2018 5:25:01 PM CEST Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@...radead.org>
> 
> Fix a build warning in the ACPI button driver when CONFIG_PROC_FS
> is not enabled by marking the unused function as __maybe_unused.
> 
> ../drivers/acpi/button.c:252:12: warning: 'acpi_button_state_seq_show' defined but not used [-Wunused-function]
> 
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: Len Brown <lenb@...nel.org>
> Cc: linux-acpi@...r.kernel.org
> ---
>  drivers/acpi/button.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> --- linux-next-20180706.orig/drivers/acpi/button.c
> +++ linux-next-20180706/drivers/acpi/button.c
> @@ -21,6 +21,7 @@
>  
>  #define pr_fmt(fmt) "ACPI: button: " fmt
>  
> +#include <linux/compiler.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
> @@ -249,7 +250,8 @@ static int acpi_lid_notify_state(struct
>  	return ret;
>  }
>  
> -static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
> +static int __maybe_unused acpi_button_state_seq_show(struct seq_file *seq,
> +						     void *offset)
>  {
>  	struct acpi_device *device = seq->private;
>  	int state;
> 

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ