Skip to content

Commit 0df1195

Browse files
Dr. David Alan Gilbertjgross1
authored andcommitted
xen: Remove some deadcode (x)
Remove three uncalled functions: xenbus_mkdir() was added in 2007 by commit 4bac07c ("xen: add the Xenbus sysfs and virtual device hotplug driver") but has remained unused. xen_get_runstate_snapshot() last use was removed in 2016 by commit 6ba286a ("xen: support runqueue steal time on xen") which replaces the use by the _cpu version. xen_resume_notifier_unregister() last use was removed in 2017 by commit 1914f0c ("xen/acpi: upload PM state from init-domain to Xen") Remove them. Signed-off-by: "Dr. David Alan Gilbert" <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Message-ID: <[email protected]>
1 parent c796268 commit 0df1195

File tree

5 files changed

+0
-35
lines changed

5 files changed

+0
-35
lines changed

drivers/xen/manage.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ void xen_resume_notifier_register(struct notifier_block *nb)
5252
}
5353
EXPORT_SYMBOL_GPL(xen_resume_notifier_register);
5454

55-
void xen_resume_notifier_unregister(struct notifier_block *nb)
56-
{
57-
raw_notifier_chain_unregister(&xen_resume_notifier, nb);
58-
}
59-
EXPORT_SYMBOL_GPL(xen_resume_notifier_unregister);
60-
6155
#ifdef CONFIG_HIBERNATE_CALLBACKS
6256
static int xen_suspend(void *data)
6357
{

drivers/xen/time.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,6 @@ void xen_manage_runstate_time(int action)
136136
}
137137
}
138138

139-
/*
140-
* Runstate accounting
141-
*/
142-
void xen_get_runstate_snapshot(struct vcpu_runstate_info *res)
143-
{
144-
xen_get_runstate_snapshot_cpu(res, smp_processor_id());
145-
}
146-
147139
/* return true when a vcpu could run but has no real cpu to run on */
148140
bool xen_vcpu_stolen(int vcpu)
149141
{

drivers/xen/xenbus/xenbus_xs.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -512,23 +512,6 @@ int xenbus_write(struct xenbus_transaction t,
512512
}
513513
EXPORT_SYMBOL_GPL(xenbus_write);
514514

515-
/* Create a new directory. */
516-
int xenbus_mkdir(struct xenbus_transaction t,
517-
const char *dir, const char *node)
518-
{
519-
char *path;
520-
int ret;
521-
522-
path = join(dir, node);
523-
if (IS_ERR(path))
524-
return PTR_ERR(path);
525-
526-
ret = xs_error(xs_single(t, XS_MKDIR, path, NULL));
527-
kfree(path);
528-
return ret;
529-
}
530-
EXPORT_SYMBOL_GPL(xenbus_mkdir);
531-
532515
/* Destroy a file or directory (directories must be empty). */
533516
int xenbus_rm(struct xenbus_transaction t, const char *dir, const char *node)
534517
{

include/xen/xen-ops.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ void xen_arch_suspend(void);
3030
void xen_reboot(int reason);
3131

3232
void xen_resume_notifier_register(struct notifier_block *nb);
33-
void xen_resume_notifier_unregister(struct notifier_block *nb);
3433

3534
bool xen_vcpu_stolen(int vcpu);
3635
void xen_setup_runstate_info(int cpu);
3736
void xen_time_setup_guest(void);
3837
void xen_manage_runstate_time(int action);
39-
void xen_get_runstate_snapshot(struct vcpu_runstate_info *res);
4038
u64 xen_steal_clock(int cpu);
4139

4240
int xen_setup_shutdown_event(void);

include/xen/xenbus.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,6 @@ void *xenbus_read(struct xenbus_transaction t,
154154
const char *dir, const char *node, unsigned int *len);
155155
int xenbus_write(struct xenbus_transaction t,
156156
const char *dir, const char *node, const char *string);
157-
int xenbus_mkdir(struct xenbus_transaction t,
158-
const char *dir, const char *node);
159157
int xenbus_exists(struct xenbus_transaction t,
160158
const char *dir, const char *node);
161159
int xenbus_rm(struct xenbus_transaction t, const char *dir, const char *node);

0 commit comments

Comments
 (0)