[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230302204612.782387-8-mcgrof@kernel.org>
Date: Thu, 2 Mar 2023 12:46:12 -0800
From: Luis Chamberlain <mcgrof@...nel.org>
To: ebiederm@...ssion.com, keescook@...omium.org, yzaikin@...gle.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com, minyard@....org,
kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, song@...nel.org, robinmholt@...il.com,
steve.wahl@....com, mike.travis@....com, arnd@...db.de,
gregkh@...uxfoundation.org, jirislaby@...nel.org, jgross@...e.com,
sstabellini@...nel.org, oleksandr_tyshchenko@...m.com,
xen-devel@...ts.xenproject.org
Cc: j.granados@...sung.com, zhangpeng362@...wei.com,
tangmeng@...ontech.com, willy@...radead.org, nixiaoming@...wei.com,
sujiaxun@...ontech.com, patches@...ts.linux.dev,
linux-fsdevel@...r.kernel.org, apparmor@...ts.ubuntu.com,
linux-raid@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-hyperv@...r.kernel.org,
openipmi-developer@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Luis Chamberlain <mcgrof@...nel.org>
Subject: [PATCH 7/7] xen: simplify sysctl registration for balloon
register_sysctl_table() is a deprecated compatibility wrapper.
register_sysctl_init() can do the directory creation for you so just
use that.
Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
---
drivers/xen/balloon.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 617a7f4f07a8..586a1673459e 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -97,24 +97,6 @@ static struct ctl_table balloon_table[] = {
{ }
};
-static struct ctl_table balloon_root[] = {
- {
- .procname = "balloon",
- .mode = 0555,
- .child = balloon_table,
- },
- { }
-};
-
-static struct ctl_table xen_root[] = {
- {
- .procname = "xen",
- .mode = 0555,
- .child = balloon_root,
- },
- { }
-};
-
#else
#define xen_hotplug_unpopulated 0
#endif
@@ -747,7 +729,7 @@ static int __init balloon_init(void)
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
set_online_page_callback(&xen_online_page);
register_memory_notifier(&xen_memory_nb);
- register_sysctl_table(xen_root);
+ register_sysctl_init("xen/balloon", balloon_table);
#endif
balloon_add_regions();
--
2.39.1
Powered by blists - more mailing lists