iASL: Use ACPI_COMPARE_NAMESEG instead of strcmp
diff mbox series

Message ID 20191112142905.259314-1-colin.king@canonical.com
State Accepted
Headers show
Series
  • iASL: Use ACPI_COMPARE_NAMESEG instead of strcmp
Related show

Commit Message

Colin King Nov. 12, 2019, 2:29 p.m. UTC
From: Robert Moore <Robert.Moore@intel.com>

BugLink: https://bugs.launchpad.net/bugs/1819968

For _HID, _CID processing. Reported by Benjamin Berg
(benjamin@sipsolutions.net).

(backport from ACPICA upstream commit 3dcd13aa62e7)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpica/source/compiler/aslmethod.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Hung Nov. 13, 2019, 5:46 p.m. UTC | #1
On 2019-11-12 7:29 a.m., Colin King wrote:
> From: Robert Moore <Robert.Moore@intel.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1819968

The buglink is incorrect and it should be
https://bugs.launchpad.net/fwts/+bug/1851219 after confirming with
Colin. I can fix this up when merging this patch once it receives two acks.

> 
> For _HID, _CID processing. Reported by Benjamin Berg
> (benjamin@sipsolutions.net).
> 
> (backport from ACPICA upstream commit 3dcd13aa62e7)
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpica/source/compiler/aslmethod.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
> index 667eaaaf..4b29fc9e 100644
> --- a/src/acpica/source/compiler/aslmethod.c
> +++ b/src/acpica/source/compiler/aslmethod.c
> @@ -586,7 +586,7 @@ MtMethodAnalysisWalkBegin (
>  
>          /* Special typechecking for _HID */
>  
> -        if (!strcmp (METHOD_NAME__HID, Op->Asl.NameSeg))
> +        if (ACPI_COMPARE_NAMESEG (METHOD_NAME__HID, Op->Asl.NameSeg))
>          {
>              Next = Op->Asl.Child->Asl.Next;
>              AnCheckId (Next, ASL_TYPE_HID);
> @@ -594,7 +594,7 @@ MtMethodAnalysisWalkBegin (
>  
>          /* Special typechecking for _CID */
>  
> -        else if (!strcmp (METHOD_NAME__CID, Op->Asl.NameSeg))
> +        else if (ACPI_COMPARE_NAMESEG (METHOD_NAME__CID, Op->Asl.NameSeg))
>          {
>              Next = Op->Asl.Child->Asl.Next;
>  
> 

Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Nov. 14, 2019, 2:08 a.m. UTC | #2
On 11/12/19 10:29 PM, Colin King wrote:
> From: Robert Moore <Robert.Moore@intel.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1819968
>
> For _HID, _CID processing. Reported by Benjamin Berg
> (benjamin@sipsolutions.net).
>
> (backport from ACPICA upstream commit 3dcd13aa62e7)
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpica/source/compiler/aslmethod.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
> index 667eaaaf..4b29fc9e 100644
> --- a/src/acpica/source/compiler/aslmethod.c
> +++ b/src/acpica/source/compiler/aslmethod.c
> @@ -586,7 +586,7 @@ MtMethodAnalysisWalkBegin (
>  
>          /* Special typechecking for _HID */
>  
> -        if (!strcmp (METHOD_NAME__HID, Op->Asl.NameSeg))
> +        if (ACPI_COMPARE_NAMESEG (METHOD_NAME__HID, Op->Asl.NameSeg))
>          {
>              Next = Op->Asl.Child->Asl.Next;
>              AnCheckId (Next, ASL_TYPE_HID);
> @@ -594,7 +594,7 @@ MtMethodAnalysisWalkBegin (
>  
>          /* Special typechecking for _CID */
>  
> -        else if (!strcmp (METHOD_NAME__CID, Op->Asl.NameSeg))
> +        else if (ACPI_COMPARE_NAMESEG (METHOD_NAME__CID, Op->Asl.NameSeg))
>          {
>              Next = Op->Asl.Child->Asl.Next;
>  

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
index 667eaaaf..4b29fc9e 100644
--- a/src/acpica/source/compiler/aslmethod.c
+++ b/src/acpica/source/compiler/aslmethod.c
@@ -586,7 +586,7 @@  MtMethodAnalysisWalkBegin (
 
         /* Special typechecking for _HID */
 
-        if (!strcmp (METHOD_NAME__HID, Op->Asl.NameSeg))
+        if (ACPI_COMPARE_NAMESEG (METHOD_NAME__HID, Op->Asl.NameSeg))
         {
             Next = Op->Asl.Child->Asl.Next;
             AnCheckId (Next, ASL_TYPE_HID);
@@ -594,7 +594,7 @@  MtMethodAnalysisWalkBegin (
 
         /* Special typechecking for _CID */
 
-        else if (!strcmp (METHOD_NAME__CID, Op->Asl.NameSeg))
+        else if (ACPI_COMPARE_NAMESEG (METHOD_NAME__CID, Op->Asl.NameSeg))
         {
             Next = Op->Asl.Child->Asl.Next;