Message ID | 20200519225224.1479976-1-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | fwts_acpi_object_eval: revise fwts_method_test_passed_failed_return | expand |
On 19/05/2020 23:52, Alex Hung wrote: > Some ACPI methods use 0/1 as pass/fail, some use 1/0 as pass/fail, and > some others just return 0 or 1. > > Revise error messages without specifying which pair since users can look > up correct definitions in ACPI spec. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/lib/src/fwts_acpi_object_eval.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c > index d72aa460..2547f134 100644 > --- a/src/lib/src/fwts_acpi_object_eval.c > +++ b/src/lib/src/fwts_acpi_object_eval.c > @@ -949,11 +949,11 @@ void fwts_method_test_passed_failed_return( > else { > fwts_failed(fw, LOG_LEVEL_CRITICAL, > "MethodReturnZeroOrOne", > - "%s returned 0x%8.8" PRIx32 ", should return 1 " > - "(success) or 0 (failed).", method, val); > + "%s returned 0x%8.8" PRIx32 ", should return 0 " > + "or 1.", method, val); > fwts_advice(fw, > "Method %s should be returning the correct " > - "1/0 success/failed return values. " > + "0 or 1 return values. " > "Unexpected behaviour may occur becauses of " > "this error, the AML code does not conform to " > "the ACPI specification and should be fixed.", > Acked-by: Colin Ian King <colin.king@canonical.com>
On 5/20/20 6:52 AM, Alex Hung wrote: > Some ACPI methods use 0/1 as pass/fail, some use 1/0 as pass/fail, and > some others just return 0 or 1. > > Revise error messages without specifying which pair since users can look > up correct definitions in ACPI spec. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/lib/src/fwts_acpi_object_eval.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c > index d72aa460..2547f134 100644 > --- a/src/lib/src/fwts_acpi_object_eval.c > +++ b/src/lib/src/fwts_acpi_object_eval.c > @@ -949,11 +949,11 @@ void fwts_method_test_passed_failed_return( > else { > fwts_failed(fw, LOG_LEVEL_CRITICAL, > "MethodReturnZeroOrOne", > - "%s returned 0x%8.8" PRIx32 ", should return 1 " > - "(success) or 0 (failed).", method, val); > + "%s returned 0x%8.8" PRIx32 ", should return 0 " > + "or 1.", method, val); > fwts_advice(fw, > "Method %s should be returning the correct " > - "1/0 success/failed return values. " > + "0 or 1 return values. " > "Unexpected behaviour may occur becauses of " > "this error, the AML code does not conform to " > "the ACPI specification and should be fixed.", > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c index d72aa460..2547f134 100644 --- a/src/lib/src/fwts_acpi_object_eval.c +++ b/src/lib/src/fwts_acpi_object_eval.c @@ -949,11 +949,11 @@ void fwts_method_test_passed_failed_return( else { fwts_failed(fw, LOG_LEVEL_CRITICAL, "MethodReturnZeroOrOne", - "%s returned 0x%8.8" PRIx32 ", should return 1 " - "(success) or 0 (failed).", method, val); + "%s returned 0x%8.8" PRIx32 ", should return 0 " + "or 1.", method, val); fwts_advice(fw, "Method %s should be returning the correct " - "1/0 success/failed return values. " + "0 or 1 return values. " "Unexpected behaviour may occur becauses of " "this error, the AML code does not conform to " "the ACPI specification and should be fixed.",
Some ACPI methods use 0/1 as pass/fail, some use 1/0 as pass/fail, and some others just return 0 or 1. Revise error messages without specifying which pair since users can look up correct definitions in ACPI spec. Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/lib/src/fwts_acpi_object_eval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)