Commit 7b5b9ef0e17d52c188fe73ea78e884fe67079e6c
Committed by
Linus Torvalds
1 parent
0b1303fcf2
Exists in
master
and in
4 other branches
[PATCH] cpuset cleanup not not operators
Since the test_bit() bit operator is boolean (return 0 or 1), the double not "!!" operations needed to convert a scalar (zero or not zero) to a boolean are not needed. Signed-off-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff
kernel/cpuset.c
| ... | ... | @@ -114,27 +114,27 @@ |
| 114 | 114 | /* convenient tests for these bits */ |
| 115 | 115 | static inline int is_cpu_exclusive(const struct cpuset *cs) |
| 116 | 116 | { |
| 117 | - return !!test_bit(CS_CPU_EXCLUSIVE, &cs->flags); | |
| 117 | + return test_bit(CS_CPU_EXCLUSIVE, &cs->flags); | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | static inline int is_mem_exclusive(const struct cpuset *cs) |
| 121 | 121 | { |
| 122 | - return !!test_bit(CS_MEM_EXCLUSIVE, &cs->flags); | |
| 122 | + return test_bit(CS_MEM_EXCLUSIVE, &cs->flags); | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | static inline int is_removed(const struct cpuset *cs) |
| 126 | 126 | { |
| 127 | - return !!test_bit(CS_REMOVED, &cs->flags); | |
| 127 | + return test_bit(CS_REMOVED, &cs->flags); | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | static inline int notify_on_release(const struct cpuset *cs) |
| 131 | 131 | { |
| 132 | - return !!test_bit(CS_NOTIFY_ON_RELEASE, &cs->flags); | |
| 132 | + return test_bit(CS_NOTIFY_ON_RELEASE, &cs->flags); | |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | static inline int is_memory_migrate(const struct cpuset *cs) |
| 136 | 136 | { |
| 137 | - return !!test_bit(CS_MEMORY_MIGRATE, &cs->flags); | |
| 137 | + return test_bit(CS_MEMORY_MIGRATE, &cs->flags); | |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /* |