ACPI: change acpi_sleep_proc_init() to return void.
PATCH 1/1 ACPI: change acpi_sleep_proc_init() to return void.
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.
--- drivers/acpi/internal.h | 4 ++-- drivers/acpi/proc.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/acpi/internal.h +2 -2
@@ -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 ; }
drivers/acpi/proc.c +1 -3
@@ -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 ; }
Signature · 1 line
2.4.3
Hi,
Quoted 20 lines
From: [email protected] [mailto:[email protected]] On Behalf Of Rami Rosen
Sent: Friday, September 11, 2015 10:49 PMThis 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 <[email protected]>--- drivers/acpi/internal.h | 4 ++-- drivers/acpi/proc.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-)drivers/acpi/internal.h +0
-0@@ -179,13 +179,13 @@ static inline int acpi_sleep_init(void) { return -ENXIO; }#endif
drivers/acpi/internal.h static inline int acpi_sleep_init(void) { return -ENXIO; } · line 188
Quoted 10 lines
drivers/acpi/internal.h +2
-2#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
Quoted 27 lines
drivers/acpi/internal.h +0
-0static inline int suspend_nvs_alloc (void ) {return 0 ; }static inline void suspend_nvs_free (void ) {}static inline int suspend_nvs_save (void ) {return 0 ; }drivers/acpi/proc.c +1
-4@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html