Message ID | 20200507011711.492266-1-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | acpi/method/battery: check method returning integer 0 & 1 | expand |
On 5/7/20 9:17 AM, Alex Hung wrote: > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/devices/battery/battery.c | 4 ++-- > src/acpi/method/method.c | 8 ++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/acpi/devices/battery/battery.c b/src/acpi/devices/battery/battery.c > index 74565169..72d8e377 100644 > --- a/src/acpi/devices/battery/battery.c > +++ b/src/acpi/devices/battery/battery.c > @@ -449,7 +449,7 @@ static int method_test_BMA(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device, > - "_BMA", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA"); > } > > static int method_test_BMS(fwts_framework *fw) > @@ -459,7 +459,7 @@ static int method_test_BMS(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device, > - "_BMS", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS"); > } > > static void method_test_BST_return( > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index 81e01fbb..07eec496 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -1127,10 +1127,10 @@ static int method_test_CCA(fwts_framework *fw) > { > if (fw->flags & FWTS_FLAG_TEST_SBBR) > return method_evaluate_method(fw, METHOD_MANDATORY, > - "_CCA", NULL, 0, fwts_method_test_integer_return, NULL); > + "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA"); > else > return method_evaluate_method(fw, METHOD_OPTIONAL, > - "_CCA", NULL, 0, fwts_method_test_integer_return, NULL); > + "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA"); > } > > /* > @@ -4157,7 +4157,7 @@ static int method_test_BMA(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return method_evaluate_method(fw, METHOD_MOBILE, > - "_BMA", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA"); > } > > static int method_test_BMS(fwts_framework *fw) > @@ -4167,7 +4167,7 @@ static int method_test_BMS(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return method_evaluate_method(fw, METHOD_MOBILE, > - "_BMS", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS"); > } > > static void method_test_BST_return( > Acked-by: Ivan Hu <ivan.hu@canonical.com>
On 07/05/2020 02:17, Alex Hung wrote: > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/devices/battery/battery.c | 4 ++-- > src/acpi/method/method.c | 8 ++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/acpi/devices/battery/battery.c b/src/acpi/devices/battery/battery.c > index 74565169..72d8e377 100644 > --- a/src/acpi/devices/battery/battery.c > +++ b/src/acpi/devices/battery/battery.c > @@ -449,7 +449,7 @@ static int method_test_BMA(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device, > - "_BMA", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA"); > } > > static int method_test_BMS(fwts_framework *fw) > @@ -459,7 +459,7 @@ static int method_test_BMS(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device, > - "_BMS", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS"); > } > > static void method_test_BST_return( > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index 81e01fbb..07eec496 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -1127,10 +1127,10 @@ static int method_test_CCA(fwts_framework *fw) > { > if (fw->flags & FWTS_FLAG_TEST_SBBR) > return method_evaluate_method(fw, METHOD_MANDATORY, > - "_CCA", NULL, 0, fwts_method_test_integer_return, NULL); > + "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA"); > else > return method_evaluate_method(fw, METHOD_OPTIONAL, > - "_CCA", NULL, 0, fwts_method_test_integer_return, NULL); > + "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA"); > } > > /* > @@ -4157,7 +4157,7 @@ static int method_test_BMA(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return method_evaluate_method(fw, METHOD_MOBILE, > - "_BMA", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA"); > } > > static int method_test_BMS(fwts_framework *fw) > @@ -4167,7 +4167,7 @@ static int method_test_BMS(fwts_framework *fw) > arg[0].Integer.Value = 1; > > return method_evaluate_method(fw, METHOD_MOBILE, > - "_BMS", arg, 1, fwts_method_test_integer_return, NULL); > + "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS"); > } > > static void method_test_BST_return( > Acked-by: Colin Ian King <colin.king@canonical.com>
diff --git a/src/acpi/devices/battery/battery.c b/src/acpi/devices/battery/battery.c index 74565169..72d8e377 100644 --- a/src/acpi/devices/battery/battery.c +++ b/src/acpi/devices/battery/battery.c @@ -449,7 +449,7 @@ static int method_test_BMA(fwts_framework *fw) arg[0].Integer.Value = 1; return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device, - "_BMA", arg, 1, fwts_method_test_integer_return, NULL); + "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA"); } static int method_test_BMS(fwts_framework *fw) @@ -459,7 +459,7 @@ static int method_test_BMS(fwts_framework *fw) arg[0].Integer.Value = 1; return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device, - "_BMS", arg, 1, fwts_method_test_integer_return, NULL); + "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS"); } static void method_test_BST_return( diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index 81e01fbb..07eec496 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -1127,10 +1127,10 @@ static int method_test_CCA(fwts_framework *fw) { if (fw->flags & FWTS_FLAG_TEST_SBBR) return method_evaluate_method(fw, METHOD_MANDATORY, - "_CCA", NULL, 0, fwts_method_test_integer_return, NULL); + "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA"); else return method_evaluate_method(fw, METHOD_OPTIONAL, - "_CCA", NULL, 0, fwts_method_test_integer_return, NULL); + "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA"); } /* @@ -4157,7 +4157,7 @@ static int method_test_BMA(fwts_framework *fw) arg[0].Integer.Value = 1; return method_evaluate_method(fw, METHOD_MOBILE, - "_BMA", arg, 1, fwts_method_test_integer_return, NULL); + "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA"); } static int method_test_BMS(fwts_framework *fw) @@ -4167,7 +4167,7 @@ static int method_test_BMS(fwts_framework *fw) arg[0].Integer.Value = 1; return method_evaluate_method(fw, METHOD_MOBILE, - "_BMS", arg, 1, fwts_method_test_integer_return, NULL); + "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS"); } static void method_test_BST_return(
Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/acpi/devices/battery/battery.c | 4 ++-- src/acpi/method/method.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)