Skip to contentSkip to conversation

drm/nouveau/gsp: simplify code with acpi_get_local_u64_address()

PATCH Applied Andy Shevchenko 2 participants 3 messages Jan 20 – Feb 8

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau/gsp: simplify code with acpi_get_local_u64_address()

Now we have a helper so there's no need to open-code.

---
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c +4 -3
index 2a7e80c6d70f..c675324693af 100644
@@ -796,7 +796,8 @@ r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode,
 	struct acpi_object_list input = { 1, &mux_arg };
 	acpi_handle iter = NULL, handle_mux = NULL;
 	acpi_status status;
-	unsigned long long value;
+	u64 value;
+	int ret;
 
 	mode->status = 0xffff;
 	part->status = 0xffff;
@@ -806,8 +807,8 @@ r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode,
 		if (ACPI_FAILURE(status) || !iter)
 			return;
 
-		status = acpi_evaluate_integer(iter, "_ADR", NULL, &value);
-		if (ACPI_FAILURE(status) || value != id)
+		ret = acpi_get_local_u64_address(iter, &value);
+		if (ret || value != id)
 			continue;
 
 		handle_mux = iter;
Signature · 1 line
2.50.1
#1 lore raw
Quoted 1 line · Andy Shevchenko

Now we have a helper so there's no need to open-code.

Anybody to comment on this?

Signature · 2 lines
With Best Regards,
Andy Shevchenko