Searched refs:is_power_of_2 (Results 1 - 124 of 124) sorted by relevance

/linux-4.1.27/lib/
H A Diommu-helper.c13 BUG_ON(!is_power_of_2(boundary_size)); iommu_is_span_boundary()
H A Daverage.c39 WARN_ON(!is_power_of_2(weight) || !is_power_of_2(factor)); ewma_init()
H A Dtest-hexdump.c64 if (!is_power_of_2(gs) || gs > 8 || (len % gs != 0)) test_hexdump()
H A Dhexdump.c122 if (!is_power_of_2(groupsize) || groupsize > 8) hex_dump_to_buffer()
/linux-4.1.27/arch/x86/include/asm/
H A Ddiv64.h25 if (__builtin_constant_p(__base) && is_power_of_2(__base)) { \
/linux-4.1.27/drivers/scsi/bnx2i/
H A Dbnx2i_sysfs.c75 (is_power_of_2(val))) bnx2i_set_sq_info()
H A Dbnx2i_init.c515 if (sq_size && !is_power_of_2(sq_size)) bnx2i_mod_init()
H A Dbnx2i_hwi.c55 if (!is_power_of_2(hba->max_sqes)) bnx2i_adjust_qp_size()
58 if (!is_power_of_2(hba->max_rqes)) bnx2i_adjust_qp_size()
/linux-4.1.27/net/netfilter/
H A Dnft_payload.c134 if (len <= 4 && is_power_of_2(len) && IS_ALIGNED(offset, len) && nft_payload_select_ops()
/linux-4.1.27/sound/core/
H A Drtctimer.c134 !is_power_of_2(rtctimer_freq)) { rtctimer_init()
/linux-4.1.27/tools/include/linux/
H A Dlog2.h45 bool is_power_of_2(unsigned long n) is_power_of_2() function
/linux-4.1.27/include/linux/
H A Dlog2.h52 bool is_power_of_2(unsigned long n) is_power_of_2() function
/linux-4.1.27/drivers/md/
H A Ddm-exception-store.c165 if (!is_power_of_2(chunk_size)) { dm_exception_store_set_chunk_size()
H A Draid0.c316 if (is_power_of_2(chunk_sects)) { map_sector()
362 if (is_power_of_2(chunk_sectors)) raid0_mergeable_bvec()
499 if (likely(is_power_of_2(chunk_sects))) { is_io_in_chunk_boundary()
526 (likely(is_power_of_2(chunk_sects)) raid0_make_request()
H A Ddm-log.c349 if (!is_power_of_2(region_size)) _check_region_size()
H A Ddm-raid.c353 if (!is_power_of_2(region_size)) { validate_region_size()
517 } else if (!is_power_of_2(value)) { parse_raid_params()
H A Dbitmap.c509 if (!is_power_of_2(chunksize)) { bitmap_new_disk_sb()
634 else if (!is_power_of_2(chunksize)) bitmap_read_sb()
2335 !is_power_of_2(csize)) chunksize_store()
H A Ddm-crypt.c1577 !is_power_of_2(cc->tfms_count)) { crypt_ctr_cipher()
H A Draid5.c6456 !is_power_of_2(mddev->new_chunk_sectors)) { setup_conf()
7629 if (!is_power_of_2(new_chunk)) raid5_check_reshape()
7663 if (!is_power_of_2(new_chunk)) raid6_check_reshape()
H A Draid10.c3493 !is_power_of_2(chunk)) setup_geo()
/linux-4.1.27/drivers/net/wireless/rt2x00/
H A Drt2x00reg.h176 * Note that we cannot use the is_power_of_2() function since this
/linux-4.1.27/fs/pstore/
H A Dram.c469 if (pdata->record_size && !is_power_of_2(pdata->record_size)) ramoops_probe()
471 if (pdata->console_size && !is_power_of_2(pdata->console_size)) ramoops_probe()
473 if (pdata->ftrace_size && !is_power_of_2(pdata->ftrace_size)) ramoops_probe()
475 if (pdata->pmsg_size && !is_power_of_2(pdata->pmsg_size)) ramoops_probe()
/linux-4.1.27/arch/ia64/mm/
H A Dhugetlbpage.c184 if (*str || !is_power_of_2(size) || !(tr_pages & size) || hugetlb_setup_sz()
/linux-4.1.27/drivers/gpu/drm/amd/amdkfd/
H A Dkfd_chardev.c162 if (!is_power_of_2(args->ring_size) && (args->ring_size != 0)) { set_queue_properties_from_user()
359 if (!is_power_of_2(args->ring_size) && (args->ring_size != 0)) { kfd_ioctl_update_queue()
/linux-4.1.27/arch/powerpc/mm/
H A Dinit_64.c124 * moment, gcc doesn't seem to recognize is_power_of_2 as a pgtable_cache_add()
126 BUG_ON(!is_power_of_2(minalign)); pgtable_cache_add()
H A Dhugetlbpage.c792 if (is_power_of_2(x)) is_power_of_4()
808 if (!is_power_of_2(size) add_huge_page_size()
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
H A Den_clock.c248 u64 max_val_cycles_rounded = is_power_of_2(max_val_cycles + 1) ? freq_to_shift()
H A Dmr.c921 if (!is_power_of_2(dev->caps.num_mpts)) mlx4_init_mr_table()
H A Den_ethtool.c1174 if (!is_power_of_2(rss_rings)) mlx4_en_set_rxfh()
/linux-4.1.27/drivers/input/keyboard/
H A Dcap11xx.c261 if (is_power_of_2(gain32) && gain32 <= 8) cap11xx_i2c_probe()
H A Dpmic8xxx-keypad.c413 !is_power_of_2(scan_delay_ms)) { pmic8xxx_kpd_init()
/linux-4.1.27/arch/microblaze/mm/
H A Dpgtable.c184 #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) macro
/linux-4.1.27/crypto/
H A Dcbc.c230 if (!is_power_of_2(alg->cra_blocksize)) crypto_cbc_alloc()
H A Dcts.c290 if (!is_power_of_2(alg->cra_blocksize)) crypto_cts_alloc()
/linux-4.1.27/fs/hfs/
H A Dbtree.c95 if (!is_power_of_2(size)) hfs_btree_open()
/linux-4.1.27/arch/s390/kernel/
H A Dirq.c207 BUILD_BUG_ON(!is_power_of_2(ARRAY_SIZE(ext_int_hash))); ext_hash()
/linux-4.1.27/net/core/
H A Dsysctl_net_core.c192 if (!ret && write && !is_power_of_2(*ptr)) { flow_limit_table_len_sysctl()
/linux-4.1.27/drivers/iio/adc/
H A Dqcom-spmi-vadc.c496 if (!is_power_of_2(value) || value < VADC_DECIMATION_MIN || vadc_decimation_from_dt()
533 if (!is_power_of_2(value) || value > VADC_AVG_SAMPLES_MAX) vadc_avg_samples_from_dt()
/linux-4.1.27/drivers/net/wireless/ath/ath5k/
H A Dqcu.c117 if (is_power_of_2(cw_req + 1)) ath5k_cw_validate()
121 if (is_power_of_2(cw_req)) ath5k_cw_validate()
/linux-4.1.27/drivers/misc/eeprom/
H A Dat24.c530 if (!is_power_of_2(chip.byte_len)) at24_probe()
537 if (!is_power_of_2(chip.page_size)) at24_probe()
/linux-4.1.27/arch/powerpc/kvm/
H A De500_mmu.c767 if (!is_power_of_2(params.tlb_ways[0])) kvm_vcpu_ioctl_config_tlb()
771 if (!is_power_of_2(sets)) kvm_vcpu_ioctl_config_tlb()
H A De500_mmu_host.c787 if (!is_power_of_2(host_tlb_params[0].entries) || e500_mmu_host_init()
788 !is_power_of_2(host_tlb_params[0].ways) || e500_mmu_host_init()
H A Dbook3s.c832 if (!is_power_of_2(size) || (size > sizeof(buf))) kvmppc_h_logical_ci_load()
/linux-4.1.27/drivers/staging/fwserial/
H A Ddma_fifo.c72 if (!is_power_of_2(align) || size < 0) dma_fifo_alloc()
/linux-4.1.27/fs/hfsplus/
H A Dbtree.c231 if (!is_power_of_2(size)) hfs_btree_open()
/linux-4.1.27/arch/powerpc/sysdev/
H A Dfsl_rmu.c682 desc->dwcnt = is_power_of_2(len) ? len : 1 << get_bitmask_order(len); fsl_add_outb_message()
719 (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) { fsl_open_outb_mbox()
852 (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) { fsl_open_inb_mbox()
H A Dppc4xx_pci.c234 if ((plb_addr + size) > 0xffffffffull || !is_power_of_2(size) || ppc4xx_setup_one_pci_PMM()
424 if (!is_power_of_2(size) || size < 0x1000 || ppc4xx_setup_one_pcix_POM()
1729 if (!is_power_of_2(size) || ppc4xx_setup_one_pciex_POM()
/linux-4.1.27/tools/perf/util/
H A Devlist.c911 if (!is_power_of_2(pages)) perf_evlist__mmap_size()
913 } else if (!is_power_of_2(pages)) perf_evlist__mmap_size()
948 } else if (!is_power_of_2(pages)) { parse_pages_arg()
/linux-4.1.27/drivers/iommu/
H A Diova.c66 BUG_ON((granule > PAGE_SIZE) || !is_power_of_2(granule)); init_iova_domain()
H A Damd_iommu.c1291 BUG_ON(!is_power_of_2(page_size)); alloc_pte()
1441 BUG_ON(!is_power_of_2(page_size)); iommu_unmap_page()
1461 BUG_ON(unmapped && !is_power_of_2(unmapped)); iommu_unmap_page()
H A Dfsl_pamu_domain.c1029 if (w_count > pamu_get_max_subwin_cnt() || !is_power_of_2(w_count)) { fsl_pamu_set_windows()
/linux-4.1.27/drivers/i2c/busses/
H A Di2c-ocores.c329 if (!is_power_of_2(val)) { ocores_i2c_of_probe()
/linux-4.1.27/drivers/net/wireless/ath/ath10k/
H A Dspectral.c451 if (!is_power_of_2(val)) write_file_spectral_bins()
H A Dhtt_rx.c526 if (!is_power_of_2(htt->rx_ring.size)) { ath10k_htt_rx_alloc()
/linux-4.1.27/drivers/memstick/host/
H A Dtifm_ms.c272 if (!is_power_of_2(data_len)) tifm_ms_issue_cmd()
/linux-4.1.27/drivers/gpio/
H A Dgpio-generic.c489 if (!is_power_of_2(sz)) bgpio_init()
/linux-4.1.27/drivers/infiniband/hw/qib/
H A Dqib_mr.c265 if (is_power_of_2(umem->page_size)) qib_reg_user_mr()
H A Dqib_init.c214 BUG_ON(!is_power_of_2(rcd->rcvegrbufs_perchunk)); qib_create_ctxtdata()
H A Dqib_iba6120.c3291 BUG_ON(!is_power_of_2(dd->rcvegrbufsize)); init_6120_variables()
H A Dqib_iba7220.c4097 BUG_ON(!is_power_of_2(dd->rcvegrbufsize)); qib_init_7220_variables()
H A Dqib_iba7322.c6657 BUG_ON(!is_power_of_2(dd->rcvegrbufsize)); qib_init_7322_variables()
/linux-4.1.27/drivers/clk/ti/
H A Ddivider.c139 return is_power_of_2(div); _is_valid_div()
/linux-4.1.27/drivers/clocksource/
H A Dcadence_ttc_timer.c256 if (!is_power_of_2(factor)) ttc_rate_change_clocksource_cb()
/linux-4.1.27/arch/x86/kernel/
H A Dhw_breakpoint.c279 if (!is_power_of_2(bp->attr.bp_len)) arch_build_bp_info()
/linux-4.1.27/drivers/clk/
H A Dclk-divider.c162 return is_power_of_2(div); _is_valid_div()
/linux-4.1.27/mm/
H A Dcma.c260 if (alignment && !is_power_of_2(alignment)) cma_declare_contiguous()
H A Dsparse.c536 BUILD_BUG_ON(!is_power_of_2(sizeof(struct mem_section))); sparse_init()
H A Dvmalloc.c362 BUG_ON(!is_power_of_2(align)); alloc_vmap_area()
2395 BUG_ON(align & ~PAGE_MASK || !is_power_of_2(align)); pcpu_get_vm_areas()
/linux-4.1.27/drivers/md/bcache/
H A Dbset.c560 struct bkey *l = is_power_of_2(j) make_bfloat()
564 struct bkey *r = is_power_of_2(j + 1) make_bfloat()
H A Dsuper.c175 if (!is_power_of_2(sb->block_size) || read_super()
177 !is_power_of_2(sb->bucket_size) || read_super()
/linux-4.1.27/drivers/mtd/
H A Dmtdcore.c403 if (is_power_of_2(mtd->erasesize)) add_mtd_device()
408 if (is_power_of_2(mtd->writesize)) add_mtd_device()
H A Dsm_ftl.c165 if (lba_test && !is_power_of_2(lba_test)) sm_read_lba()
288 if (oob->reserved != 0xFFFFFFFF && !is_power_of_2(~oob->reserved)) sm_read_sector()
/linux-4.1.27/drivers/bus/
H A Dmvebu-mbus.c310 if (!is_power_of_2(size)) { mvebu_mbus_setup_window()
482 if (!is_power_of_2(wsize) || mvebu_devs_debug_show()
/linux-4.1.27/drivers/rtc/
H A Drtc-m41t80.c282 if (!is_power_of_2(val)) m41t80_sysfs_set_sqwfreq()
H A Drtc-s3c.c149 if (!is_power_of_2(freq)) s3c_rtc_setfreq()
/linux-4.1.27/drivers/gpu/drm/nouveau/
H A Dnouveau_gem.c230 if (is_power_of_2(nvbo->valid_domains)) nouveau_gem_info()
/linux-4.1.27/fs/jbd/
H A Drevoke.c273 J_ASSERT(is_power_of_2(hash_size)); journal_init_revoke()
/linux-4.1.27/fs/jbd2/
H A Drevoke.c270 J_ASSERT(is_power_of_2(hash_size)); jbd2_journal_init_revoke()
/linux-4.1.27/arch/s390/pci/
H A Dpci.c874 BUILD_BUG_ON(!is_power_of_2(__alignof__(struct zpci_fmb)) || zpci_mem_init()
/linux-4.1.27/net/sched/
H A Dsch_sfq.c652 (!is_power_of_2(ctl->divisor) || ctl->divisor > 65536)) sfq_change()
/linux-4.1.27/drivers/mtd/ubi/
H A Dbuild.c688 if (!is_power_of_2(ubi->min_io_size)) { io_init()
705 !is_power_of_2(ubi->max_write_size)) { io_init()
/linux-4.1.27/drivers/net/ethernet/freescale/
H A Dgianfar_ethtool.c483 if (!is_power_of_2(rvals->rx_pending)) { gfar_sringparam()
491 if (!is_power_of_2(rvals->tx_pending)) { gfar_sringparam()
/linux-4.1.27/fs/ufs/
H A Dsuper.c1049 if (!is_power_of_2(uspi->s_fsize)) { ufs_fill_super()
1064 if (!is_power_of_2(uspi->s_bsize)) { ufs_fill_super()
/linux-4.1.27/fs/fat/
H A Dinode.c1394 if (!is_power_of_2(bpb->fat_sector_size) fat_read_bpb()
1403 if (!is_power_of_2(bpb->fat_sec_per_clus)) { fat_read_bpb()
/linux-4.1.27/drivers/rapidio/devices/
H A Dtsi721.c891 if (!is_power_of_2(size) || size < 0x1000 || tsi721_rio_map_inb_mem()
1498 (!is_power_of_2(entries)) || mbox >= RIO_MAX_MBOX) { tsi721_open_outb_mbox()
1790 (!is_power_of_2(entries)) || mbox >= RIO_MAX_MBOX) { tsi721_open_inb_mbox()
/linux-4.1.27/fs/ubifs/
H A Dsuper.c530 if (!is_power_of_2(c->min_io_size)) { init_constants_early()
541 !is_power_of_2(c->max_write_size)) { init_constants_early()
/linux-4.1.27/fs/xfs/libxfs/
H A Dxfs_inode_fork.c1372 if (!is_power_of_2(new_size)){ xfs_iext_realloc_direct()
1389 if (!is_power_of_2(new_size)) { xfs_iext_realloc_direct()
/linux-4.1.27/drivers/hwmon/
H A Dadt7470.c866 if (input < 1 || !is_power_of_2(input)) cvt_auto_temp()
H A Dadt7462.c1407 if (input < 1 || !is_power_of_2(input)) cvt_auto_temp()
/linux-4.1.27/drivers/mmc/host/
H A Dtifm_sd.c645 if (mrq->data && !is_power_of_2(mrq->data->blksz)) tifm_sd_request()
H A Dmmci.c251 if (!is_power_of_2(data->blksz)) { mmci_validate_data()
/linux-4.1.27/drivers/scsi/
H A Dlibiscsi_tcp.c1190 if (!r2ts || !is_power_of_2(r2ts)) iscsi_tcp_set_max_r2t()
H A Dlibiscsi.c2755 if (!is_power_of_2(total_cmds)) { iscsi_session_setup()
/linux-4.1.27/drivers/s390/block/
H A Ddasd_int.h643 if (bsize < 512 || bsize > 4096 || !is_power_of_2(bsize)) dasd_check_blocksize()
/linux-4.1.27/block/
H A Dblk-settings.c293 BUG_ON(!is_power_of_2(chunk_sectors)); blk_queue_chunk_sectors()
/linux-4.1.27/drivers/block/rsxx/
H A Ddma.c866 if (!is_power_of_2(stripe_size8)) { rsxx_dma_stripe_setup()
/linux-4.1.27/fs/ntfs/
H A Dlogfile.c69 !is_power_of_2(logfile_log_page_size)) { ntfs_check_restart_page_header()
H A Dinode.c1583 if (!is_power_of_2(ni->itype.index.block_size)) { ntfs_read_locked_index_inode()
/linux-4.1.27/arch/arm/mach-lpc32xx/
H A Dclock.c245 if ((!is_power_of_2(PllSetup->pll_p)) || (tv > 3)) local_clk_pll_setup()
/linux-4.1.27/sound/soc/codecs/
H A Dsta350.c1180 if (is_power_of_2(tmp8) && tmp8 >= 1 && tmp8 <= 128) sta350_probe_dt()
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb3/
H A Dcxgb3_main.c2396 if (!is_power_of_2(m.rx_pg_sz) ||
2397 !is_power_of_2(m.tx_pg_sz))
/linux-4.1.27/drivers/dma/
H A Dste_dma40.c2772 !is_power_of_2(src_addr_width) || d40_set_runtime_config()
2773 !is_power_of_2(dst_addr_width)) d40_set_runtime_config()
/linux-4.1.27/drivers/scsi/bfa/
H A Dbfad.c788 is_power_of_2(pcie_max_read_reqsz)) { bfad_pci_init()
/linux-4.1.27/arch/sparc/mm/
H A Dsrmmu.c210 if (!is_power_of_2(size)) { srmmu_free_nocache()
/linux-4.1.27/fs/xfs/
H A Dxfs_super.c430 !is_power_of_2(mp->m_logbsize))) { xfs_parseargs()
/linux-4.1.27/fs/ext2/
H A Dsuper.c964 !is_power_of_2(sbi->s_inode_size) || ext2_fill_super()
/linux-4.1.27/fs/ext4/
H A Dsuper.c1524 if (arg && (arg > (1 << 30) || !is_power_of_2(arg))) { handle_mount_opt()
2529 if (t && (!is_power_of_2(t) || t > 0x40000000)) inode_readahead_blks_store()
3773 (!is_power_of_2(sbi->s_inode_size)) || ext4_fill_super()
3788 !is_power_of_2(sbi->s_desc_size)) { ext4_fill_super()
/linux-4.1.27/drivers/pci/
H A Dpci.c4034 if (mmrbc < 512 || mmrbc > 4096 || !is_power_of_2(mmrbc)) pcix_set_mmrbc()
4095 if (rq < 128 || rq > 4096 || !is_power_of_2(rq)) pcie_set_readrq()
4146 if (mps < 128 || mps > 4096 || !is_power_of_2(mps)) pcie_set_mps()
/linux-4.1.27/drivers/net/wireless/iwlwifi/pcie/
H A Dtx.c106 if (WARN_ON(!is_power_of_2(slots_num))) iwl_queue_init()
/linux-4.1.27/drivers/usb/gadget/udc/
H A Dudc-xilinx.c839 if (!(is_power_of_2(maxpacket) && maxpacket >= 8 && __xudc_ep_enable()
/linux-4.1.27/fs/udf/
H A Dsuper.c1375 if (!is_power_of_2(sdata->s_packet_len)) { udf_load_sparable_map()
/linux-4.1.27/fs/
H A Dblock_dev.c96 if (size > PAGE_SIZE || size < 512 || !is_power_of_2(size)) set_blocksize()
H A Dnamespace.c2003 if (!is_power_of_2(type)) flags_to_propagation_type()
/linux-4.1.27/net/bridge/
H A Dbr_multicast.c2128 if (!is_power_of_2(val)) br_multicast_set_hash_max()
/linux-4.1.27/drivers/mmc/core/
H A Dcore.c1822 if (is_power_of_2(card->erase_size)) mmc_init_erase()
/linux-4.1.27/drivers/net/ethernet/qlogic/qlcnic/
H A Dqlcnic_main.c4047 if (!is_power_of_2(ring_cnt)) { qlcnic_validate_rings()
/linux-4.1.27/drivers/crypto/
H A Dtalitos.c2686 if (!is_power_of_2(priv->num_channels) || !priv->chfifo_len || talitos_probe()
/linux-4.1.27/fs/ext3/
H A Dsuper.c1879 (!is_power_of_2(sbi->s_inode_size)) || ext3_fill_super()
/linux-4.1.27/net/netfilter/ipvs/
H A Dip_vs_ctl.c1683 if (*valp < 1 || !is_power_of_2(*valp)) { proc_do_sync_ports()
/linux-4.1.27/drivers/ata/
H A Dlibata-core.c2286 if (is_power_of_2(max) && is_power_of_2(cnt)) ata_dev_configure()
/linux-4.1.27/kernel/events/
H A Dcore.c4632 if (!is_power_of_2(nr_pages)) perf_mmap()
4654 if (nr_pages != 0 && !is_power_of_2(nr_pages)) perf_mmap()
/linux-4.1.27/drivers/net/ethernet/myricom/myri10ge/
H A Dmyri10ge.c2561 while (!is_power_of_2(big_pow2)) myri10ge_open()
/linux-4.1.27/drivers/net/wireless/iwlegacy/
H A Dcommon.c2956 BUG_ON(!is_power_of_2(slots)); il_queue_init()
/linux-4.1.27/drivers/gpu/drm/i915/
H A Dintel_pm.c1122 #define single_plane_enabled(mask) is_power_of_2(mask)

Completed in 5639 milliseconds