acpi: fix &&/|| confusion in acpi_evaluate_string() (in comment)
PATCH 2/7 acpi: fix &&/|| confusion in acpi_evaluate_string() (in comment)
From: Roel Kluin <[email protected]>
This always evaluates to true.
It's between an #if 0 ... #endif.
Signed-off-by Roel Kluin <[email protected]>
Cc Len Brown <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/acpi/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/utils.c renamed from drivers/acpi/utils.c~acpi-fix-confusion-in-acpi_evaluate_string-in-comment +1 -1
@@ -312,7 +312,7 @@ acpi_evaluate_string(acpi_handle handle, element = (acpi_object *) buffer.pointer;if ((element->type !=ACPI_TYPE_STRING ) - || (element->type !=ACPI_TYPE_BUFFER ) + && (element->type !=ACPI_TYPE_BUFFER ) || !element->string.length) {acpi_util_eval_error (handle, pathname,AE_BAD_DATA );return AE_BAD_DATA ;
_
Len Brown
reviewerI think I'll just delete the dead acpi_evaluate_string() instead.
thanks for pointing it out,
Len Brown, Intel Open Source Technology Center
Quoted 28 lines · On Tue, 2 Feb 2010, [email protected] wrote:
From: Roel Kluin <[email protected]>
This always evaluates to true.
It's between an #if 0 ... #endif.
Signed-off-by Roel Kluin <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/acpi/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff -puN
drivers/acpi/utils.c~acpi-fix-confusion-in-acpi_evaluate_string-in-commentdrivers/acpi/utils.cdrivers/acpi/utils.c renamed from drivers/acpi/utils.c~acpi-fix-confusion-in-acpi_evaluate_string-in-comment +1
-1@@ -312,7 +312,7 @@ acpi_evaluate_string(acpi_handle handle, element = (acpi_object *) buffer.pointer;if ((element->type !=ACPI_TYPE_STRING ) - || (element->type !=ACPI_TYPE_BUFFER ) + && (element->type !=ACPI_TYPE_BUFFER ) || !element->string.length) {acpi_util_eval_error (handle, pathname,AE_BAD_DATA );return AE_BAD_DATA ;_