* [PATCH] ACPI: button: hide unused procfs helpers
@ 2018-07-13 7:19 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-07-13 7:19 UTC (permalink / raw)
To: rjw, lenb; +Cc: linux-kernel, linux-acpi, YueHaibing
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@huawei.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)
{
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ACPI: button: hide unused procfs helpers
@ 2018-07-13 7:19 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-07-13 7:19 UTC (permalink / raw)
To: rjw, lenb; +Cc: linux-kernel, linux-acpi, YueHaibing
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@huawei.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)
{
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: button: hide unused procfs helpers
2018-07-13 7:19 ` YueHaibing
@ 2018-07-13 9:29 ` YueHaibing
-1 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-07-13 9:29 UTC (permalink / raw)
To: rjw, lenb; +Cc: linux-kernel, linux-acpi
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@huawei.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)
> {
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: button: hide unused procfs helpers
@ 2018-07-13 9:29 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-07-13 9:29 UTC (permalink / raw)
To: rjw, lenb; +Cc: linux-kernel, linux-acpi
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@huawei.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)
> {
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-13 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 7:19 [PATCH] ACPI: button: hide unused procfs helpers YueHaibing
2018-07-13 7:19 ` YueHaibing
2018-07-13 9:29 ` YueHaibing
2018-07-13 9:29 ` YueHaibing
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.