ACPI: PM: s2idle: Remove useless variable ‘obj_new’ in lpi_device_get_constraints_amd
PATCH 1/1 ACPI: PM: s2idle: Remove useless variable ‘obj_new’ in lpi_device_get_constraints_amd
Fix warning:drivers/acpi/x86/s2idle.c:138:25: warning: variable ‘obj_new’ set but not used [-Wunused-but-set-variable]
union acpi_object *obj_new;
^~~~~~~Reported-by Hulk Robot <[email protected]>
Signed-off-by Ye Bin <[email protected]>
--- drivers/acpi/x86/s2idle.c | 2 -- 1 file changed, 2 deletions(-)
drivers/acpi/x86/s2idle.c +0 -2
@@ -135,12 +135,10 @@ static void lpi_device_get_constraints_amd(void)for (k =0 ; k < info_obj->package.count; ++k) {union acpi_object *obj = &info_obj->package.elements[k]; -union acpi_object *obj_new; list = &lpi_constraints_table[lpi_constraints_table_size]; list->min_dstate =-1 ; - obj_new = &obj[k];switch (k) {case 0 : dev_info.enabled = obj->integer.value;
Signature · 1 line
2.16.2.dirty
Rafael J. Wysocki
maintainerQuoted 20 lines · Ye Bin
Fix warning:
drivers/acpi/x86/s2idle.c:138:25: warning: variable ‘obj_new’ set but not used [-Wunused-but-set-variable]union acpi_object *obj_new; ^~~~~~~Reported-by Hulk Robot <[email protected]>Signed-off-by Ye Bin <[email protected]>--- drivers/acpi/x86/s2idle.c | 2 -- 1 file changed, 2 deletions(-)drivers/acpi/x86/s2idle.c +0
-0@@ -135,12 +135,10 @@ static void lpi_device_get_constraints_amd(void)for (k =0 ; k < info_obj->package.count; ++k) {union acpi_object *obj = &info_obj->package.elements[k];
drivers/acpi/x86/s2idle.c static void lpi_device_get_constraints_amd(void)
Quoted 10 lines
drivers/acpi/x86/s2idle.c +0
-3-union acpi_object *obj_new; list = &lpi_constraints_table[lpi_constraints_table_size]; list->min_dstate =-1 ; - obj_new = &obj[k];switch (k) {case 0 : dev_info.enabled = obj->integer.value; --
I posted an alternative fix for this issue on Tue, sorry:
https://patchwork.kernel.org/project/linux-pm/patch/3607102.xkEKTzvHZR@kreacher/