Message ID | 20210123021231.54136-5-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/7] acpi: method: refine _PSS and _TSS method tests | expand |
On 1/23/21 10:12 AM, Alex Hung wrote: > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/method/method.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index 61204f92..b9f463c8 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -1610,14 +1610,8 @@ static void method_test_Sx__return( > */ > > /* Something is really wrong if we don't have any elements in _Sx_ */ > - if (obj->Package.Count < 1) { > - fwts_failed(fw, LOG_LEVEL_HIGH, "Method_SxElementCount", > - "The kernel expects a package of at least two " > - "integers, and %s only returned %" PRIu32 > - " elements in the package.", > - name, obj->Package.Count); > + if (fwts_method_package_count_min(fw, name, obj, 1) != FWTS_OK) > return; > - } > > /* > * Oh dear, BIOS is conforming to the spec but won't work in > Acked-by: Ivan Hu <ivan.hu@canonical.com>
On 23/01/2021 02:12, Alex Hung wrote: > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/method/method.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index 61204f92..b9f463c8 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -1610,14 +1610,8 @@ static void method_test_Sx__return( > */ > > /* Something is really wrong if we don't have any elements in _Sx_ */ > - if (obj->Package.Count < 1) { > - fwts_failed(fw, LOG_LEVEL_HIGH, "Method_SxElementCount", > - "The kernel expects a package of at least two " > - "integers, and %s only returned %" PRIu32 > - " elements in the package.", > - name, obj->Package.Count); > + if (fwts_method_package_count_min(fw, name, obj, 1) != FWTS_OK) > return; > - } > > /* > * Oh dear, BIOS is conforming to the spec but won't work in > Acked-by: Colin Ian King <colin.king@canonical.com>
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index 61204f92..b9f463c8 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -1610,14 +1610,8 @@ static void method_test_Sx__return( */ /* Something is really wrong if we don't have any elements in _Sx_ */ - if (obj->Package.Count < 1) { - fwts_failed(fw, LOG_LEVEL_HIGH, "Method_SxElementCount", - "The kernel expects a package of at least two " - "integers, and %s only returned %" PRIu32 - " elements in the package.", - name, obj->Package.Count); + if (fwts_method_package_count_min(fw, name, obj, 1) != FWTS_OK) return; - } /* * Oh dear, BIOS is conforming to the spec but won't work in
Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/acpi/method/method.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)