[PATCH 2/2] acpi/method: check _PSC, _SxD and _SxW for max returned integers
Alex Hung
alex.hung at canonical.com
Thu May 7 20:26:03 UTC 2020
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/acpi/method/method.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 07eec496..254e1519 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -1533,8 +1533,9 @@ static int method_test_PS3(fwts_framework *fw)
static int method_test_PSC(fwts_framework *fw)
{
+ uint64_t max = 3;
return method_evaluate_method(fw, METHOD_OPTIONAL,
- "_PSC", NULL, 0, fwts_method_test_integer_return, NULL);
+ "_PSC", NULL, 0, fwts_method_test_integer_max_return, &max);
}
static int method_test_PSE(fwts_framework *fw)
@@ -1596,8 +1597,9 @@ static int method_test_PSW(fwts_framework *fw)
#define method_test_SxD(name) \
static int method_test ## name(fwts_framework *fw) \
{ \
+ uint64_t max = 3; \
return method_evaluate_method(fw, METHOD_OPTIONAL, \
- # name, NULL, 0, fwts_method_test_integer_return, # name); \
+ # name, NULL, 0, fwts_method_test_integer_max_return, &max); \
}
method_test_SxD(_S1D)
@@ -1608,8 +1610,9 @@ method_test_SxD(_S4D)
#define method_test_SxW(name) \
static int method_test ## name(fwts_framework *fw) \
{ \
+ uint64_t max = 3; \
return method_evaluate_method(fw, METHOD_OPTIONAL, \
- # name, NULL, 0, fwts_method_test_integer_return, # name); \
+ # name, NULL, 0, fwts_method_test_integer_max_return, &max); \
}
method_test_SxW(_S0W)
--
2.25.1
More information about the fwts-devel
mailing list