lkml.org 
[lkml]   [2021]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ACPI: PM: s2idle: Remove useless variabl e ‘obj new’ in lpi device get constraints amd
On Wed, Jan 6, 2021 at 2:13 AM Ye Bin <yebin10@huawei.com> wrote:
>
> 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 <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
> drivers/acpi/x86/s2idle.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
> index 25fea34b544c..e5fb17fd1020 100644
> --- a/drivers/acpi/x86/s2idle.c
> +++ b/drivers/acpi/x86/s2idle.c
> @@ -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;
> --

I posted an alternative fix for this issue on Tue, sorry:

https://patchwork.kernel.org/project/linux-pm/patch/3607102.xkEKTzvHZR@kreacher/

\
 
 \ /
  Last update: 2021-01-07 14:33    [W:0.044 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site