]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xen: Remove some deadcode (x)
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 13 Jul 2025 13:26:25 +0000 (14:26 +0100)
committerJuergen Gross <jgross@suse.com>
Mon, 14 Jul 2025 07:55:52 +0000 (09:55 +0200)
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>

drivers/xen/manage.c
drivers/xen/time.c
drivers/xen/xenbus/xenbus_xs.c
include/xen/xen-ops.h
include/xen/xenbus.h

index b4b4ebed68daf59dbdcea63556e9651d2e6ff24d..841afa4933c7a6ef4cd8527a117a59efd5f060b1 100644 (file)
@@ -52,12 +52,6 @@ void xen_resume_notifier_register(struct notifier_block *nb)
 }
 EXPORT_SYMBOL_GPL(xen_resume_notifier_register);
 
-void xen_resume_notifier_unregister(struct notifier_block *nb)
-{
-       raw_notifier_chain_unregister(&xen_resume_notifier, nb);
-}
-EXPORT_SYMBOL_GPL(xen_resume_notifier_unregister);
-
 #ifdef CONFIG_HIBERNATE_CALLBACKS
 static int xen_suspend(void *data)
 {
index 152dd33bb223673a59e1ff4a74d3bb2bd2bad3bd..5683383d2305292aa857e60902a48ed677e11b98 100644 (file)
@@ -136,14 +136,6 @@ void xen_manage_runstate_time(int action)
        }
 }
 
-/*
- * Runstate accounting
- */
-void xen_get_runstate_snapshot(struct vcpu_runstate_info *res)
-{
-       xen_get_runstate_snapshot_cpu(res, smp_processor_id());
-}
-
 /* return true when a vcpu could run but has no real cpu to run on */
 bool xen_vcpu_stolen(int vcpu)
 {
index dcf9182c8451adb1591c5b9a07c50e897acd0052..3c9da446b85dfa032805637f5741e9b4319411a6 100644 (file)
@@ -512,23 +512,6 @@ int xenbus_write(struct xenbus_transaction t,
 }
 EXPORT_SYMBOL_GPL(xenbus_write);
 
-/* Create a new directory. */
-int xenbus_mkdir(struct xenbus_transaction t,
-                const char *dir, const char *node)
-{
-       char *path;
-       int ret;
-
-       path = join(dir, node);
-       if (IS_ERR(path))
-               return PTR_ERR(path);
-
-       ret = xs_error(xs_single(t, XS_MKDIR, path, NULL));
-       kfree(path);
-       return ret;
-}
-EXPORT_SYMBOL_GPL(xenbus_mkdir);
-
 /* Destroy a file or directory (directories must be empty). */
 int xenbus_rm(struct xenbus_transaction t, const char *dir, const char *node)
 {
index 47f11bec5e90c8b34c0fedabe40fab0f71416aca..9e2a769b0d961a558bcd094f45b3a5cd795e71aa 100644 (file)
@@ -30,13 +30,11 @@ void xen_arch_suspend(void);
 void xen_reboot(int reason);
 
 void xen_resume_notifier_register(struct notifier_block *nb);
-void xen_resume_notifier_unregister(struct notifier_block *nb);
 
 bool xen_vcpu_stolen(int vcpu);
 void xen_setup_runstate_info(int cpu);
 void xen_time_setup_guest(void);
 void xen_manage_runstate_time(int action);
-void xen_get_runstate_snapshot(struct vcpu_runstate_info *res);
 u64 xen_steal_clock(int cpu);
 
 int xen_setup_shutdown_event(void);
index 3f90bdd387b67f8a2258e35d73a4d67809c34f54..1c23e6387f130715232ba40d1fb996c378ebc91a 100644 (file)
@@ -154,8 +154,6 @@ void *xenbus_read(struct xenbus_transaction t,
                  const char *dir, const char *node, unsigned int *len);
 int xenbus_write(struct xenbus_transaction t,
                 const char *dir, const char *node, const char *string);
-int xenbus_mkdir(struct xenbus_transaction t,
-                const char *dir, const char *node);
 int xenbus_exists(struct xenbus_transaction t,
                  const char *dir, const char *node);
 int xenbus_rm(struct xenbus_transaction t, const char *dir, const char *node);