Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen: Remove some deadcode (x)

Remove three uncalled functions:

xenbus_mkdir() was added in 2007 by
commit 4bac07c993d0 ("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 6ba286ad8457 ("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 1914f0cd203c ("xen/acpi: upload PM state from init-domain to Xen")

Remove them.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20250713132625.164728-1-linux@treblig.org>

authored by

Dr. David Alan Gilbert and committed by
Juergen Gross
0df11950 c7962689

-35
-6
drivers/xen/manage.c
··· 52 52 } 53 53 EXPORT_SYMBOL_GPL(xen_resume_notifier_register); 54 54 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 - 61 55 #ifdef CONFIG_HIBERNATE_CALLBACKS 62 56 static int xen_suspend(void *data) 63 57 {
-8
drivers/xen/time.c
··· 136 136 } 137 137 } 138 138 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 - 147 139 /* return true when a vcpu could run but has no real cpu to run on */ 148 140 bool xen_vcpu_stolen(int vcpu) 149 141 {
-17
drivers/xen/xenbus/xenbus_xs.c
··· 512 512 } 513 513 EXPORT_SYMBOL_GPL(xenbus_write); 514 514 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 - 532 515 /* Destroy a file or directory (directories must be empty). */ 533 516 int xenbus_rm(struct xenbus_transaction t, const char *dir, const char *node) 534 517 {
-2
include/xen/xen-ops.h
··· 30 30 void xen_reboot(int reason); 31 31 32 32 void xen_resume_notifier_register(struct notifier_block *nb); 33 - void xen_resume_notifier_unregister(struct notifier_block *nb); 34 33 35 34 bool xen_vcpu_stolen(int vcpu); 36 35 void xen_setup_runstate_info(int cpu); 37 36 void xen_time_setup_guest(void); 38 37 void xen_manage_runstate_time(int action); 39 - void xen_get_runstate_snapshot(struct vcpu_runstate_info *res); 40 38 u64 xen_steal_clock(int cpu); 41 39 42 40 int xen_setup_shutdown_event(void);
-2
include/xen/xenbus.h
··· 154 154 const char *dir, const char *node, unsigned int *len); 155 155 int xenbus_write(struct xenbus_transaction t, 156 156 const char *dir, const char *node, const char *string); 157 - int xenbus_mkdir(struct xenbus_transaction t, 158 - const char *dir, const char *node); 159 157 int xenbus_exists(struct xenbus_transaction t, 160 158 const char *dir, const char *node); 161 159 int xenbus_rm(struct xenbus_transaction t, const char *dir, const char *node);