[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH] xen: cpu: change 'cpu_hotplug_[begin|done]' to inline function
- To: Julien Grall <julien.grall@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: chenbaodong <chenbaodong@xxxxxxxxxx>
- Date: Mon, 3 Jun 2019 09:52:41 +0800
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Mon, 03 Jun 2019 01:52:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 5/31/19 18:55, Julien Grall wrote:
Hi,
On 5/31/19 3:46 AM, Baodong Chen wrote:
Signed-off-by: Baodong Chen <chenbaodong@xxxxxxxxxx>
---
xen/common/cpu.c | 10 ----------
xen/include/xen/cpu.h | 4 ++--
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/xen/common/cpu.c b/xen/common/cpu.c
index f388d89..a526b55 100644
--- a/xen/common/cpu.c
+++ b/xen/common/cpu.c
@@ -51,16 +51,6 @@ void put_cpu_maps(void)
spin_unlock_recursive(&cpu_add_remove_lock);
}
-bool_t cpu_hotplug_begin(void)
-{
- return get_cpu_maps();
-}
-
-void cpu_hotplug_done(void)
-{
- put_cpu_maps();
-}
-
static NOTIFIER_HEAD(cpu_chain);
void __init register_cpu_notifier(struct notifier_block *nb)
diff --git a/xen/include/xen/cpu.h b/xen/include/xen/cpu.h
index 4638c50..70a2df4 100644
--- a/xen/include/xen/cpu.h
+++ b/xen/include/xen/cpu.h
@@ -10,8 +10,8 @@ bool_t get_cpu_maps(void);
void put_cpu_maps(void);
/* Safely perform CPU hotplug and update cpu_online_map, etc. */
-bool_t cpu_hotplug_begin(void);
-void cpu_hotplug_done(void);
+static inline bool_t cpu_hotplug_begin(void) { return get_cpu_maps(); }
+static inline void cpu_hotplug_done(void) { put_cpu_maps(); }
The coding style should be:
static inline....
{
...
}
Yes, clang-format automated format code for me, will be fixed.
/* Receive notification of CPU hotplug events. */
void register_cpu_notifier(struct notifier_block *nb);
Cheers,
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|