drm/nouveau/gsp: simplify code with acpi_get_local_u64_address()
Subsystems (3)
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.
Signed-off-by Andy Shevchenko <[email protected]>
--- 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
@@ -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
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
Quoted 3 lines · Andy Shevchenko
Now we have a helper so there's no need to open-code.
Signed-off-by Andy Shevchenko <[email protected]>
Applied to drm-misc-next, thanks!