[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/5] xen/rcu: fix types



Adjust some types: int -> bool, int -> unsigned int. Also fix a couple of
typos plus trailing white space.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
---
 xen/common/rcupdate.c      | 12 ++++++------
 xen/include/xen/rcupdate.h |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c
index fd5d3d7484a5..3b96f829c87c 100644
--- a/xen/common/rcupdate.c
+++ b/xen/common/rcupdate.c
@@ -509,18 +509,18 @@ static int __rcu_pending(struct rcu_ctrlblk *rcp, struct 
rcu_data *rdp)
     return 0;
 }
 
-int rcu_pending(int cpu)
+bool rcu_pending(unsigned int cpu)
 {
-    return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
+    return !!__rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
 }
 
 /*
  * Check to see if any future RCU-related work will need to be done
  * by the current CPU, even if none need be done immediately, returning
- * 1 if so.  This function is part of the RCU implementation; it is -not-
+ * true if so.  This function is part of the RCU implementation; it is -not-
  * an exported member of the RCU API.
  */
-int rcu_needs_cpu(int cpu)
+bool rcu_needs_cpu(unsigned int cpu)
 {
     struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
 
@@ -529,7 +529,7 @@ int rcu_needs_cpu(int cpu)
 
 /*
  * Timer for making sure the CPU where a callback is queued does
- * periodically poke rcu_pedning(), so that it will invoke the callback
+ * periodically poke rcu_pending(), so that it will invoke the callback
  * not too late after the end of the grace period.
  */
 static void rcu_idle_timer_start(void)
@@ -588,7 +588,7 @@ static void cf_check rcu_idle_timer_handler(void* data)
                                 IDLE_TIMER_PERIOD_MIN);
 }
 
-void rcu_check_callbacks(int cpu)
+void rcu_check_callbacks(unsigned int cpu)
 {
     struct rcu_data *rdp = &this_cpu(rcu_data);
 
diff --git a/xen/include/xen/rcupdate.h b/xen/include/xen/rcupdate.h
index 95f4ad81c4a8..c57f628107cf 100644
--- a/xen/include/xen/rcupdate.h
+++ b/xen/include/xen/rcupdate.h
@@ -77,8 +77,8 @@ struct rcu_head {
 } while (0)
 
 
-int rcu_pending(int cpu);
-int rcu_needs_cpu(int cpu);
+bool rcu_pending(unsigned int cpu);
+bool rcu_needs_cpu(unsigned int cpu);
 
 /*
  * Dummy lock type for passing to rcu_read_{lock,unlock}. Currently exists
@@ -168,10 +168,10 @@ static inline void rcu_read_unlock(rcu_read_lock_t *lock)
 #define rcu_assign_pointer(p, v) ({ smp_wmb(); (p) = (v); })
 
 void rcu_init(void);
-void rcu_check_callbacks(int cpu);
+void rcu_check_callbacks(unsigned int cpu);
 
 /* Exported interfaces */
-void call_rcu(struct rcu_head *head, 
+void call_rcu(struct rcu_head *head,
               void (*func)(struct rcu_head *head));
 
 void rcu_barrier(void);
-- 
2.53.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.