diff mbox

[API-NEXT,PATCHv3,3/9] linux-generic: cpumask: zero mask before setting

Message ID 1437485540-4862-4-git-send-email-stuart.haslam@linaro.org
State Superseded
Headers show

Commit Message

Stuart Haslam July 21, 2015, 1:32 p.m. UTC
odp_cpumask_def_control() was neglecting to zero out the provided mask.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 platform/linux-generic/odp_cpumask.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Christophe Milard July 22, 2015, 11:11 a.m. UTC | #1
On 2015-07-21 14:32, Stuart Haslam wrote:
> odp_cpumask_def_control() was neglecting to zero out the provided mask.
> 
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>

Reviewed-by: Christophe Milard <christophe.milard@linaro.org>

> ---
>  platform/linux-generic/odp_cpumask.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c
> index 1ea7dcb..c28153b 100644
> --- a/platform/linux-generic/odp_cpumask.c
> +++ b/platform/linux-generic/odp_cpumask.c
> @@ -238,6 +238,7 @@ int odp_cpumask_def_worker(odp_cpumask_t *mask, int num)
>  
>  int odp_cpumask_def_control(odp_cpumask_t *mask, int num ODP_UNUSED)
>  {
> +	odp_cpumask_zero(mask);
>  	/* By default all control threads on CPU 0 */
>  	odp_cpumask_set(mask, 0);
>  	return 1;
> -- 
> 2.1.1
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c
index 1ea7dcb..c28153b 100644
--- a/platform/linux-generic/odp_cpumask.c
+++ b/platform/linux-generic/odp_cpumask.c
@@ -238,6 +238,7 @@  int odp_cpumask_def_worker(odp_cpumask_t *mask, int num)
 
 int odp_cpumask_def_control(odp_cpumask_t *mask, int num ODP_UNUSED)
 {
+	odp_cpumask_zero(mask);
 	/* By default all control threads on CPU 0 */
 	odp_cpumask_set(mask, 0);
 	return 1;