[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] cpumask: tidy {, z}alloc_cpumask_var()
commit 8d783cb20c35ea3f763934484fd11d1ed7ab1e40 Author: Jan Beulich <JBeulich@xxxxxxxx> AuthorDate: Thu Jul 19 04:33:38 2018 -0600 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Jul 19 13:43:33 2018 +0100 cpumask: tidy {,z}alloc_cpumask_var() Drop unnecessary casts and use bool in favor of bool_t. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/include/xen/cpumask.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/include/xen/cpumask.h b/xen/include/xen/cpumask.h index 4a11bcc3f3..4731a636c0 100644 --- a/xen/include/xen/cpumask.h +++ b/xen/include/xen/cpumask.h @@ -345,9 +345,9 @@ static inline int cpulist_scnprintf(char *buf, int len, 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_var(cpumask_var_t *mask) 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; } @@ -383,16 +383,16 @@ static inline void free_cpumask_var(cpumask_var_t mask) #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 -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |