| /linux/include/linux/ |
| H A D | random.h | 79 if (likely(is_power_of_2(ceil) || (u8)mult >= (1U << 8) % ceil)) in get_random_u32_below() 83 if (likely(is_power_of_2(ceil) || (u16)mult >= (1U << 16) % ceil)) in get_random_u32_below() 87 if (likely(is_power_of_2(ceil) || (u32)mult >= -ceil % ceil)) in get_random_u32_below()
|
| H A D | iommu-helper.h | 23 BUG_ON(!is_power_of_2(boundary_size)); in iommu_is_span_boundary()
|
| H A D | generic-radix-tree.h | 165 if (!is_power_of_2(obj_size)) { in __idx_to_offset() 323 if (!is_power_of_2(obj_size) && in __genradix_iter_advance()
|
| /linux/tools/testing/selftests/riscv/hwprobe/ |
| H A D | cbo.c | 102 static bool is_power_of_2(__u64 n) in is_power_of_2() function 131 is_power_of_2(block_size), "Zicbop block size\n"); in test_zicbop() 164 is_power_of_2(block_size), "Zicbom block size\n"); in test_zicbom() 189 is_power_of_2(block_size), "Zicboz block size\n"); in test_zicboz() 196 if (got_fault || !is_power_of_2(block_size)) { in test_zicboz()
|
| /linux/fs/verity/ |
| H A D | hash_algs.c | 181 BUG_ON(!is_power_of_2(alg->digest_size)); in fsverity_check_hash_algs() 182 BUG_ON(!is_power_of_2(alg->block_size)); in fsverity_check_hash_algs()
|
| /linux/fs/xfs/ |
| H A D | xfs_platform.h | 215 return is_power_of_2(b) ? ilog2(b) : -1; in log2_if_power2() 221 return is_power_of_2(b) ? b - 1 : 0; in mask64_if_power2()
|
| /linux/arch/x86/kvm/ |
| H A D | kvm_cache_regs.h | 181 BUILD_BUG_ON(!is_power_of_2(cr0_bit)); in kvm_is_cr0_bit_set() 203 BUILD_BUG_ON(!is_power_of_2(cr4_bit)); in kvm_is_cr4_bit_set()
|
| /linux/tools/perf/util/bpf_skel/ |
| H A D | augmented_raw_syscalls.bpf.c | 25 #define is_power_of_2(n) (n != 0 && ((n & (n - 1)) == 0)) macro 179 …_Static_assert(is_power_of_2(sizeof(augmented_arg->value)), "sizeof(augmented_arg->value) needs to… in augmented_arg__read_str() 217 …_Static_assert(is_power_of_2(sizeof(augmented_args->arg.saddr)), "sizeof(augmented_args->arg.saddr… in sys_enter_connect()
|
| /linux/tools/include/linux/ |
| H A D | log2.h | 38 bool is_power_of_2(unsigned long n) in is_power_of_2() function
|
| /linux/drivers/input/keyboard/ |
| H A D | cap11xx.c | 212 } else if (is_power_of_2(u32_val) && u32_val <= 8) { in cap11xx_init_keys() 242 if (!is_power_of_2(u32_val) || u32_val > 128) { in cap11xx_init_keys() 281 if (!is_power_of_2(priv->calib_sensitivities[i]) || in cap11xx_init_keys()
|
| /linux/drivers/dma/qcom/ |
| H A D | hidma_mgmt.c | 67 if (!is_power_of_2(mgmtdev->max_write_request) || in hidma_mgmt_setup() 75 if (!is_power_of_2(mgmtdev->max_read_request) || in hidma_mgmt_setup()
|
| /linux/arch/arm/mm/ |
| H A D | cache-uniphier.c | 350 !is_power_of_2(data->line_size)) { in __uniphier_cache_init() 358 !is_power_of_2(data->nsets)) { in __uniphier_cache_init()
|
| /linux/drivers/gpu/drm/i915/ |
| H A D | i915_ioctl.c | 57 GEM_BUG_ON(!is_power_of_2(entry->size)); in i915_reg_read_ioctl()
|
| /linux/drivers/scsi/bnx2i/ |
| H A D | bnx2i_sysfs.c | 77 (is_power_of_2(val))) in bnx2i_set_sq_info()
|
| /linux/drivers/net/ethernet/huawei/hinic/ |
| H A D | hinic_hw_wq.c | 513 if (!is_power_of_2(wqebb_size)) { in hinic_wq_allocate() 532 if (!is_power_of_2(num_wqebbs_per_page)) { in hinic_wq_allocate() 610 if (!is_power_of_2(wqebb_size)) { in hinic_wqs_cmdq_alloc() 629 if (!is_power_of_2(num_wqebbs_per_page)) { in hinic_wqs_cmdq_alloc()
|
| /linux/block/ |
| H A D | blk-settings.c | 299 if (WARN_ON_ONCE(!is_power_of_2(lim->atomic_write_hw_unit_min))) in blk_validate_atomic_write_limits() 302 if (WARN_ON_ONCE(!is_power_of_2(lim->atomic_write_hw_unit_max))) in blk_validate_atomic_write_limits() 335 if (!is_power_of_2(boundary_sectors)) in blk_validate_atomic_write_limits() 372 } else if (!is_power_of_2(lim->physical_block_size)) { in blk_validate_limits()
|
| /linux/fs/pstore/ |
| H A D | ram.c | 765 if (pdata->record_size && !is_power_of_2(pdata->record_size)) in ramoops_probe() 767 if (pdata->console_size && !is_power_of_2(pdata->console_size)) in ramoops_probe() 769 if (pdata->ftrace_size && !is_power_of_2(pdata->ftrace_size)) in ramoops_probe() 771 if (pdata->pmsg_size && !is_power_of_2(pdata->pmsg_size)) in ramoops_probe()
|
| /linux/drivers/net/ethernet/broadcom/bnge/ |
| H A D | bnge_resc.h | 87 if (!is_power_of_2(blks)) in bnge_adjust_pow_two()
|
| /linux/drivers/cxl/ |
| H A D | cxl.h | 112 !is_power_of_2(granularity)) in granularity_to_eig() 122 if (is_power_of_2(ways)) { in ways_to_eiw() 129 if (!is_power_of_2(ways)) in ways_to_eiw()
|
| /linux/drivers/infiniband/hw/vmw_pvrdma/ |
| H A D | pvrdma_doorbell.c | 58 if (!is_power_of_2(num)) in pvrdma_uar_table_init()
|
| /linux/drivers/media/rc/img-ir/ |
| H A D | img-ir-sony.c | 75 if (!is_power_of_2(protocols)) { in img_ir_sony_filter()
|
| H A D | img-ir-nec.c | 69 if (!is_power_of_2(protocols)) { in img_ir_nec_filter()
|
| /linux/drivers/gpu/drm/i915/gt/ |
| H A D | intel_ring.h | 137 GEM_BUG_ON(!is_power_of_2(size)); in __intel_ring_space()
|
| /linux/arch/x86/include/asm/ |
| H A D | div64.h | 26 if (__builtin_constant_p(__base) && is_power_of_2(__base)) { \
|
| /linux/drivers/net/ipa/ |
| H A D | reg.h | 87 if (WARN_ON(!is_power_of_2(fmask))) in reg_bit()
|