bpf: Corrected condition in core_mark_as_access_index.

Message ID 20231113223638.11660-1-cupertino.miranda@oracle.com
State Unresolved
Headers
Series bpf: Corrected condition in core_mark_as_access_index. |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Cupertino Miranda Nov. 13, 2023, 10:36 p.m. UTC
  gcc/ChangeLog:
	* config/bpf/core-builtins.cc (core_mark_as_access_index):
	Corrected check.
---
 gcc/config/bpf/core-builtins.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Faust Nov. 14, 2023, 4:06 p.m. UTC | #1
On 11/13/23 14:36, Cupertino Miranda wrote:
> gcc/ChangeLog:
> 	* config/bpf/core-builtins.cc (core_mark_as_access_index):
> 	Corrected check.

OK, thanks.

> ---
>  gcc/config/bpf/core-builtins.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/config/bpf/core-builtins.cc b/gcc/config/bpf/core-builtins.cc
> index 2ba78d7aed2e..1376c9309035 100644
> --- a/gcc/config/bpf/core-builtins.cc
> +++ b/gcc/config/bpf/core-builtins.cc
> @@ -1611,7 +1611,7 @@ core_mark_as_access_index (tree expr)
>        || TREE_CODE (expr) == INDIRECT_REF)
>      expr = TREE_OPERAND (expr, 0);
>  
> -  if (bpf_enum_mappings->get (expr) == NULL)
> +  if (core_access_index_map->get (expr) == NULL)
>      core_access_index_map->put (expr, NULL_TREE);
>  }
>
  
Cupertino Miranda Nov. 28, 2023, 12:43 p.m. UTC | #2
Thanks! Committed !

David Faust writes:

> On 11/13/23 14:36, Cupertino Miranda wrote:
>> gcc/ChangeLog:
>> 	* config/bpf/core-builtins.cc (core_mark_as_access_index):
>> 	Corrected check.
>
> OK, thanks.
>
>> ---
>>  gcc/config/bpf/core-builtins.cc | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gcc/config/bpf/core-builtins.cc b/gcc/config/bpf/core-builtins.cc
>> index 2ba78d7aed2e..1376c9309035 100644
>> --- a/gcc/config/bpf/core-builtins.cc
>> +++ b/gcc/config/bpf/core-builtins.cc
>> @@ -1611,7 +1611,7 @@ core_mark_as_access_index (tree expr)
>>        || TREE_CODE (expr) == INDIRECT_REF)
>>      expr = TREE_OPERAND (expr, 0);
>>
>> -  if (bpf_enum_mappings->get (expr) == NULL)
>> +  if (core_access_index_map->get (expr) == NULL)
>>      core_access_index_map->put (expr, NULL_TREE);
>>  }
>>
  

Patch

diff --git a/gcc/config/bpf/core-builtins.cc b/gcc/config/bpf/core-builtins.cc
index 2ba78d7aed2e..1376c9309035 100644
--- a/gcc/config/bpf/core-builtins.cc
+++ b/gcc/config/bpf/core-builtins.cc
@@ -1611,7 +1611,7 @@  core_mark_as_access_index (tree expr)
       || TREE_CODE (expr) == INDIRECT_REF)
     expr = TREE_OPERAND (expr, 0);
 
-  if (bpf_enum_mappings->get (expr) == NULL)
+  if (core_access_index_map->get (expr) == NULL)
     core_access_index_map->put (expr, NULL_TREE);
 }