tree 58581a02cc06bb1a2991209c9e4d559353cbec6f
parent b52402c783d8c16b11f146a244bb21086a94bf84
author Benoit Boissinot <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:25:59 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:25:59 -0700
[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 <[EMAIL PROTECTED]>
Acked-by: Paul Jackson <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
linux/cpuset.h | 2 +-
cpuset.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: include/linux/cpuset.h
===================================================================
--- 22b6a4a3623ba2eae08113367eab8b59929f43c0/include/linux/cpuset.h
(mode:100644 sha1:2d9a500d994d66f20147ca8646c89c7d08720efe)
+++ 58581a02cc06bb1a2991209c9e4d559353cbec6f/include/linux/cpuset.h
(mode:100644 sha1:3438233305a3aecb1674d527744117f22bd55d95)
@@ -18,7 +18,7 @@
extern void cpuset_init_smp(void);
extern void cpuset_fork(struct task_struct *p);
extern void cpuset_exit(struct task_struct *p);
-extern const cpumask_t cpuset_cpus_allowed(const struct task_struct *p);
+extern cpumask_t cpuset_cpus_allowed(const struct task_struct *p);
void cpuset_init_current_mems_allowed(void);
void cpuset_update_current_mems_allowed(void);
void cpuset_restrict_to_mems_allowed(unsigned long *nodes);
Index: kernel/cpuset.c
===================================================================
--- 22b6a4a3623ba2eae08113367eab8b59929f43c0/kernel/cpuset.c (mode:100644
sha1:69792bbe22817b6289fc20d1669e1402ab36395e)
+++ 58581a02cc06bb1a2991209c9e4d559353cbec6f/kernel/cpuset.c (mode:100644
sha1:961d74044deb0b08f8ce237e4f86c700da5e768a)
@@ -1432,7 +1432,7 @@
* tasks cpuset.
**/
-const cpumask_t cpuset_cpus_allowed(const struct task_struct *tsk)
+cpumask_t cpuset_cpus_allowed(const struct task_struct *tsk)
{
cpumask_t mask;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html