Searched refs:IS_POWER_OF_TWO (Results 1 – 5 of 5) sorted by relevance
14 zassert_false(IS_POWER_OF_TWO(-1)); in ZTEST()15 zassert_false(IS_POWER_OF_TWO(0)); in ZTEST()16 zassert_true(IS_POWER_OF_TWO(1)); in ZTEST()17 zassert_true(IS_POWER_OF_TWO(2)); in ZTEST()18 zassert_false(IS_POWER_OF_TWO(3)); in ZTEST()19 zassert_true(IS_POWER_OF_TWO(4)); in ZTEST()20 zassert_true(IS_POWER_OF_TWO(BIT(30))); in ZTEST()21 zassert_false(IS_POWER_OF_TWO(BIT(30) + 1)); in ZTEST()22 zassert_true(IS_POWER_OF_TWO(BIT64(32))); in ZTEST()23 zassert_false(IS_POWER_OF_TWO(BIT64(32) + 1)); in ZTEST()[all …]
77 #define IS_POWER_OF_TWO(x) (((x) != 0U) && (((x) & ((x) - 1U)) == 0U)) macro
115 BUILD_ASSERT(IS_POWER_OF_TWO(sz)); \
441 return IS_POWER_OF_TWO(x); in is_power_of_two()
1441 BUILD_ASSERT(IS_POWER_OF_TWO(GET_CACHE_ALIGNMENT(i)), \