Re: [Xen-devel] [PATCH 8/8] cpumask: tidy {,z}alloc_cpumask_var()

2018-07-12 Thread Wei Liu
On Wed, Jul 11, 2018 at 06:12:14AM -0600, Jan Beulich wrote:
> Drop unnecessary casts and use bool in favor of bool_t.
> 
> Signed-off-by: Jan Beulich 

Reviewed-by: Wei Liu 

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 8/8] cpumask: tidy {,z}alloc_cpumask_var()

2018-07-11 Thread Andrew Cooper
On 11/07/18 13:12, Jan Beulich wrote:
> Drop unnecessary casts and use bool in favor of bool_t.
>
> Signed-off-by: Jan Beulich 

Reviewed-by: Andrew Cooper 

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 8/8] cpumask: tidy {,z}alloc_cpumask_var()

2018-07-11 Thread Jan Beulich
Drop unnecessary casts and use bool in favor of bool_t.

Signed-off-by: Jan Beulich 

--- a/xen/include/xen/cpumask.h
+++ b/xen/include/xen/cpumask.h
@@ -345,9 +345,9 @@ static inline int cpulist_scnprintf(char
 
 typedef cpumask_t *cpumask_var_t;
 
-static inline bool_t alloc_cpumask_var(cpumask_var_t *mask)
+static inline bool alloc_cpumask_var(cpumask_var_t *mask)
 {
-   *(void **)mask = _xmalloc(nr_cpumask_bits / 8, sizeof(long));
+   *mask = _xmalloc(nr_cpumask_bits / 8, sizeof(long));
return *mask != NULL;
 }
 
@@ -358,9 +358,9 @@ static inline bool cond_alloc_cpumask_va
return *mask != NULL;
 }
 
-static inline bool_t zalloc_cpumask_var(cpumask_var_t *mask)
+static inline bool zalloc_cpumask_var(cpumask_var_t *mask)
 {
-   *(void **)mask = _xzalloc(nr_cpumask_bits / 8, sizeof(long));
+   *mask = _xzalloc(nr_cpumask_bits / 8, sizeof(long));
return *mask != NULL;
 }
 
@@ -385,16 +385,16 @@ static inline void clear_cpumask_var(cpu
 #else
 typedef cpumask_t cpumask_var_t[1];
 
-static inline bool_t alloc_cpumask_var(cpumask_var_t *mask)
+static inline bool alloc_cpumask_var(cpumask_var_t *mask)
 {
-   return 1;
+   return true;
 }
 #define cond_alloc_cpumask_var alloc_cpumask_var
 
-static inline bool_t zalloc_cpumask_var(cpumask_var_t *mask)
+static inline bool zalloc_cpumask_var(cpumask_var_t *mask)
 {
cpumask_clear(*mask);
-   return 1;
+   return true;
 }
 #define cond_zalloc_cpumask_var zalloc_cpumask_var
 





___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel