Skip to contentSkip to conversation

ACPI: x86: s2idle: Remove dead code in lps0_device_attach()

PATCH Applied Gergo Koteles 3 participants 3 messages Jan 9 – Jan 22 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: x86: s2idle: Remove dead code in lps0_device_attach()

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.

---
 drivers/acpi/x86/s2idle.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/acpi/x86/s2idle.c +0 -3
index 6d4d06236f61..a095b6f4401b 100644
@@ -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;
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · 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.

Makes sense, thanks!

Quoted 18 lines
---
  drivers/acpi/x86/s2idle.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/acpi/x86/s2idle.c +0 -3
index 6d4d06236f61..a095b6f4401b 100644
@@ -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;
maintainer Applied
#2 lore raw
Quoted 6 lines · Mario Limonciello
Quoted 4 lines · 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.

Quoted 7 lines
Quoted 3 lines

Remove the dead code.

Makes sense, thanks!

Applied as 6.20 material, thanks!

Quoted 19 lines
Quoted 18 lines
---
  drivers/acpi/x86/s2idle.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/acpi/x86/s2idle.c +0 -3
index 6d4d06236f61..a095b6f4401b 100644
@@ -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;