Patchwork acpi: method: Add _INI (Init) sanity check

login
register
mail settings
Submitter Colin King
Date Jan. 9, 2013, 10:59 a.m.
Message ID <1357729148-10449-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/210691/
State Accepted
Headers show

Comments

Colin King - Jan. 9, 2013, 10:59 a.m.
From: Colin Ian King <colin.king@canonical.com>

Test return type from _INI device init method

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/method/method.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Keng-Yu Lin - Jan. 23, 2013, 11:51 a.m.
On Wed, Jan 9, 2013 at 6:59 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Test return type from _INI device init method
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/method/method.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 7b35f62..984e32d 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -119,7 +119,7 @@
>   * _HPX  6.2.8         N
>   * _HRV  6.1.6         Y
>   * _IFT  19.5          N
> - * _INI  6.5.1         N
> + * _INI  6.5.1         Y
>   * _INT  19.1.8                N
>   * _IRC  7.2.13                Y
>   * _Lxx  5.6.4.1       n/a
> @@ -1918,6 +1918,12 @@ static int method_test_DCK(fwts_framework *fw)
>         return FWTS_OK;
>  }
>
> +static int method_test_INI(fwts_framework *fw)
> +{
> +       return method_evaluate_method(fw, METHOD_OPTIONAL,
> +               "_INI", NULL, 0, method_test_NULL_return, NULL);
> +}
> +
>  static void method_test_SEG_return(
>         fwts_framework *fw,
>         char *name,
> @@ -4884,7 +4890,7 @@ static fwts_framework_minor_test method_tests[] = {
>         { method_test_BDN, "Check _BDN (BIOS Dock Name)." },
>         { method_test_BBN, "Check _BBN (Base Bus Number)." },
>         { method_test_DCK, "Check _DCK (Dock)." },
> -       /* { method_test_INI, "Check _INI (Initialize)." }, */
> +       { method_test_INI, "Check _INI (Initialize)." },
>         /* { method_test_GLK, "Check _GLK (Global Lock)." }, */
>         /* { method_test_REG, "Check _REG (Region)." }, */
>         { method_test_SEG, "Check _SEG (Segment)." },
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - Jan. 31, 2013, 7:41 a.m.
On 01/09/2013 06:59 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Test return type from _INI device init method
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/method/method.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 7b35f62..984e32d 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -119,7 +119,7 @@
>    * _HPX  6.2.8		N
>    * _HRV  6.1.6		Y
>    * _IFT  19.5		N
> - * _INI  6.5.1		N
> + * _INI  6.5.1		Y
>    * _INT  19.1.8		N
>    * _IRC  7.2.13		Y
>    * _Lxx  5.6.4.1	n/a
> @@ -1918,6 +1918,12 @@ static int method_test_DCK(fwts_framework *fw)
>   	return FWTS_OK;
>   }
>
> +static int method_test_INI(fwts_framework *fw)
> +{
> +	return method_evaluate_method(fw, METHOD_OPTIONAL,
> +		"_INI", NULL, 0, method_test_NULL_return, NULL);
> +}
> +
>   static void method_test_SEG_return(
>   	fwts_framework *fw,
>   	char *name,
> @@ -4884,7 +4890,7 @@ static fwts_framework_minor_test method_tests[] = {
>   	{ method_test_BDN, "Check _BDN (BIOS Dock Name)." },
>   	{ method_test_BBN, "Check _BBN (Base Bus Number)." },
>   	{ method_test_DCK, "Check _DCK (Dock)." },
> -	/* { method_test_INI, "Check _INI (Initialize)." }, */
> +	{ method_test_INI, "Check _INI (Initialize)." },
>   	/* { method_test_GLK, "Check _GLK (Global Lock)." }, */
>   	/* { method_test_REG, "Check _REG (Region)." }, */
>   	{ method_test_SEG, "Check _SEG (Segment)." },
>
Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 7b35f62..984e32d 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -119,7 +119,7 @@ 
  * _HPX  6.2.8		N
  * _HRV  6.1.6		Y
  * _IFT  19.5		N
- * _INI  6.5.1		N
+ * _INI  6.5.1		Y
  * _INT  19.1.8		N
  * _IRC  7.2.13		Y
  * _Lxx  5.6.4.1	n/a
@@ -1918,6 +1918,12 @@  static int method_test_DCK(fwts_framework *fw)
 	return FWTS_OK;
 }
 
+static int method_test_INI(fwts_framework *fw)
+{
+	return method_evaluate_method(fw, METHOD_OPTIONAL,
+		"_INI", NULL, 0, method_test_NULL_return, NULL);
+}
+
 static void method_test_SEG_return(
 	fwts_framework *fw,
 	char *name,
@@ -4884,7 +4890,7 @@  static fwts_framework_minor_test method_tests[] = {
 	{ method_test_BDN, "Check _BDN (BIOS Dock Name)." },
 	{ method_test_BBN, "Check _BBN (Base Bus Number)." },
 	{ method_test_DCK, "Check _DCK (Dock)." },
-	/* { method_test_INI, "Check _INI (Initialize)." }, */
+	{ method_test_INI, "Check _INI (Initialize)." },
 	/* { method_test_GLK, "Check _GLK (Global Lock)." }, */
 	/* { method_test_REG, "Check _REG (Region)." }, */
 	{ method_test_SEG, "Check _SEG (Segment)." },