Skip to contentSkip to conversation

kernel/cpuset.c: cleanups

PATCH In review Adrian Bunk 2 participants 2 messages Jul 5, 2007 – Jul 6, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/cpuset.c: cleanups

This patch contains the following cleanups:
- make the following needlessly global functions static:
- cpuset_can_attach()
- cpuset_attach()
- cpuset_populate()
- cpuset_post_clone()
- cpuset_create()
- cpuset_destroy()
- remove the unused EXPORT_SYMBOL_GPL(cpuset_mem_spread_node)

---

 kernel/cpuset.c |   21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
kernel/cpuset.c renamed from kernel/cpuset.c.old +10 -11
@@ -873,8 +873,8 @@
 	return val;
 }
 
-int cpuset_can_attach(struct container_subsys *ss,
-		      struct container *cont, struct task_struct *tsk)
+static int cpuset_can_attach(struct container_subsys *ss,
+			     struct container *cont, struct task_struct *tsk)
 {
 	struct cpuset *cs = container_cs(cont);
 
@@ -884,9 +884,9 @@
 	return security_task_setscheduler(tsk, 0, NULL);
 }
 
-void cpuset_attach(struct container_subsys *ss,
-		   struct container *cont, struct container *oldcont,
-		   struct task_struct *tsk)
+static void cpuset_attach(struct container_subsys *ss,
+			  struct container *cont, struct container *oldcont,
+			  struct task_struct *tsk)
 {
 	cpumask_t cpus;
 	nodemask_t from, to;
@@ -1163,7 +1163,7 @@
 	.private = FILE_SPREAD_SLAB,
 };
 
-int cpuset_populate(struct container_subsys *ss, struct container *cont)
+static int cpuset_populate(struct container_subsys *ss, struct container *cont)
 {
 	int err;
 
@@ -1205,8 +1205,8 @@
  * changed to grant parent->cpus_allowed-sibling_cpus_exclusive
  * (and likewise for mems) to the new container.
  */
-void cpuset_post_clone(struct container_subsys *ss,
-		struct container *container)
+static void cpuset_post_clone(struct container_subsys *ss,
+			      struct container *container)
 {
 	struct container *parent, *child;
 	struct cpuset *cs, *parent_cs;
@@ -1234,7 +1234,7 @@
  *	Must be called with the mutex on the parent inode held
  */
 
-int cpuset_create(struct container_subsys *ss, struct container *cont)
+static int cpuset_create(struct container_subsys *ss, struct container *cont)
 {
 	struct cpuset *cs;
 	struct cpuset *parent;
@@ -1269,7 +1269,7 @@
 	return 0;
 }
 
-void cpuset_destroy(struct container_subsys *ss, struct container *cont)
+static void cpuset_destroy(struct container_subsys *ss, struct container *cont)
 {
 	struct cpuset *cs = container_cs(cont);
 
@@ -1726,7 +1726,6 @@
 	current->cpuset_mem_spread_rotor = node;
 	return node;
 }
-EXPORT_SYMBOL_GPL(cpuset_mem_spread_node);
 
 /**
  * cpuset_excl_nodes_overlap - Do we overlap @p's mem_exclusive ancestors?
#1 lore raw
Quoted 1 line

- make the following needlessly global functions static:

Ok by me, but this is really the patches of Paul Menage <[email protected]>, in particular:

containersv10-make-cpusets-a-client-of-containers.patch

that you dealing with -- adding him to the cc list.

Signature · 3 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401