Re: [PATCH] platform/x86: Use ACPI_FAILURE at appropriate places

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hmh@xxxxxxxxxx>

> 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
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux