diff mbox series

[2/5] API/cgroup: Remove typedef

Message ID 20211214103645.16148-2-rpalethorpe@suse.com
State Accepted
Headers show
Series [1/5] API/cgroup: Whitespace fixes | expand

Commit Message

Richard Palethorpe Dec. 14, 2021, 10:36 a.m. UTC
Angers make check and is not helpful anymore.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 lib/tst_cgroup.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
index 2dcfbc8ff..d9d74faa8 100644
--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -141,10 +141,7 @@  struct tst_cgroup_group {
 /* Always use first item for unified hierarchy */
 static struct cgroup_root roots[ROOTS_MAX + 1];
 
-/* Lookup tree for item names. */
-typedef struct cgroup_file files_t[];
-
-static const files_t cgroup_ctrl_files = {
+static const struct cgroup_file cgroup_ctrl_files[] = {
 	/* procs exists on V1, however it was read-only until kernel v3.0. */
 	{ "cgroup.procs", "tasks", 0 },
 	{ "cgroup.subtree_control", NULL, 0 },
@@ -152,7 +149,7 @@  static const files_t cgroup_ctrl_files = {
 	{ }
 };
 
-static const files_t memory_ctrl_files = {
+static const struct cgroup_file memory_ctrl_files[] = {
 	{ "memory.current", "memory.usage_in_bytes", CTRL_MEMORY },
 	{ "memory.max", "memory.limit_in_bytes", CTRL_MEMORY },
 	{ "memory.swappiness", "memory.swappiness", CTRL_MEMORY },
@@ -163,7 +160,7 @@  static const files_t memory_ctrl_files = {
 	{ }
 };
 
-static const files_t cpu_ctrl_files = {
+static const struct cgroup_file cpu_ctrl_files[] = {
 	/* The V1 quota and period files were combined in the V2 max
 	 * file. The quota is in the first column and if we just print
 	 * a single value to the file, it will be treated as the
@@ -175,13 +172,14 @@  static const files_t cpu_ctrl_files = {
 	{ }
 };
 
-static const files_t cpuset_ctrl_files = {
+static const struct cgroup_file cpuset_ctrl_files[] = {
 	{ "cpuset.cpus", "cpuset.cpus", CTRL_CPUSET },
 	{ "cpuset.mems", "cpuset.mems", CTRL_CPUSET },
 	{ "cpuset.memory_migrate", "cpuset.memory_migrate", CTRL_CPUSET },
 	{ }
 };
 
+/* Lookup tree for item names. */
 static struct cgroup_ctrl controllers[] = {
 	[0] = { "cgroup", cgroup_ctrl_files, 0, NULL, 0 },
 	[CTRL_MEMORY] = {