On Mon, 19 Sep 2016, Axel Lin wrote:
> Use ACPI_FAILURE() to replace !ACPI_SUCCESS(), this avoid !! operations.

Surely no compiler is _that_ idiotic for it to make any difference to
generated code?

Anyway, it is arguably more readable, so I certainly have nothing
against the change on that grounds.


for the thinkpad-acpi bits:

Acked-by: Henrique de Moraes Holschuh <h...@hmh.eng.br>

> diff --git a/drivers/platform/x86/thinkpad_acpi.c 
> b/drivers/platform/x86/thinkpad_acpi.c
> index b65ce75..31fb979 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -9018,7 +9018,7 @@ static int mute_led_on_off(struct tp_led_table *t, bool 
> state)
>       acpi_handle temp;
>       int output;
>  
> -     if (!ACPI_SUCCESS(acpi_get_handle(hkey_handle, t->name, &temp))) {
> +     if (ACPI_FAILURE(acpi_get_handle(hkey_handle, t->name, &temp))) {
>               pr_warn("Thinkpad ACPI has no %s interface.\n", t->name);
>               return -EIO;
>       }

-- 
  Henrique Holschuh

------------------------------------------------------------------------------
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

Reply via email to