aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>2005-04-16 18:25:59 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:25:59 -0400
commit9a8488965dc4c42a4a1f84cab907c7d6c5cf1563 (patch)
tree58581a02cc06bb1a2991209c9e4d559353cbec6f
parentb52402c783d8c16b11f146a244bb21086a94bf84 (diff)
[PATCH] cpuset: remove function attribute const
gcc-4 warns with include/linux/cpuset.h:21: warning: type qualifiers ignored on function return type cpuset_cpus_allowed is declared with const extern const cpumask_t cpuset_cpus_allowed(const struct task_struct *p); First const should be __attribute__((const)), but the gcc manual explains that: "Note that a function that has pointer arguments and examines the data pointed to must not be declared const. Likewise, a function that calls a non-const function usually must not be const. It does not make sense for a const function to return void." The following patch remove const from the function declaration. Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org> Acked-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/cpuset.h2
-rw-r--r--kernel/cpuset.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 2d9a500d994d..3438233305a3 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -18,7 +18,7 @@ extern int cpuset_init(void);
18extern void cpuset_init_smp(void); 18extern void cpuset_init_smp(void);
19extern void cpuset_fork(struct task_struct *p); 19extern void cpuset_fork(struct task_struct *p);
20extern void cpuset_exit(struct task_struct *p); 20extern void cpuset_exit(struct task_struct *p);
21extern const cpumask_t cpuset_cpus_allowed(const struct task_struct *p); 21extern cpumask_t cpuset_cpus_allowed(const struct task_struct *p);
22void cpuset_init_current_mems_allowed(void); 22void cpuset_init_current_mems_allowed(void);
23void cpuset_update_current_mems_allowed(void); 23void cpuset_update_current_mems_allowed(void);
24void cpuset_restrict_to_mems_allowed(unsigned long *nodes); 24void cpuset_restrict_to_mems_allowed(unsigned long *nodes);
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 69792bbe2281..961d74044deb 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1432,7 +1432,7 @@ void cpuset_exit(struct task_struct *tsk)
1432 * tasks cpuset. 1432 * tasks cpuset.
1433 **/ 1433 **/
1434 1434
1435const cpumask_t cpuset_cpus_allowed(const struct task_struct *tsk) 1435cpumask_t cpuset_cpus_allowed(const struct task_struct *tsk)
1436{ 1436{
1437 cpumask_t mask; 1437 cpumask_t mask;
1438 1438