diff options
author | Luis R. Rodriguez <lrodriguez@Atheros.com> | 2009-09-08 11:34:50 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-09-08 11:34:50 -0400 |
commit | 4a558dd6f93d419cd318958577e25492bd09e960 (patch) | |
tree | c65e798d06ad21b51cd2a1c4c7f232e0bcf28b03 /mm/kmemleak.c | |
parent | 179a8100e12d0053f4b368ea3358dd9a0fc6cb94 (diff) |
kmemleak: use bool for true/false questions
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'mm/kmemleak.c')
-rw-r--r-- | mm/kmemleak.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 1563de456441..f5042b4a7b95 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c | |||
@@ -308,17 +308,17 @@ static void hex_dump_object(struct seq_file *seq, | |||
308 | * Newly created objects don't have any color assigned (object->count == -1) | 308 | * Newly created objects don't have any color assigned (object->count == -1) |
309 | * before the next memory scan when they become white. | 309 | * before the next memory scan when they become white. |
310 | */ | 310 | */ |
311 | static int color_white(const struct kmemleak_object *object) | 311 | static bool color_white(const struct kmemleak_object *object) |
312 | { | 312 | { |
313 | return object->count != -1 && object->count < object->min_count; | 313 | return object->count != -1 && object->count < object->min_count; |
314 | } | 314 | } |
315 | 315 | ||
316 | static int color_gray(const struct kmemleak_object *object) | 316 | static bool color_gray(const struct kmemleak_object *object) |
317 | { | 317 | { |
318 | return object->min_count != -1 && object->count >= object->min_count; | 318 | return object->min_count != -1 && object->count >= object->min_count; |
319 | } | 319 | } |
320 | 320 | ||
321 | static int color_black(const struct kmemleak_object *object) | 321 | static bool color_black(const struct kmemleak_object *object) |
322 | { | 322 | { |
323 | return object->min_count == -1; | 323 | return object->min_count == -1; |
324 | } | 324 | } |
@@ -328,7 +328,7 @@ static int color_black(const struct kmemleak_object *object) | |||
328 | * not be deleted and have a minimum age to avoid false positives caused by | 328 | * not be deleted and have a minimum age to avoid false positives caused by |
329 | * pointers temporarily stored in CPU registers. | 329 | * pointers temporarily stored in CPU registers. |
330 | */ | 330 | */ |
331 | static int unreferenced_object(struct kmemleak_object *object) | 331 | static bool unreferenced_object(struct kmemleak_object *object) |
332 | { | 332 | { |
333 | return (object->flags & OBJECT_ALLOCATED) && color_white(object) && | 333 | return (object->flags & OBJECT_ALLOCATED) && color_white(object) && |
334 | time_before_eq(object->jiffies + jiffies_min_age, | 334 | time_before_eq(object->jiffies + jiffies_min_age, |