diff mbox

odp_coremask.c: Use 1ULL for 64bit shifts

Message ID 1410912081-30912-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit f08911c8abac382c09c4b07ce0f440536b28885e
Headers show

Commit Message

Mike Holmes Sept. 17, 2014, 12:01 a.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---

Unless specified "1" is taken as 32bits and core can be upto 63

 platform/linux-generic/odp_coremask.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bill Fischofer Sept. 17, 2014, 12:13 a.m. UTC | #1
Is this necessary?  1 == 1ULL in this context.

Bill

PS Glad to see you're coherent/bored enough to be working :)

On Tuesday, September 16, 2014, Mike Holmes <mike.holmes@linaro.org> wrote:

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org <javascript:;>>
> ---
>
> Unless specified "1" is taken as 32bits and core can be upto 63
>
>  platform/linux-generic/odp_coremask.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/platform/linux-generic/odp_coremask.c
> b/platform/linux-generic/odp_coremask.c
> index c55eb72..c7438cc 100644
> --- a/platform/linux-generic/odp_coremask.c
> +++ b/platform/linux-generic/odp_coremask.c
> @@ -64,7 +64,7 @@ void odp_coremask_set(int core, odp_coremask_t *mask)
>                 return;
>         }
>
> -       mask->_u64[0] |=  (1 << core);
> +       mask->_u64[0] |=  (1ULL << core);
>  }
>
>  void odp_coremask_clr(int core, odp_coremask_t *mask)
> @@ -77,7 +77,7 @@ void odp_coremask_clr(int core, odp_coremask_t *mask)
>                 return;
>         }
>
> -       mask->_u64[0] &= ~(1 << core);
> +       mask->_u64[0] &= ~(1ULL << core);
>  }
>
>
> --
> 1.9.1
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org <javascript:;>
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_coremask.c b/platform/linux-generic/odp_coremask.c
index c55eb72..c7438cc 100644
--- a/platform/linux-generic/odp_coremask.c
+++ b/platform/linux-generic/odp_coremask.c
@@ -64,7 +64,7 @@  void odp_coremask_set(int core, odp_coremask_t *mask)
 		return;
 	}
 
-	mask->_u64[0] |=  (1 << core);
+	mask->_u64[0] |=  (1ULL << core);
 }
 
 void odp_coremask_clr(int core, odp_coremask_t *mask)
@@ -77,7 +77,7 @@  void odp_coremask_clr(int core, odp_coremask_t *mask)
 		return;
 	}
 
-	mask->_u64[0] &= ~(1 << core);
+	mask->_u64[0] &= ~(1ULL << core);
 }