mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI: x86: s2idle: Remove dead code in lps0_device_attach()
@ 2026-01-09  0:16 Gergo Koteles
  2026-01-09 16:19 ` Mario Limonciello
  0 siblings, 1 reply; 3+ messages in thread
From: Gergo Koteles @ 2026-01-09  0:16 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Mario Limonciello (AMD)
  Cc: linux-acpi, linux-kernel, Gergo Koteles

The rev_id is always 0 for AMD since commit
e32d546483a2 ("ACPI: x86: Drop quirk for HP Elitebook"),
so this condition will never be true.

Remove the dead code.

Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
 drivers/acpi/x86/s2idle.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index 6d4d06236f61..a095b6f4401b 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -459,9 +459,6 @@ static int lps0_device_attach(struct acpi_device *adev,
 			lps0_dsm_func_mask = (lps0_dsm_func_mask << 1) | 0x1;
 			acpi_handle_debug(adev->handle, "_DSM UUID %s: Adjusted function mask: 0x%x\n",
 					  ACPI_LPS0_DSM_UUID_AMD, lps0_dsm_func_mask);
-		} else if (lps0_dsm_func_mask_microsoft > 0 && rev_id) {
-			lps0_dsm_func_mask_microsoft = -EINVAL;
-			acpi_handle_debug(adev->handle, "_DSM Using AMD method\n");
 		}
 	} else {
 		rev_id = 1;
-- 
2.52.0


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

* Re: [PATCH] ACPI: x86: s2idle: Remove dead code in lps0_device_attach()
  2026-01-09  0:16 [PATCH] ACPI: x86: s2idle: Remove dead code in lps0_device_attach() Gergo Koteles
@ 2026-01-09 16:19 ` Mario Limonciello
  2026-01-22 20:47   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2026-01-09 16:19 UTC (permalink / raw)
  To: Gergo Koteles, Rafael J. Wysocki, Len Brown; +Cc: linux-acpi, linux-kernel

On 1/8/26 6:16 PM, Gergo Koteles wrote:
> The rev_id is always 0 for AMD since commit
> e32d546483a2 ("ACPI: x86: Drop quirk for HP Elitebook"),
> so this condition will never be true.
> 
> Remove the dead code.
> 
> Signed-off-by: Gergo Koteles <soyer@irl.hu>

Makes sense, thanks!

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

> ---
>   drivers/acpi/x86/s2idle.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
> index 6d4d06236f61..a095b6f4401b 100644
> --- a/drivers/acpi/x86/s2idle.c
> +++ b/drivers/acpi/x86/s2idle.c
> @@ -459,9 +459,6 @@ static int lps0_device_attach(struct acpi_device *adev,
>   			lps0_dsm_func_mask = (lps0_dsm_func_mask << 1) | 0x1;
>   			acpi_handle_debug(adev->handle, "_DSM UUID %s: Adjusted function mask: 0x%x\n",
>   					  ACPI_LPS0_DSM_UUID_AMD, lps0_dsm_func_mask);
> -		} else if (lps0_dsm_func_mask_microsoft > 0 && rev_id) {
> -			lps0_dsm_func_mask_microsoft = -EINVAL;
> -			acpi_handle_debug(adev->handle, "_DSM Using AMD method\n");
>   		}
>   	} else {
>   		rev_id = 1;


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

* Re: [PATCH] ACPI: x86: s2idle: Remove dead code in lps0_device_attach()
  2026-01-09 16:19 ` Mario Limonciello
@ 2026-01-22 20:47   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2026-01-22 20:47 UTC (permalink / raw)
  To: Mario Limonciello, Gergo Koteles; +Cc: linux-acpi, linux-kernel

On Fri, Jan 9, 2026 at 5:19 PM Mario Limonciello <superm1@kernel.org> wrote:
>
> On 1/8/26 6:16 PM, Gergo Koteles wrote:
> > The rev_id is always 0 for AMD since commit
> > e32d546483a2 ("ACPI: x86: Drop quirk for HP Elitebook"),
> > so this condition will never be true.
> >
> > Remove the dead code.
> >
> > Signed-off-by: Gergo Koteles <soyer@irl.hu>
>
> Makes sense, thanks!
>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

Applied as 6.20 material, thanks!

> > ---
> >   drivers/acpi/x86/s2idle.c | 3 ---
> >   1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
> > index 6d4d06236f61..a095b6f4401b 100644
> > --- a/drivers/acpi/x86/s2idle.c
> > +++ b/drivers/acpi/x86/s2idle.c
> > @@ -459,9 +459,6 @@ static int lps0_device_attach(struct acpi_device *adev,
> >                       lps0_dsm_func_mask = (lps0_dsm_func_mask << 1) | 0x1;
> >                       acpi_handle_debug(adev->handle, "_DSM UUID %s: Adjusted function mask: 0x%x\n",
> >                                         ACPI_LPS0_DSM_UUID_AMD, lps0_dsm_func_mask);
> > -             } else if (lps0_dsm_func_mask_microsoft > 0 && rev_id) {
> > -                     lps0_dsm_func_mask_microsoft = -EINVAL;
> > -                     acpi_handle_debug(adev->handle, "_DSM Using AMD method\n");
> >               }
> >       } else {
> >               rev_id = 1;
>

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

end of thread, other threads:[~2026-01-22 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-09  0:16 [PATCH] ACPI: x86: s2idle: Remove dead code in lps0_device_attach() Gergo Koteles
2026-01-09 16:19 ` Mario Limonciello
2026-01-22 20:47   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®