diff options
| author | Alexander Potapenko <glider@google.com> | 2026-05-04 12:06:37 +0200 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-06-02 15:22:15 -0700 |
| commit | 8e0c2085c978ed6d9764d79fc785920360096f21 (patch) | |
| tree | 78cc3a3ef0d35981d1468163e256284d491c649d /lib | |
| parent | 418bffb6ba2474f445305dd2a5173d8a9ce446b3 (diff) | |
| download | ath-8e0c2085c978ed6d9764d79fc785920360096f21.tar.gz | |
lib/test_meminit: use && for bools
As pointed out by Dan Carpenter, test_kmemcache() was using a bitwise AND
on two bools instead of a boolean AND. Fix this for the sake of code
cleanliness.
Link: https://lore.kernel.org/20260504100637.1535762-1-glider@google.com
Fixes: 5015a300a522 ("lib: introduce test_meminit module")
Signed-off-by: Alexander Potapenko <glider@google.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/kernel-janitors/afOcIan1ap9kD26M@stanley.mountain/
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/test_meminit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_meminit.c b/lib/test_meminit.c index 6298f66c964bb..d028a6552cd61 100644 --- a/lib/test_meminit.c +++ b/lib/test_meminit.c @@ -387,7 +387,7 @@ static int __init test_kmemcache(int *total_failures) ctor = flags & 1; rcu = flags & 2; zero = flags & 4; - if (ctor & zero) + if (ctor && zero) continue; num_tests += do_kmem_cache_size(size, ctor, rcu, zero, &failures); |
