All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: change acpi_sleep_proc_init() to return void.
@ 2015-09-11 14:49 Rami Rosen
  2015-09-14  3:32 ` Zheng, Lv
  0 siblings, 1 reply; 2+ messages in thread
From: Rami Rosen @ 2015-09-11 14:49 UTC (permalink / raw
  To: rafael.j.wysocki; +Cc: lenb, linux-acpi, Rami Rosen

This patch changes the type of the return value of the acpi_sleep_proc_init() 
method to be void, as this method never fails and its return value is never
used.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
 drivers/acpi/internal.h | 4 ++--
 drivers/acpi/proc.c     | 4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index 9e42621..685bcb6 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -179,13 +179,13 @@ static inline int acpi_sleep_init(void) { return -ENXIO; }
 #endif
 
 #ifdef CONFIG_ACPI_SLEEP
-int acpi_sleep_proc_init(void);
+void acpi_sleep_proc_init(void);
 int suspend_nvs_alloc(void);
 void suspend_nvs_free(void);
 int suspend_nvs_save(void);
 void suspend_nvs_restore(void);
 #else
-static inline int acpi_sleep_proc_init(void) { return 0; }
+static inline void acpi_sleep_proc_init(void) { return 0; }
 static inline int suspend_nvs_alloc(void) { return 0; }
 static inline void suspend_nvs_free(void) {}
 static inline int suspend_nvs_save(void) { return 0; }
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 75c28ea..2a35815 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -144,11 +144,9 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
 	.release = single_release,
 };
 
-int __init acpi_sleep_proc_init(void)
+void __init acpi_sleep_proc_init(void)
 {
 	/* 'wakeup device' [R/W] */
 	proc_create("wakeup", S_IFREG | S_IRUGO | S_IWUSR,
 		    acpi_root_dir, &acpi_system_wakeup_device_fops);
-
-	return 0;
 }
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] ACPI: change acpi_sleep_proc_init() to return void.
  2015-09-11 14:49 [PATCH] ACPI: change acpi_sleep_proc_init() to return void Rami Rosen
@ 2015-09-14  3:32 ` Zheng, Lv
  0 siblings, 0 replies; 2+ messages in thread
From: Zheng, Lv @ 2015-09-14  3:32 UTC (permalink / raw
  To: Rami Rosen, Wysocki, Rafael J; +Cc: lenb@kernel.org, linux-acpi@vger.kernel.org

Hi,

> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Rami Rosen
> Sent: Friday, September 11, 2015 10:49 PM
> 
> This patch changes the type of the return value of the acpi_sleep_proc_init()
> method to be void, as this method never fails and its return value is never
> used.
> 
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
> ---
>  drivers/acpi/internal.h | 4 ++--
>  drivers/acpi/proc.c     | 4 +---
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
> index 9e42621..685bcb6 100644
> --- a/drivers/acpi/internal.h
> +++ b/drivers/acpi/internal.h
> @@ -179,13 +179,13 @@ static inline int acpi_sleep_init(void) { return -ENXIO; }
>  #endif
> 
>  #ifdef CONFIG_ACPI_SLEEP
> -int acpi_sleep_proc_init(void);
> +void acpi_sleep_proc_init(void);
>  int suspend_nvs_alloc(void);
>  void suspend_nvs_free(void);
>  int suspend_nvs_save(void);
>  void suspend_nvs_restore(void);
>  #else
> -static inline int acpi_sleep_proc_init(void) { return 0; }
> +static inline void acpi_sleep_proc_init(void) { return 0; }

Has this line been tested?

Thanks
-Lv

>  static inline int suspend_nvs_alloc(void) { return 0; }
>  static inline void suspend_nvs_free(void) {}
>  static inline int suspend_nvs_save(void) { return 0; }
> diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
> index 75c28ea..2a35815 100644
> --- a/drivers/acpi/proc.c
> +++ b/drivers/acpi/proc.c
> @@ -144,11 +144,9 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
>  	.release = single_release,
>  };
> 
> -int __init acpi_sleep_proc_init(void)
> +void __init acpi_sleep_proc_init(void)
>  {
>  	/* 'wakeup device' [R/W] */
>  	proc_create("wakeup", S_IFREG | S_IRUGO | S_IWUSR,
>  		    acpi_root_dir, &acpi_system_wakeup_device_fops);
> -
> -	return 0;
>  }
> --
> 2.4.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-14  3:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 14:49 [PATCH] ACPI: change acpi_sleep_proc_init() to return void Rami Rosen
2015-09-14  3:32 ` Zheng, Lv

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.