ffs 867 arch/alpha/kernel/core_cia.c tmp = ffs(tmp); ffs 1043 arch/alpha/kernel/core_cia.c i = ffs(syn) - 1; ffs 1122 arch/alpha/kernel/core_cia.c switch (ffs(cia->cia_err & 0xfff) - 1) { ffs 345 arch/arc/include/asm/bitops.h return ffs(word) - 1; ffs 283 arch/arc/kernel/mcip.c if (ffs(destination_bits) == fls(destination_bits)) ffs 636 arch/arm/kernel/setup.c fs[i] = affinity ? ffs(affinity) - 1 : 0; ffs 1560 arch/arm64/kernel/insn.c imms |= 0xf << ffs(esz); ffs 135 arch/arm64/kernel/setup.c fs[i] = affinity ? ffs(affinity) - 1 : 0; ffs 151 arch/h8300/include/asm/bitops.h #include <asm-generic/bitops/ffs.h> ffs 2136 arch/ia64/hp/common/sba_iommu.c iovp_shift = ffs(page_size) - 1; ffs 156 arch/ia64/kernel/palinfo.c value >>= i = begin = ffs(value) - 1; ffs 119 arch/m68k/emu/nfblock.c dev->bshift = ffs(bsize) - 10; ffs 499 arch/m68k/include/asm/bitops.h return ffs(x) - 1; ffs 188 arch/mips/include/asm/fpu_emulator.h (ffs(FPU_CSR_ALL_X) - ffs(FPU_CSR_ALL_E)))); ffs 418 arch/mips/kernel/mips-cm.c tag_ecc ? (unsigned long)ffs(tag_way_bits) - 1 : ffs 137 arch/mips/kvm/entry.c scratch_vcpu[1] = ffs(kscratch_mask) - 1; ffs 144 arch/mips/kvm/entry.c scratch_tmp[1] = ffs(kscratch_mask) - 1; ffs 32 arch/mips/loongson64/common/mem.c if (bit != ffs(memsize + highmemsize)) ffs 42 arch/mips/loongson64/lemote-2f/irq.c irq = ffs(isr) - 1; ffs 287 arch/mips/loongson64/loongson-3/smp.c while ((irq = ffs(irqs))) { ffs 186 arch/mips/mm/c-octeon.c c->icache.waybit = ffs(icache_size / c->icache.ways) - 1; ffs 195 arch/mips/mm/c-octeon.c c->dcache.waybit = ffs(dcache_size / c->dcache.ways) - 1; ffs 338 arch/mips/mm/tlbex.c r = ffs(a); ffs 1263 arch/mips/net/ebpf_jit.c emit_instr(ctx, bbit0, dst, ffs((u32)insn->imm) - 1, b_off); ffs 1270 arch/mips/net/ebpf_jit.c emit_instr(ctx, bbit1, dst, ffs((u32)insn->imm) - 1, b_off); ffs 363 arch/mips/paravirt/paravirt-irq.c ip = ffs(pending) - 1 - STATUSB_IP0; ffs 204 arch/mips/pmcs-msp71xx/msp_irq_cic.c do_IRQ(ffs(pending) + MSP_CIC_INTBASE - 1); ffs 123 arch/mips/pmcs-msp71xx/msp_irq_per.c do_IRQ(ffs(pending) + MSP_PER_INTBASE - 1); ffs 101 arch/mips/pmcs-msp71xx/msp_irq_slp.c do_IRQ(ffs(pending) + intbase - 1); ffs 102 arch/mips/pnx833x/common/interrupts.c while ((pin = ffs(mask & 0xffff))) { ffs 211 arch/mips/sni/a20r.c irq = ffs(((cause & status) >> 8) & 0xf8); ffs 271 arch/mips/sni/pcimt.c irq = PCIMT_IRQ_INT2 + ffs(pend) - 1; ffs 187 arch/mips/sni/pcit.c irq = ffs((pending >> 16) & 0x7f); ffs 200 arch/mips/sni/pcit.c irq = ffs((pending >> 16) & 0x3f); ffs 463 arch/mips/sni/rm200.c irq = ffs(stat & mask & 0x1f); ffs 753 arch/powerpc/kernel/eeh.c old_mps = (ffs(pdn->mps) - 8) << 5; ffs 128 arch/powerpc/kvm/book3s_xive_template.c prio = ffs(pending) - 1; ffs 368 arch/powerpc/kvm/book3s_xive_template.c prio = ffs(pending) - 1; ffs 110 arch/powerpc/mm/book3s32/mmu.c unsigned int base_shift = (ffs(base) - 1) & 31; ffs 297 arch/powerpc/perf/mpc7450-pmu.c pmc = ffs(pmc_avail); ffs 214 arch/powerpc/platforms/4xx/uic.c src = 32 - ffs(msr); ffs 328 arch/powerpc/platforms/4xx/uic.c src = 32 - ffs(msr); ffs 93 arch/powerpc/platforms/52xx/media5200.c val = ffs((status & enable) >> MEDIA5200_IRQ_SHIFT); ffs 508 arch/powerpc/platforms/52xx/mpc52xx_pic.c irq = ffs(status) - 1; ffs 308 arch/powerpc/sysdev/fsl_msi.c intr_index = ffs(msir_value) - 1; ffs 138 arch/powerpc/sysdev/xive/common.c prio = ffs(xc->pending_prio) - 1; ffs 356 arch/s390/include/asm/cio.h return 8 - ffs(mask); ffs 35 arch/sparc/include/asm/bitops_64.h int ffs(int x); ffs 177 arch/um/os-Linux/signal.c while ((sig = ffs(pending)) != 0){ ffs 34 arch/unicore32/include/asm/bitops.h #define __ffs(x) (ffs(x) - 1) ffs 23 arch/x86/boot/a20.c int ffs = MAX_8042_FF; ffs 31 arch/x86/boot/a20.c if (!--ffs) ffs 409 arch/x86/kernel/apic/x2apic_uv_x.c unsigned int order = ffs(mem_block_size); ffs 119 arch/x86/kernel/cpu/resctrl/rdtgroup.c u32 closid = ffs(closid_free_map); ffs 236 arch/x86/kvm/lapic.c cluster[ffs(mask) - 1] = apic; ffs 1017 arch/x86/kvm/mmu.c clear_bit((ffs(shadow_accessed_mask) - 1), ffs 4594 arch/x86/kvm/svm.c index = ffs(dlid) - 1; ffs 4599 arch/x86/kvm/svm.c int apic = ffs(dlid & 0x0f) - 1; ffs 102 arch/xtensa/kernel/ptrace.c wmask = ((rotws ? WSBITS + 1 - ffs(rotws) : 0) << 4) | ffs 3085 drivers/ata/libata-core.c bit = ffs(mask) - 1; ffs 621 drivers/ata/pata_it821x.c mode = ffs(buf[51]); ffs 624 drivers/ata/pata_it821x.c mode = ffs(buf[49]); ffs 1152 drivers/ata/sata_fsl.c dev_num = ffs(dereg) - 1; ffs 977 drivers/ata/sata_nv.c while ((pos = ffs(check_commands))) { ffs 401 drivers/block/rsxx/core.c return state_strings[ffs(state)]; ffs 859 drivers/block/rsxx/dma.c card->_stripe.upper_shift = ffs(card->n_targets) - 1; ffs 862 drivers/block/rsxx/dma.c card->_stripe.target_shift = ffs(stripe_size8) - 1; ffs 185 drivers/bus/brcmstb_gisb.c return gdev->master_names[ffs(mask) - 1]; ffs 370 drivers/bus/brcmstb_gisb.c first = ffs(gdev->valid_mask) - 1; ffs 91 drivers/clk/at91/pmc.h #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) ffs 92 drivers/clk/at91/pmc.h #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask)) ffs 57 drivers/clk/clk-mux.c val = ffs(val) - 1; ffs 161 drivers/clk/clk-mux.c width = fls(mask) - ffs(mask) + 1; ffs 28 drivers/clk/imgtec/clk-boston.c return (val & mask) >> (ffs(mask) - 1); ffs 136 drivers/clk/ingenic/tcu.c return ffs(val & TCU_TCSR_PARENT_CLOCK_MASK) - 1; ffs 126 drivers/clk/mediatek/clk-pll.c val |= (ffs(postdiv) - 1) << pll->data->pd_shift; ffs 70 drivers/clk/mmp/clk-mix.c return ffs(val) - 1; ffs 1556 drivers/clk/tegra/clk-tegra210.c if (i == ffs(p)) ffs 55 drivers/clk/ti/mux.c val = ffs(val) - 1; ffs 75 drivers/clk/ti/mux.c index = (1 << ffs(index)); ffs 1024 drivers/clocksource/sh_cmt.c unsigned int hwidx = ffs(mask) - 1; ffs 103 drivers/crypto/ccp/ccp-dev.h #define QUEUE_SIZE_VAL ((ffs(COMMANDS_PER_QUEUE) - 2) & \ ffs 323 drivers/crypto/sahara.c u16 chasrc = ffs(SAHARA_ERRSTATUS_GET_CHASRC(error)); ffs 293 drivers/dma/at_xdmac.c csize = ffs(maxburst) - 1; ffs 557 drivers/dma/at_xdmac.c csize = ffs(atchan->sconfig.src_maxburst) - 1; ffs 563 drivers/dma/at_xdmac.c dwidth = ffs(atchan->sconfig.src_addr_width) - 1; ffs 580 drivers/dma/at_xdmac.c csize = ffs(atchan->sconfig.dst_maxburst) - 1; ffs 586 drivers/dma/at_xdmac.c dwidth = ffs(atchan->sconfig.dst_addr_width) - 1; ffs 2005 drivers/dma/coh901318.c i = ffs(status1) - 1; ffs 2052 drivers/dma/coh901318.c i = ffs(status2) - 1; ffs 267 drivers/dma/dma-jz4780.c int ord = ffs(val) - 1; ffs 188 drivers/dma/img-mdc-dma.c return ffs(bytes) - 1; ffs 284 drivers/dma/ipu/ipu_irq.c while ((line = ffs(status))) { ffs 534 drivers/dma/mv_xor.c i = ffs(~win_enable) - 1; ffs 696 drivers/dma/sprd-dma.c return ffs(buswidth) - 1; ffs 36 drivers/dma/stm32-mdma.c #define STM32_MDMA_SHIFT(n) (ffs(n) - 1) ffs 388 drivers/dma/stm32-mdma.c return ffs(width) - 1; ffs 610 drivers/dma/ti/omap-dma.c while ((channel = ffs(status)) != 0) { ffs 453 drivers/dma/zx_dma.c return ffs(width) - 1; ffs 972 drivers/extcon/extcon-arizona.c WARN_ON(ffs(lvl) - 1 >= info->num_micd_ranges); ffs 973 drivers/extcon/extcon-arizona.c if (lvl && ffs(lvl) - 1 < info->num_micd_ranges) { ffs 974 drivers/extcon/extcon-arizona.c key = info->micd_ranges[ffs(lvl) - 1].key; ffs 2101 drivers/firewire/ohci.c i = ffs(iso_event) - 1; ffs 2113 drivers/firewire/ohci.c i = ffs(iso_event) - 1; ffs 2948 drivers/firewire/ohci.c index = ffs(*mask) - 1; ffs 2960 drivers/firewire/ohci.c index = *channels & 1ULL << channel ? ffs(*mask) - 1 : -1; ffs 2972 drivers/firewire/ohci.c index = !ohci->mc_allocated ? ffs(*mask) - 1 : -1; ffs 141 drivers/gpio/gpio-mpc8xxx.c 32 - ffs(mask))); ffs 73 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c #define domain_string(domain) domain_bit_to_string[ffs(domain)-1] ffs 111 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c i = ffs(adev->gfx.scratch.free_mask); ffs 58 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c #define ras_err_str(i) (ras_error_string[ffs(i)]) ffs 1357 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c *frag = min((unsigned)ffs(start) - 1, (unsigned)fls64(end - start) - 1); ffs 821 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c inv_eng = ffs(vm_inv_engs[vmhub]); ffs 2035 drivers/gpu/drm/amd/amdgpu/si.c v = ffs(readrq) - 8; ffs 563 drivers/gpu/drm/amd/amdkfd/kfd_crat.c first_active_cu = ffs(cu_sibling_map_mask); ffs 606 drivers/gpu/drm/amd/amdkfd/kfd_device.c kfd->vm_info.first_vmid_kfd = ffs(gpu_resources->compute_vmid_bitmap)-1; ffs 203 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c bit = ffs(dqm->vmid_bitmap) - 1; ffs 397 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c bit = ffs(dqm->allocated_queues[pipe]) - 1; ffs 184 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c ffs(q->queue_size / sizeof(unsigned int)) - 1 - 1; ffs 211 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c ffs(q->eop_ring_buffer_size / sizeof(unsigned int)) - 1 - 1); ffs 355 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c m->sdmax_rlcx_rb_cntl = (ffs(q->queue_size / sizeof(unsigned int)) - 1) ffs 761 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 838 drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c low = mask ? (ffs(mask) - 1) : 0; ffs 4425 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c if (fls(tmp) != ffs(tmp)) ffs 4085 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c data->smc_state_table.gfx_boot_level = mask ? (ffs(mask) - 1) : 0; ffs 4098 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c data->smc_state_table.mem_boot_level = mask ? (ffs(mask) - 1) : 0; ffs 4112 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c data->smc_state_table.soc_boot_level = mask ? (ffs(mask) - 1) : 0; ffs 1889 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 1909 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 1930 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 1958 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c hard_min_level = mask ? (ffs(mask) - 1) : 0; ffs 2515 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 2542 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 2570 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 2598 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 2626 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c hard_min_level = mask ? (ffs(mask) - 1) : 0; ffs 2648 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 754 drivers/gpu/drm/amd/powerplay/navi10_ppt.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 1287 drivers/gpu/drm/amd/powerplay/vega20_ppt.c soft_min_level = mask ? (ffs(mask) - 1) : 0; ffs 450 drivers/gpu/drm/armada/armada_overlay.c CFG_CKMODE_MASK) >> ffs(CFG_CKMODE_MASK); ffs 311 drivers/gpu/drm/drm_blend.c BIT((ffs(rotation & DRM_MODE_ROTATE_MASK) + 1) ffs 1405 drivers/gpu/drm/etnaviv/etnaviv_gpu.c while ((event = ffs(intr)) != 0) { ffs 877 drivers/gpu/drm/gma500/cdv_intel_display.c ffs((dpll & ffs 336 drivers/gpu/drm/gma500/psb_intel_display.c ffs((dpll & ffs 2054 drivers/gpu/drm/i915/display/intel_ddi.c *pipe_mask = BIT(ffs(*pipe_mask) - 1); ffs 2087 drivers/gpu/drm/i915/display/intel_ddi.c *pipe = ffs(pipe_mask) - 1; ffs 11303 drivers/gpu/drm/i915/display/intel_display.c clock.n = ffs((fp & FP_N_PINEVIEW_DIV_MASK) >> FP_N_DIV_SHIFT) - 1; ffs 11312 drivers/gpu/drm/i915/display/intel_display.c clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW) >> ffs 11315 drivers/gpu/drm/i915/display/intel_display.c clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK) >> ffs 11342 drivers/gpu/drm/i915/display/intel_display.c clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS) >> ffs 825 drivers/gpu/drm/i915/display/intel_dp.c return ffs(pipes) - 1; ffs 106 drivers/gpu/drm/i915/display/vlv_dsi_pll.c (ffs(n) - 1) << DSI_PLL_N1_DIV_SHIFT | ffs 317 drivers/gpu/drm/i915/gt/intel_lrc.c return ((p->priority + 1) << I915_USER_PRIORITY_SHIFT) - ffs(p->used); ffs 393 drivers/gpu/drm/i915/gt/intel_workarounds.c ss = ffs(RUNTIME_INFO(i915)->sseu.subslice_7eu[i]) - 1; ffs 1301 drivers/gpu/drm/i915/i915_irq.c while ((slice = ffs(dev_priv->l3_parity.which_slice)) != 0) { ffs 2145 drivers/gpu/drm/i915/i915_irq.c int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK) >> ffs 2231 drivers/gpu/drm/i915/i915_irq.c int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK_CPT) >> ffs 2346 drivers/gpu/drm/i915/i915_reg.h #define I830_FENCE_SIZE_BITS(size) ((ffs((size) >> 19) - 1) << 8) ffs 2354 drivers/gpu/drm/i915/i915_reg.h #define I915_FENCE_SIZE_BITS(size) ((ffs((size) >> 20) - 1) << 8) ffs 6163 drivers/gpu/drm/i915/i915_reg.h #define CURSOR_STRIDE(x) ((ffs(x) - 9) << CURSOR_STRIDE_SHIFT) /* 256,512,1k,2k */ ffs 374 drivers/gpu/drm/i915/i915_syncmap.c while ((i = ffs(p->bitmap))) { ffs 231 drivers/gpu/drm/i915/i915_utils.h int __idx = ffs(mask) - 1; \ ffs 3783 drivers/gpu/drm/i915/intel_pm.c pipe = ffs(state->active_crtcs) - 1; ffs 346 drivers/gpu/drm/nouveau/dispnv04/dac.c '@' + ffs(dcb->or)); ffs 422 drivers/gpu/drm/nouveau/dispnv04/dac.c nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); ffs 431 drivers/gpu/drm/nouveau/dispnv04/dac.c uint32_t *dac_users = &nv04_display(dev)->dac_users[ffs(dcb->or) - 1]; ffs 456 drivers/gpu/drm/nouveau/dispnv04/dac.c (nv04_display(dev)->dac_users[ffs(dcb->or) - 1] & ~(1 << dcb->index)); ffs 541 drivers/gpu/drm/nouveau/dispnv04/dac.c nv_encoder->or = ffs(entry->or) - 1; ffs 482 drivers/gpu/drm/nouveau/dispnv04/dfp.c nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); ffs 707 drivers/gpu/drm/nouveau/dispnv04/dfp.c nv_encoder->or = ffs(entry->or) - 1; ffs 176 drivers/gpu/drm/nouveau/dispnv04/tvnv04.c nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); ffs 235 drivers/gpu/drm/nouveau/dispnv04/tvnv04.c nv_encoder->or = ffs(entry->or) - 1; ffs 193 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c '@' + ffs(dcb->or)); ffs 603 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); ffs 812 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c tv_enc->base.or = ffs(entry->or) - 1; ffs 2408 drivers/gpu/drm/nouveau/dispnv50/disp.c ffs(dcbe->or) - 1, ret); ffs 121 drivers/gpu/drm/nouveau/nouveau_backlight.c int or = ffs(nv_encoder->dcb->or) - 1; ffs 136 drivers/gpu/drm/nouveau/nouveau_backlight.c int or = ffs(nv_encoder->dcb->or) - 1; ffs 157 drivers/gpu/drm/nouveau/nouveau_backlight.c int or = ffs(nv_encoder->dcb->or) - 1; ffs 175 drivers/gpu/drm/nouveau/nouveau_backlight.c int or = ffs(nv_encoder->dcb->or) - 1; ffs 205 drivers/gpu/drm/nouveau/nouveau_backlight.c if (!nvif_rd32(device, NV50_PDISP_SOR_PWM_CTL(ffs(nv_encoder->dcb->or) - 1))) ffs 647 drivers/gpu/drm/nouveau/nouveau_bios.c switch (ffs(dcbent->or)) { ffs 1526 drivers/gpu/drm/nouveau/nouveau_bios.c ((1 << (ffs(entry->or) - 1)) * 3 == entry->or); ffs 409 drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c ior = nvkm_ior_find(disp, SOR, ffs(outp->info.or) - 1); ffs 94 drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c if ((info->hpd = ffs(info->hpd))) { ffs 43 drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c nvkm_debug(subdev, "supervisor %d\n", ffs(disp->super)); ffs 141 drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c int chid = ffs(stat) - 1; ffs 50 drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c nvkm_debug(subdev, "supervisor %d: %08x\n", ffs(disp->super), stat); ffs 187 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c const u8 l = ffs(outp->info.link); ffs 134 drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c ior = nvkm_ior_find(outp->disp, SOR, ffs(outp->info.or) - 1); ffs 204 drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c id = ffs(outp->info.or) - 1; ffs 68 drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c hidx = ffs((mask >> 8) & 0x0f) - 1; ffs 249 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c int runlist = ffs(*runlists) -1, ret, i; ffs 131 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c int runlist = ffs(*runlists) -1, ret, i; ffs 399 drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c cur_pll.base.pl = min(old | BIT(ffs(new) - 1), ffs 400 drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c new | BIT(ffs(old) - 1)); ffs 142 drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c init.or = ffs(outp.or) - 1; ffs 1462 drivers/gpu/drm/omapdrm/dss/dsi.c seq_printf(s, "%-20s %10d\n", #x, stats.dsi_irqs[ffs(DSI_IRQ_##x)-1]); ffs 1486 drivers/gpu/drm/omapdrm/dss/dsi.c stats.vc_irqs[0][ffs(DSI_VC_IRQ_##x)-1], \ ffs 1487 drivers/gpu/drm/omapdrm/dss/dsi.c stats.vc_irqs[1][ffs(DSI_VC_IRQ_##x)-1], \ ffs 1488 drivers/gpu/drm/omapdrm/dss/dsi.c stats.vc_irqs[2][ffs(DSI_VC_IRQ_##x)-1], \ ffs 1489 drivers/gpu/drm/omapdrm/dss/dsi.c stats.vc_irqs[3][ffs(DSI_VC_IRQ_##x)-1]); ffs 1505 drivers/gpu/drm/omapdrm/dss/dsi.c stats.cio_irqs[ffs(DSI_CIO_IRQ_##x)-1]); ffs 25 drivers/gpu/drm/omapdrm/dss/output.c ffs(out->of_ports) - 1, 0); ffs 1287 drivers/gpu/drm/radeon/evergreen.c v = ffs(readrq) - 8; ffs 768 drivers/gpu/drm/rcar-du/rcar_du_kms.c rcdu->dpad0_source = ffs(dpad0_sources) - 1; ffs 199 drivers/gpu/drm/rcar-du/rcar_du_plane.c unsigned int index = ffs(groups) - 1; ffs 288 drivers/gpu/drm/stm/dw_mipi_dsi-stm.c (ndiv << 2) | (idf << 11) | ((ffs(odf) - 1) << 16)); ffs 71 drivers/gpu/drm/ttm/ttm_bo.c pos = ffs(place->flags & TTM_PL_MASK_MEM); ffs 179 drivers/gpu/drm/vc4/vc4_v3d.c slot = ffs(~vc4->bin_alloc_used); ffs 2233 drivers/hid/hid-core.c clear_bit(ffs(HID_STAT_REPROBED), &hdev->status); ffs 2499 drivers/hid/hid-core.c !test_and_set_bit(ffs(HID_STAT_REPROBED), &hdev->status)) ffs 1106 drivers/hid/hid-cp2112.c virq = ffs(virqs) - 1; ffs 330 drivers/i3c/master/dw-i3c-master.c return ffs(master->free_pos) - 1; ffs 914 drivers/i3c/master/i3c-master-cdns.c return ffs(master->free_rr_slots) - 1; ffs 167 drivers/iio/accel/bma180.c u8 reg_val = (ret & ~mask) | (val << (ffs(mask) - 1)); ffs 50 drivers/iio/accel/mma9551_core.c #define MMA9551_RSC_OFFSET(mask) (3 - (ffs(mask) - 1) / 8) ffs 51 drivers/iio/accel/mma9551_core.c #define MMA9551_RSC_VAL(mask) (mask >> (((ffs(mask) - 1) / 8) * 8)) ffs 70 drivers/iio/accel/mma9553.c #define MMA9553_STATUS_TO_BITNUM(bit) (ffs(bit) - 9) ffs 196 drivers/iio/accel/mma9553.c return (val & mask) >> (ffs(mask) - 1); ffs 201 drivers/iio/accel/mma9553.c return (current_val & ~mask) | (val << (ffs(mask) - 1)); ffs 136 drivers/iio/adc/ti_am335x_adc.c STEPCONFIG_AVG(ffs(adc_dev->step_avg[i]) - 1) | ffs 503 drivers/infiniband/hw/hfi1/pcie.c rc_mps = ffs(pcie_get_mps(parent)) - 8; ffs 506 drivers/infiniband/hw/hfi1/pcie.c ep_mps = ffs(pcie_get_mps(dd->pcidev)) - 8; ffs 1793 drivers/infiniband/hw/i40iw/i40iw_verbs.c pg_shift = ffs(iwmr->page_size) - 1; ffs 85 drivers/infiniband/hw/mthca/mthca_allocator.c if (num != 1 << (ffs(num) - 1)) ffs 683 drivers/infiniband/hw/mthca/mthca_cmd.c lg = ffs(mthca_icm_addr(&iter) | mthca_icm_size(&iter)) - 1; ffs 826 drivers/infiniband/hw/mthca/mthca_cq.c cq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24); ffs 535 drivers/infiniband/hw/mthca/mthca_eq.c eq_context->logsize_usrpage = cpu_to_be32((ffs(eq->nent) - 1) << 24); ffs 116 drivers/infiniband/hw/mthca/mthca_profile.c profile[i].log_num = max(ffs(profile[i].num) - 1, 0); ffs 217 drivers/infiniband/hw/mthca/mthca_profile.c init_hca->log_mc_entry_sz = ffs(MTHCA_MGM_ENTRY_SIZE) - 1; ffs 231 drivers/infiniband/hw/mthca/mthca_profile.c init_hca->mtt_seg_sz = ffs(dev->limits.mtt_seg_size) - 7; ffs 245 drivers/infiniband/hw/mthca/mthca_profile.c init_hca->log_uarc_sz = ffs(request->uarc_size) - 13; ffs 246 drivers/infiniband/hw/mthca/mthca_profile.c init_hca->log_uar_sz = ffs(request->num_uar) - 1; ffs 2285 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c indx = ffs(srq->idx_bit_fields[row]); ffs 482 drivers/infiniband/hw/qib/qib_pcie.c rc_mps = ffs(pcie_get_mps(parent)) - 8; ffs 485 drivers/infiniband/hw/qib/qib_pcie.c ep_mps = ffs(pcie_get_mps(dd->pcidev)) - 8; ffs 4131 drivers/infiniband/ulp/srp/ib_srp.c mr_page_shift = max(12, ffs(attr->page_size_cap) - 1); ffs 100 drivers/input/misc/axp20x-pek.c val >>= ffs(mask) - 1; ffs 165 drivers/input/misc/axp20x-pek.c idx <<= ffs(mask) - 1; ffs 102 drivers/irqchip/irq-aspeed-vic.c irq += ffs(stat) - 1; ffs 200 drivers/irqchip/irq-bcm2835.c return MAKE_HWIRQ(bank, ffs(stat) - 1); ffs 205 drivers/irqchip/irq-bcm2835.c return MAKE_HWIRQ(bank, shortcuts[ffs(stat >> SHORTCUT_SHIFT) - 1]); ffs 215 drivers/irqchip/irq-bcm2835.c return MAKE_HWIRQ(0, ffs(stat & BANK0_HWIRQ_MASK) - 1); ffs 135 drivers/irqchip/irq-bcm2836.c u32 ipi = ffs(mbox_val) - 1; ffs 141 drivers/irqchip/irq-bcm2836.c u32 hwirq = ffs(stat) - 1; ffs 111 drivers/irqchip/irq-brcmstb-l2.c irq = ffs(status) - 1; ffs 44 drivers/irqchip/irq-digicolor.c hwirq = ffs(status) - 1; ffs 48 drivers/irqchip/irq-digicolor.c hwirq = ffs(status) - 1 + 32; ffs 42 drivers/irqchip/irq-dw-apb-ictl.c u32 hwirq = ffs(stat) - 1; ffs 136 drivers/irqchip/irq-ftintc010.c irq = ffs(status) - 1; ffs 105 drivers/irqchip/irq-or1k-pic.c hwirq = ffs(mfspr(SPR_PICSR) >> first); ffs 144 drivers/irqchip/irq-sa11x0.c ffs(mask) - 1, regs); ffs 85 drivers/irqchip/irq-versatile-fpga.c unsigned int irq = ffs(status) - 1; ffs 107 drivers/irqchip/irq-versatile-fpga.c irq = ffs(status) - 1; ffs 207 drivers/irqchip/irq-vic.c irq = ffs(stat) - 1; ffs 224 drivers/irqchip/irq-vic.c hwirq = ffs(stat) - 1; ffs 199 drivers/macintosh/via-macii.c next_device = ffs(autopoll_devs & ~device_mask) - 1; ffs 201 drivers/macintosh/via-macii.c next_device = ffs(autopoll_devs) - 1; ffs 286 drivers/macintosh/via-macii.c ADB_READREG(ffs(autopoll_devs) - 1, 0)); ffs 1392 drivers/macintosh/via-pmu.c idx = ffs(ints) - 1; ffs 397 drivers/md/bcache/bset.c j >>= ffs(j); ffs 452 drivers/md/bcache/bset.c shift = ffs(j); ffs 601 drivers/md/bcache/bset.c : tree_to_prev_bkey(t, j >> ffs(j)); ffs 1443 drivers/media/i2c/imx274.c reg_val = ffs(dgain); ffs 417 drivers/media/i2c/mt9p031.c xbin = 1 << (ffs(xskip) - 1); ffs 418 drivers/media/i2c/mt9p031.c ybin = 1 << (ffs(yskip) - 1); ffs 720 drivers/media/pci/intel/ipu3/ipu3-cio2.c i = ffs(port_status) - 1; ffs 737 drivers/media/pci/intel/ipu3/ipu3-cio2.c i = ffs(csi2_status) - 1; ffs 419 drivers/media/platform/exynos-gsc/gsc-core.c mod_x = ffs(variant->pix_align->org_w) - 1; ffs 421 drivers/media/platform/exynos-gsc/gsc-core.c mod_y = ffs(variant->pix_align->org_h) - 1; ffs 423 drivers/media/platform/exynos-gsc/gsc-core.c mod_y = ffs(variant->pix_align->org_h) - 2; ffs 557 drivers/media/platform/exynos-gsc/gsc-core.c mod_x = ffs(variant->pix_align->target_w) - 1; ffs 559 drivers/media/platform/exynos-gsc/gsc-core.c mod_y = ffs(variant->pix_align->target_h) - 1; ffs 220 drivers/media/platform/exynos4-is/fimc-capture.c unsigned int plane = ffs(f->fmt->mdataplanes) - 1; ffs 637 drivers/media/platform/exynos4-is/fimc-capture.c ffs(var->min_out_pixsize) - 1, ffs 670 drivers/media/platform/exynos4-is/fimc-capture.c u32 tmp_min_h = ffs(sink->width) - 3; ffs 671 drivers/media/platform/exynos4-is/fimc-capture.c u32 tmp_min_v = ffs(sink->height) - 1; ffs 707 drivers/media/platform/exynos4-is/fimc-capture.c v4l_bound_align_image(&r->width, min_w, max_w, ffs(min_sz) - 1, ffs 560 drivers/media/platform/exynos4-is/fimc-lite.c ffs(dd->out_width_align) - 1, ffs 716 drivers/media/platform/exynos4-is/fimc-lite.c ffs(dd->out_width_align) - 1, ffs 290 drivers/media/platform/exynos4-is/fimc-m2m.c mod_x = ffs(variant->min_inp_pixsize) - 1; ffs 293 drivers/media/platform/exynos4-is/fimc-m2m.c mod_x = ffs(variant->min_out_pixsize) - 1; ffs 303 drivers/media/platform/exynos4-is/fimc-m2m.c mod_y = ffs(variant->min_vsize_align) - 1; ffs 462 drivers/media/platform/exynos4-is/fimc-m2m.c halign = ffs(fimc->variant->min_vsize_align) - 1; ffs 468 drivers/media/platform/exynos4-is/fimc-m2m.c ffs(min_size) - 1, ffs 161 drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c walign = ffs(align_w) - 1; ffs 162 drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c halign = ffs(align_h) - 1; ffs 735 drivers/media/platform/s3c-camif/camif-capture.c sc_hrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->width) - 3)); ffs 736 drivers/media/platform/s3c-camif/camif-capture.c sc_vrmax = min(SCALER_MAX_RATIO, 1 << (ffs(crop->height) - 1)); ffs 744 drivers/media/platform/s3c-camif/camif-capture.c ffs(pix_lim->out_width_align) - 1, ffs 1266 drivers/media/platform/s3c-camif/camif-capture.c ffs(pix_lim->out_width_align) - 1, ffs 1272 drivers/media/platform/s3c-camif/camif-capture.c ffs(pix_lim->out_width_align) - 1, ffs 1400 drivers/media/platform/s3c-camif/camif-capture.c ffs(pix_lim->win_hor_offset_align) - 1, ffs 1404 drivers/media/platform/s3c-camif/camif-capture.c ffs(pix_lim->win_hor_offset_align), ffs 772 drivers/media/platform/sti/bdisp/bdisp-v4l2.c ffs(format->w_align) - 1, ffs 775 drivers/media/platform/sti/bdisp/bdisp-v4l2.c ffs(format->h_align) - 1, ffs 136 drivers/media/rc/ttusbir.c b = ffs(v) - 1; ffs 442 drivers/memory/brcmstb_dpfe.c ret = -ffs(resp); ffs 465 drivers/memory/brcmstb_dpfe.c ret = -ffs(resp); ffs 218 drivers/misc/lis3lv02d/lis3lv02d.c shift = ffs(lis3->odr_mask) - 1; ffs 245 drivers/misc/lis3lv02d/lis3lv02d.c shift = ffs(lis3->odr_mask) - 1; ffs 1140 drivers/mmc/core/core.c bit = ffs(ocr) - 1; ffs 1507 drivers/mmc/core/core.c card->erase_shift = ffs(card->erase_size) - 1; ffs 1528 drivers/mmc/core/core.c card->erase_shift = ffs(card->ssr.au) - 1; ffs 337 drivers/mmc/host/dw_mmc-k3.c i = ffs(sample_flag) - 1; ffs 346 drivers/mmc/host/dw_mmc-k3.c len = ffs(~v) - 1; ffs 353 drivers/mmc/host/dw_mmc-k3.c interval = ffs(v >> len) - 1; ffs 430 drivers/mmc/host/mmci.h return (ffs(host->data->blksz) - 1) << 4; ffs 375 drivers/mmc/host/moxart-mmc.c blksz_bits = ffs(data->blksz) - 1; ffs 565 drivers/mmc/host/mtk-sd.c tv |= ((val) << (ffs((unsigned int)field) - 1)); ffs 573 drivers/mmc/host/mtk-sd.c *val = ((tv & field) >> (ffs((unsigned int)field) - 1)); ffs 1008 drivers/mmc/host/sh_mmcif.c host->mmc->f_max = f_max / (1 << ffs(host->clkdiv_map)); ffs 660 drivers/mtd/devices/pmc551.c msize = (1 << (ffs(msize) - 1)) << 20; ffs 669 drivers/mtd/devices/pmc551.c asize = (1 << (ffs(asize) - 1)) << 20; ffs 753 drivers/mtd/devices/pmc551.c ffs(priv->asize >> 20) - 1); ffs 758 drivers/mtd/devices/pmc551.c | (ffs(priv->asize >> 20) - 1) << 4); ffs 573 drivers/mtd/mtd_blkdevs.c tr->blkshift = ffs(tr->blksize) - 1; ffs 643 drivers/mtd/mtdcore.c mtd->erasesize_shift = ffs(mtd->erasesize) - 1; ffs 648 drivers/mtd/mtdcore.c mtd->writesize_shift = ffs(mtd->writesize) - 1; ffs 3759 drivers/mtd/nand/onenand/onenand_base.c this->erase_shift = ffs(mtd->erasesize) - 1; ffs 3760 drivers/mtd/nand/onenand/onenand_base.c this->page_shift = ffs(mtd->writesize) - 1; ffs 428 drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c tbits = ffs(chipsize); /* find first bit set */ ffs 2099 drivers/mtd/nand/raw/brcmnand/brcmnand.c block_size = ffs(cfg->block_size) - ffs(BRCMNAND_MIN_BLOCKSIZE); ffs 2123 drivers/mtd/nand/raw/brcmnand/brcmnand.c page_size = ffs(cfg->page_size) - ffs(BRCMNAND_MIN_PAGESIZE); ffs 1237 drivers/mtd/nand/raw/mxc_nand.c config1 |= NFC_V2_CONFIG1_PPB(ffs(pages_per_block) - 6); ffs 1310 drivers/mtd/nand/raw/mxc_nand.c ffs(mtd->erasesize / mtd->writesize) - 6, ffs 4799 drivers/mtd/nand/raw/nand_base.c chip->page_shift = ffs(mtd->writesize) - 1; ffs 4805 drivers/mtd/nand/raw/nand_base.c ffs(mtd->erasesize) - 1; ffs 4807 drivers/mtd/nand/raw/nand_base.c chip->chip_shift = ffs((unsigned)targetsize) - 1; ffs 4809 drivers/mtd/nand/raw/nand_base.c chip->chip_shift = ffs((unsigned)(targetsize >> 32)); ffs 645 drivers/mtd/nand/raw/nandsim.c ns->geom.secshift = ffs(ns->geom.secsz) - 1; ffs 735 drivers/mtd/nand/raw/nandsim.c printk("bits in OOB size: %u\n", ffs(ns->geom.oobsz) - 1); ffs 2324 drivers/mtd/nand/raw/nandsim.c chip->chip_shift = ffs(nsmtd->erasesize) + overridesize - 1; ffs 1349 drivers/mtd/spi-nor/spi-nor.c int shift = ffs(mask) - 1; ffs 1438 drivers/mtd/spi-nor/spi-nor.c u8 shift = ffs(mask) - 1, pow, val; ffs 1518 drivers/mtd/spi-nor/spi-nor.c u8 shift = ffs(mask) - 1, pow, val; ffs 3192 drivers/mtd/spi-nor/spi-nor.c erase->size_shift = ffs(erase->size) - 1; ffs 94 drivers/mux/mmio.c field.lsb = ffs(mask) - 1; ffs 740 drivers/net/can/c_can/c_can.c while ((idx = ffs(pend))) { ffs 813 drivers/net/can/c_can/c_can.c while ((obj = ffs(pend)) && quota > 0) { ffs 200 drivers/net/can/mscan/mscan.c buf_id = ffs(i) - 1; ffs 2360 drivers/net/ethernet/amazon/ena/ena_com.c rss->hash_func = ffs(get_resp.u.flow_hash_func.selected_func); ffs 3313 drivers/net/ethernet/chelsio/cxgb3/sge.c unsigned int ctrl, ups = ffs(pci_resource_len(adap->pdev, 2) >> 12); ffs 376 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c app.priority = ffs(fwap->user_prio_map) - 1; ffs 1041 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c app->priority = ffs(prio) - 1; ffs 1174 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c ffs(pcmd.u.dcb.app_priority.user_prio_map) - 1; ffs 5596 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c port = ffs(pmask) - 1; ffs 3098 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c port_id = ffs(pmask) - 1; ffs 375 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c adapter->fcoe.up = ffs(up) - 1; ffs 682 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c ffs(app_mask) - 1 : IXGBE_FCOE_DEFTC; ffs 7411 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c adapter->default_up = (up > 1) ? (ffs(up) - 1) : 0; ffs 283 drivers/net/ethernet/mellanox/mlx4/en_rx.c ring->log_stride = ffs(ring->stride) - 1; ffs 353 drivers/net/ethernet/mellanox/mlx4/en_rx.c ring->log_stride = ffs(ring->stride) - 1; ffs 1540 drivers/net/ethernet/mellanox/mlx4/fw.c lg = ffs(mlx4_icm_addr(&iter) | mlx4_icm_size(&iter)) - 1; ffs 1052 drivers/net/ethernet/mellanox/mlx4/mr.c if (page_shift < (ffs(dev->caps.page_size_cap) - 1) || page_shift >= 32) ffs 298 drivers/net/ethernet/qlogic/qed/qed_dcbx.c priority = ffs(priority_map) - 1; ffs 532 drivers/net/ethernet/qlogic/qed/qed_dcbx.c entry->prio = ffs(pri_map) - 1; ffs 2322 drivers/net/ethernet/qlogic/qed/qed_dcbx.c app->priority = ffs(prio) - 1; ffs 7112 drivers/net/ethernet/realtek/r8169_main.c region = ffs(pci_select_bars(pdev, IORESOURCE_MEM)) - 1; ffs 5842 drivers/net/wireless/ath/ath10k/mac.c rateidx = ffs(vif->bss_conf.basic_rates) - 1; ffs 5884 drivers/net/wireless/ath/ath10k/mac.c basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1; ffs 7287 drivers/net/wireless/ath/ath10k/mac.c rate_idx = ffs(mask->control[band].legacy) - 1; ffs 7313 drivers/net/wireless/ath/ath10k/mac.c (ffs(mask->control[band].ht_mcs[i]) - 1); ffs 7325 drivers/net/wireless/ath/ath10k/mac.c (ffs(mask->control[band].vht_mcs[i]) - 1); ffs 5172 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c msb1 = ffs(power) - 1; ffs 1312 drivers/net/wireless/intel/iwlwifi/fw/dbg.c fifo_idx = ffs(fid1) - 1; ffs 1320 drivers/net/wireless/intel/iwlwifi/fw/dbg.c fifo_idx = ffs(fid2) - 1; ffs 270 drivers/net/wireless/intel/iwlwifi/mvm/utils.c return BIT(ffs(mask) - 1); ffs 3695 drivers/net/wireless/marvell/mwl8k.c if (mwl8k_vif->macid + 1 == ffs(priv->sta_macids_supported)) ffs 3703 drivers/net/wireless/marvell/mwl8k.c if (mwl8k_vif->macid + 1 == ffs(priv->ap_macids_supported)) ffs 4850 drivers/net/wireless/marvell/mwl8k.c macid = ffs(macids_supported & ~priv->macids_used); ffs 5053 drivers/net/wireless/marvell/mwl8k.c idx = ffs(vif->bss_conf.basic_rates); ffs 5128 drivers/net/wireless/marvell/mwl8k.c idx = ffs(vif->bss_conf.basic_rates); ffs 46 drivers/net/wireless/mediatek/mt76/mt7603/main.c mvif->idx = ffs(~dev->vif_mask) - 1; ffs 76 drivers/net/wireless/mediatek/mt76/mt7615/main.c mvif->idx = ffs(~dev->vif_mask) - 1; ffs 867 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c int tag = ffs(features & BIT(i)) - 1; ffs 50 drivers/net/wireless/mediatek/mt76/util.c idx = ffs(~mask[i]); ffs 192 drivers/net/wireless/mediatek/mt7601u/main.c idx = ffs(~dev->wcid_mask[i]); ffs 776 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c resp_min = ffs(resp_mask) - 1; ffs 1233 drivers/net/wireless/st/cw1200/txrx.c idx = ffs(~priv->key_map) - 1; ffs 864 drivers/ntb/hw/mscc/ntb_hw_switchtec.c if (!ffs(tpart_vec)) { ffs 871 drivers/ntb/hw/mscc/ntb_hw_switchtec.c bit = ffs(part_map); ffs 880 drivers/ntb/hw/mscc/ntb_hw_switchtec.c if (ffs(tpart_vec) != fls(tpart_vec)) { ffs 886 drivers/ntb/hw/mscc/ntb_hw_switchtec.c sndev->peer_partition = ffs(tpart_vec) - 1; ffs 1997 drivers/ntb/ntb_transport.c free_queue = ffs(nt->qp_bitmap_free); ffs 322 drivers/pci/controller/pci-rcar-gen2.c u32 lowaddr = 1 << (ffs(pci->window_addr) - 1); ffs 311 drivers/pci/controller/pci-xgene-msi.c msir_index = ffs(grp_select) - 1; ffs 319 drivers/pci/controller/pci-xgene-msi.c intr_index = ffs(msir_val) - 1; ffs 532 drivers/pci/controller/pcie-rockchip-host.c hwirq = ffs(reg) - 1; ffs 5593 drivers/pci/pci.c v = ffs(mmrbc) - 10; ffs 5665 drivers/pci/pci.c v = (ffs(rq) - 8) << 12; ffs 5703 drivers/pci/pci.c v = ffs(mps) - 8; ffs 668 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c u32 hwirq = ffs(status) - 1; ffs 2392 drivers/pinctrl/pinctrl-gemini.c val >>= (ffs(conf->mask) - 1); ffs 2426 drivers/pinctrl/pinctrl-gemini.c arg <<= (ffs(conf->mask) - 1); ffs 2491 drivers/pinctrl/pinctrl-gemini.c val <<= (ffs(grp->driving_mask) - 1); ffs 551 drivers/pinctrl/pinctrl-single.c shift = ffs(func->conf[i].mask) - 1; ffs 863 drivers/pinctrl/pinctrl-single.c shift = ffs(value[1]) - 1; ffs 893 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c pad->dtest_buffer = ffs(val); ffs 1303 drivers/platform/x86/dell-laptop.c state->mode_bit = ffs(buffer.output[1] & 0xFFFF); ffs 1466 drivers/platform/x86/dell-laptop.c ffs(kbd_info.modes & ~BIT(KBD_MODE_BIT_OFF)); ffs 2010 drivers/platform/x86/dell-laptop.c return ffs(num) - 1; ffs 2043 drivers/platform/x86/dell-laptop.c ret = kbd_set_token_bit(ffs(num) - 1); ffs 418 drivers/pwm/pwm-sti.c devicenum = ffs(cpt_int_stat) - 1; ffs 458 drivers/regulator/ab8500.c voltage_shift = ffs(info->voltage_mask) - 1; ffs 490 drivers/regulator/ab8500.c voltage_shift = ffs(info->voltage_mask) - 1; ffs 553 drivers/regulator/as3722-regulator.c val = ext_pwr_ctrl << (ffs(as3722_reg_lookup[id].sleep_ctrl_mask) - 1); ffs 1114 drivers/regulator/axp20x-regulator.c workmode <<= ffs(mask) - 1; ffs 379 drivers/regulator/bd718x7-regulator.c i <<= ffs(desc->vsel_mask) - 1; ffs 90 drivers/regulator/bd9571mwv-regulator.c val >>= ffs(rdev->desc->vsel_mask) - 1; ffs 255 drivers/regulator/da9062-regulator.c sel <<= ffs(rdev->desc->vsel_mask) - 1; ffs 367 drivers/regulator/da9063-regulator.c sel <<= ffs(rdev->desc->vsel_mask) - 1; ffs 149 drivers/regulator/helpers.c val >>= ffs(rdev->desc->vsel_mask) - 1; ffs 192 drivers/regulator/helpers.c sel <<= ffs(rdev->desc->vsel_mask) - 1; ffs 243 drivers/regulator/helpers.c val >>= ffs(rdev->desc->vsel_mask) - 1; ffs 263 drivers/regulator/helpers.c sel <<= ffs(rdev->desc->vsel_mask) - 1; ffs 827 drivers/regulator/helpers.c sel <<= ffs(rdev->desc->csel_mask) - 1; ffs 853 drivers/regulator/helpers.c val >>= ffs(rdev->desc->csel_mask) - 1; ffs 100 drivers/regulator/ltc3589.c shift = ffs(rdev->desc->apply_bit) - 1; ffs 194 drivers/regulator/mt6323-regulator.c val <<= ffs(info->modeset_mask) - 1; ffs 220 drivers/regulator/mt6323-regulator.c val >>= ffs(info->modeset_mask) - 1; ffs 200 drivers/regulator/mt6380-regulator.c val <<= ffs(info->modeset_mask) - 1; ffs 220 drivers/regulator/mt6380-regulator.c val >>= ffs(info->modeset_mask) - 1; ffs 236 drivers/regulator/rk808-regulator.c val >>= ffs(rdev->desc->vsel_mask) - 1; ffs 253 drivers/regulator/rk808-regulator.c old_sel >>= ffs(mask) - 1; ffs 263 drivers/regulator/rk808-regulator.c val = old_sel << (ffs(mask) - 1); ffs 276 drivers/regulator/rk808-regulator.c sel <<= ffs(mask) - 1; ffs 316 drivers/regulator/rk808-regulator.c sel <<= ffs(rdev->desc->vsel_mask) - 1; ffs 272 drivers/rtc/rtc-max77686.c tm->tm_wday = ffs(data[RTC_WEEKDAY] & mask) - 1; ffs 152 drivers/rtc/rtc-rx6110.c tm->tm_wday = ffs(data[RTC_WDAY] & 0x7f); ffs 135 drivers/rtc/rtc-rx8010.c dt->tm_wday = ffs(date[RX8010_WDAY - RX8010_SEC] & 0x7f); ffs 186 drivers/rtc/rtc-s5m.c tm->tm_wday = ffs(data[RTC_WEEKDAY] & 0x7f); ffs 6212 drivers/s390/block/dasd_eckd.c pos = 8 - ffs(cuir->ned_map); ffs 6224 drivers/s390/block/dasd_eckd.c pos = 8 - ffs(cuir->ned_map); ffs 6234 drivers/s390/block/dasd_eckd.c pos = ffs(bitmask) - 1; ffs 6256 drivers/s390/block/dasd_eckd.c pos = 8 - ffs(paths); ffs 2116 drivers/scsi/NCR5380.c int target = ffs(target_mask) - 1; ffs 10604 drivers/scsi/aic7xxx/aic79xx_core.c our_id = ffs(targid_mask); ffs 7755 drivers/scsi/aic7xxx/aic7xxx_core.c our_id = ffs(targid_mask); ffs 480 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y enum_increment = 0x01 << (ffs($3.value) - 1); ffs 502 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y enum_increment = 0x01 << (ffs($3.value) - 1); ffs 316 drivers/scsi/aic94xx/aic94xx_scb.c sas_phy->sas_prim = ffs(cont); ffs 970 drivers/scsi/arm/fas216.c target = ffs(target) - 1; ffs 1651 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c return (ffs(pri_mask) - 1); ffs 2279 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c priority = ffs(iscsi_app->app.priority) - 1; ffs 1172 drivers/scsi/esp_scsi.c target = ffs(bits) - 1; ffs 1816 drivers/scsi/fcoe/fcoe.c prio = ffs(entry->app.priority) - 1; ffs 2173 drivers/scsi/fcoe/fcoe.c fcoe_prio = ffs(up) ? ffs(up) - 1 : 0; ffs 2174 drivers/scsi/fcoe/fcoe.c ctlr_prio = ffs(fup) ? ffs(fup) - 1 : fcoe_prio; ffs 1075 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c error = ffs(dma_tx_err_type) ffs 1079 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c error = ffs(dma_rx_err_type) ffs 1083 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c error = ffs(trans_tx_fail_type) ffs 1087 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c error = ffs(trans_rx_fail_type) ffs 3134 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c int ncq_tag_count = ffs(act_tmp); ffs 3158 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c ncq_tag_count = ffs(act_tmp); ffs 182 drivers/scsi/sim710.c scsi_id = ffs(val) - 1; ffs 515 drivers/spmi/spmi-pmic-arb.c id = ffs(status) - 1; ffs 544 drivers/spmi/spmi-pmic-arb.c id = ffs(status) - 1; ffs 47 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c return ffs(dwBitMask) - 1; ffs 75 drivers/staging/rtl8192u/r819xU_phy.c bitshift = ffs(bitmask) - 1; ffs 98 drivers/staging/rtl8192u/r819xU_phy.c bitshift = ffs(bitmask) - 1; ffs 291 drivers/staging/rtl8192u/r819xU_phy.c bitshift = ffs(bitmask) - 1; ffs 306 drivers/staging/rtl8192u/r819xU_phy.c bitshift = ffs(bitmask) - 1; ffs 342 drivers/staging/rtl8192u/r819xU_phy.c bitshift = ffs(bitmask) - 1; ffs 860 drivers/target/iscsi/cxgbit/cxgbit_cm.c return (ffs(pri_mask) - 1); ffs 605 drivers/target/iscsi/cxgbit/cxgbit_main.c priority = ffs(iscsi_app->app.priority) - 1; ffs 197 drivers/thermal/tegra/soctherm.c #define REG_GET_MASK(r, m) (((r) & (m)) >> (ffs(m) - 1)) ffs 200 drivers/thermal/tegra/soctherm.c (((v) & (m >> (ffs(m) - 1))) << (ffs(m) - 1))) ffs 212 drivers/tty/serial/dz.c (ffs(DZ_FERR) - ffs(DZ_BREAK)); ffs 97 drivers/tty/serial/sh-sci.c #define min_sr(_port) ffs((_port)->sampling_rate_mask) ffs 47 drivers/usb/gadget/function/f_fs.c static void ffs_data_get(struct ffs_data *ffs); ffs 48 drivers/usb/gadget/function/f_fs.c static void ffs_data_put(struct ffs_data *ffs); ffs 54 drivers/usb/gadget/function/f_fs.c static void ffs_data_opened(struct ffs_data *ffs); ffs 55 drivers/usb/gadget/function/f_fs.c static void ffs_data_closed(struct ffs_data *ffs); ffs 59 drivers/usb/gadget/function/f_fs.c __ffs_data_got_descs(struct ffs_data *ffs, char *data, size_t len); ffs 61 drivers/usb/gadget/function/f_fs.c __ffs_data_got_strings(struct ffs_data *ffs, char *data, size_t len); ffs 71 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs; ffs 88 drivers/usb/gadget/function/f_fs.c ffs_setup_state_clear_cancelled(struct ffs_data *ffs) ffs 91 drivers/usb/gadget/function/f_fs.c cmpxchg(&ffs->setup_state, FFS_SETUP_CANCELLED, FFS_NO_SETUP); ffs 133 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs; ffs 229 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs; ffs 233 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs; ffs 238 drivers/usb/gadget/function/f_fs.c static int __must_check ffs_epfiles_create(struct ffs_data *ffs); ffs 255 drivers/usb/gadget/function/f_fs.c static int ffs_ready(struct ffs_data *ffs); ffs 256 drivers/usb/gadget/function/f_fs.c static void ffs_closed(struct ffs_data *ffs); ffs 270 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = req->context; ffs 272 drivers/usb/gadget/function/f_fs.c complete(&ffs->ep0req_completion); ffs 275 drivers/usb/gadget/function/f_fs.c static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len) ffs 276 drivers/usb/gadget/function/f_fs.c __releases(&ffs->ev.waitq.lock) ffs 278 drivers/usb/gadget/function/f_fs.c struct usb_request *req = ffs->ep0req; ffs 281 drivers/usb/gadget/function/f_fs.c req->zero = len < le16_to_cpu(ffs->ev.setup.wLength); ffs 283 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 296 drivers/usb/gadget/function/f_fs.c reinit_completion(&ffs->ep0req_completion); ffs 298 drivers/usb/gadget/function/f_fs.c ret = usb_ep_queue(ffs->gadget->ep0, req, GFP_ATOMIC); ffs 302 drivers/usb/gadget/function/f_fs.c ret = wait_for_completion_interruptible(&ffs->ep0req_completion); ffs 304 drivers/usb/gadget/function/f_fs.c usb_ep_dequeue(ffs->gadget->ep0, req); ffs 308 drivers/usb/gadget/function/f_fs.c ffs->setup_state = FFS_NO_SETUP; ffs 312 drivers/usb/gadget/function/f_fs.c static int __ffs_ep0_stall(struct ffs_data *ffs) ffs 314 drivers/usb/gadget/function/f_fs.c if (ffs->ev.can_stall) { ffs 316 drivers/usb/gadget/function/f_fs.c usb_ep_set_halt(ffs->gadget->ep0); ffs 317 drivers/usb/gadget/function/f_fs.c ffs->setup_state = FFS_NO_SETUP; ffs 328 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = file->private_data; ffs 335 drivers/usb/gadget/function/f_fs.c if (ffs_setup_state_clear_cancelled(ffs) == FFS_SETUP_CANCELLED) ffs 339 drivers/usb/gadget/function/f_fs.c ret = ffs_mutex_lock(&ffs->mutex, file->f_flags & O_NONBLOCK); ffs 344 drivers/usb/gadget/function/f_fs.c switch (ffs->state) { ffs 360 drivers/usb/gadget/function/f_fs.c if (ffs->state == FFS_READ_DESCRIPTORS) { ffs 362 drivers/usb/gadget/function/f_fs.c ret = __ffs_data_got_descs(ffs, data, len); ffs 366 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_READ_STRINGS; ffs 370 drivers/usb/gadget/function/f_fs.c ret = __ffs_data_got_strings(ffs, data, len); ffs 374 drivers/usb/gadget/function/f_fs.c ret = ffs_epfiles_create(ffs); ffs 376 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_CLOSING; ffs 380 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_ACTIVE; ffs 381 drivers/usb/gadget/function/f_fs.c mutex_unlock(&ffs->mutex); ffs 383 drivers/usb/gadget/function/f_fs.c ret = ffs_ready(ffs); ffs 385 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_CLOSING; ffs 399 drivers/usb/gadget/function/f_fs.c spin_lock_irq(&ffs->ev.waitq.lock); ffs 400 drivers/usb/gadget/function/f_fs.c switch (ffs_setup_state_clear_cancelled(ffs)) { ffs 414 drivers/usb/gadget/function/f_fs.c if (!(ffs->ev.setup.bRequestType & USB_DIR_IN)) { ffs 415 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 416 drivers/usb/gadget/function/f_fs.c ret = __ffs_ep0_stall(ffs); ffs 421 drivers/usb/gadget/function/f_fs.c len = min(len, (size_t)le16_to_cpu(ffs->ev.setup.wLength)); ffs 423 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 431 drivers/usb/gadget/function/f_fs.c spin_lock_irq(&ffs->ev.waitq.lock); ffs 445 drivers/usb/gadget/function/f_fs.c if (ffs_setup_state_clear_cancelled(ffs) == ffs 449 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 452 drivers/usb/gadget/function/f_fs.c ret = __ffs_ep0_queue_wait(ffs, data, len); ffs 462 drivers/usb/gadget/function/f_fs.c mutex_unlock(&ffs->mutex); ffs 467 drivers/usb/gadget/function/f_fs.c static ssize_t __ffs_ep0_read_events(struct ffs_data *ffs, char __user *buf, ffs 469 drivers/usb/gadget/function/f_fs.c __releases(&ffs->ev.waitq.lock) ffs 476 drivers/usb/gadget/function/f_fs.c struct usb_functionfs_event events[ARRAY_SIZE(ffs->ev.types)]; ffs 483 drivers/usb/gadget/function/f_fs.c events[i].type = ffs->ev.types[i]; ffs 485 drivers/usb/gadget/function/f_fs.c events[i].u.setup = ffs->ev.setup; ffs 486 drivers/usb/gadget/function/f_fs.c ffs->setup_state = FFS_SETUP_PENDING; ffs 490 drivers/usb/gadget/function/f_fs.c ffs->ev.count -= n; ffs 491 drivers/usb/gadget/function/f_fs.c if (ffs->ev.count) ffs 492 drivers/usb/gadget/function/f_fs.c memmove(ffs->ev.types, ffs->ev.types + n, ffs 493 drivers/usb/gadget/function/f_fs.c ffs->ev.count * sizeof *ffs->ev.types); ffs 495 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 496 drivers/usb/gadget/function/f_fs.c mutex_unlock(&ffs->mutex); ffs 504 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = file->private_data; ffs 512 drivers/usb/gadget/function/f_fs.c if (ffs_setup_state_clear_cancelled(ffs) == FFS_SETUP_CANCELLED) ffs 516 drivers/usb/gadget/function/f_fs.c ret = ffs_mutex_lock(&ffs->mutex, file->f_flags & O_NONBLOCK); ffs 521 drivers/usb/gadget/function/f_fs.c if (ffs->state != FFS_ACTIVE) { ffs 530 drivers/usb/gadget/function/f_fs.c spin_lock_irq(&ffs->ev.waitq.lock); ffs 532 drivers/usb/gadget/function/f_fs.c switch (ffs_setup_state_clear_cancelled(ffs)) { ffs 544 drivers/usb/gadget/function/f_fs.c if ((file->f_flags & O_NONBLOCK) && !ffs->ev.count) { ffs 549 drivers/usb/gadget/function/f_fs.c if (wait_event_interruptible_exclusive_locked_irq(ffs->ev.waitq, ffs 550 drivers/usb/gadget/function/f_fs.c ffs->ev.count)) { ffs 556 drivers/usb/gadget/function/f_fs.c return __ffs_ep0_read_events(ffs, buf, ffs 557 drivers/usb/gadget/function/f_fs.c min(n, (size_t)ffs->ev.count)); ffs 560 drivers/usb/gadget/function/f_fs.c if (ffs->ev.setup.bRequestType & USB_DIR_IN) { ffs 561 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 562 drivers/usb/gadget/function/f_fs.c ret = __ffs_ep0_stall(ffs); ffs 566 drivers/usb/gadget/function/f_fs.c len = min(len, (size_t)le16_to_cpu(ffs->ev.setup.wLength)); ffs 568 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 578 drivers/usb/gadget/function/f_fs.c spin_lock_irq(&ffs->ev.waitq.lock); ffs 581 drivers/usb/gadget/function/f_fs.c if (ffs_setup_state_clear_cancelled(ffs) == ffs 588 drivers/usb/gadget/function/f_fs.c ret = __ffs_ep0_queue_wait(ffs, data, len); ffs 598 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&ffs->ev.waitq.lock); ffs 600 drivers/usb/gadget/function/f_fs.c mutex_unlock(&ffs->mutex); ffs 607 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = inode->i_private; ffs 611 drivers/usb/gadget/function/f_fs.c if (unlikely(ffs->state == FFS_CLOSING)) ffs 614 drivers/usb/gadget/function/f_fs.c file->private_data = ffs; ffs 615 drivers/usb/gadget/function/f_fs.c ffs_data_opened(ffs); ffs 622 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = file->private_data; ffs 626 drivers/usb/gadget/function/f_fs.c ffs_data_closed(ffs); ffs 633 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = file->private_data; ffs 634 drivers/usb/gadget/function/f_fs.c struct usb_gadget *gadget = ffs->gadget; ffs 640 drivers/usb/gadget/function/f_fs.c struct ffs_function *func = ffs->func; ffs 653 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = file->private_data; ffs 657 drivers/usb/gadget/function/f_fs.c poll_wait(file, &ffs->ev.waitq, wait); ffs 659 drivers/usb/gadget/function/f_fs.c ret = ffs_mutex_lock(&ffs->mutex, file->f_flags & O_NONBLOCK); ffs 663 drivers/usb/gadget/function/f_fs.c switch (ffs->state) { ffs 670 drivers/usb/gadget/function/f_fs.c switch (ffs->setup_state) { ffs 672 drivers/usb/gadget/function/f_fs.c if (ffs->ev.count) ffs 687 drivers/usb/gadget/function/f_fs.c mutex_unlock(&ffs->mutex); ffs 838 drivers/usb/gadget/function/f_fs.c if (io_data->ffs->ffs_eventfd && !kiocb_has_eventfd) ffs 839 drivers/usb/gadget/function/f_fs.c eventfd_signal(io_data->ffs->ffs_eventfd, 1); ffs 853 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = io_data->ffs; ffs 858 drivers/usb/gadget/function/f_fs.c queue_work(ffs->io_completion_wq, &io_data->work); ffs 953 drivers/usb/gadget/function/f_fs.c if (WARN_ON(epfile->ffs->state != FFS_ACTIVE)) ffs 963 drivers/usb/gadget/function/f_fs.c epfile->ffs->wait, (ep = epfile->ep)); ffs 1000 drivers/usb/gadget/function/f_fs.c gadget = epfile->ffs->gadget; ffs 1002 drivers/usb/gadget/function/f_fs.c spin_lock_irq(&epfile->ffs->eps_lock); ffs 1017 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&epfile->ffs->eps_lock); ffs 1031 drivers/usb/gadget/function/f_fs.c spin_lock_irq(&epfile->ffs->eps_lock); ffs 1078 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&epfile->ffs->eps_lock); ffs 1116 drivers/usb/gadget/function/f_fs.c io_data->ffs = epfile->ffs; ffs 1137 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&epfile->ffs->eps_lock); ffs 1153 drivers/usb/gadget/function/f_fs.c if (WARN_ON(epfile->ffs->state != FFS_ACTIVE)) ffs 1157 drivers/usb/gadget/function/f_fs.c ffs_data_opened(epfile->ffs); ffs 1171 drivers/usb/gadget/function/f_fs.c spin_lock_irqsave(&epfile->ffs->eps_lock, flags); ffs 1178 drivers/usb/gadget/function/f_fs.c spin_unlock_irqrestore(&epfile->ffs->eps_lock, flags); ffs 1277 drivers/usb/gadget/function/f_fs.c ffs_data_closed(epfile->ffs); ffs 1291 drivers/usb/gadget/function/f_fs.c if (WARN_ON(epfile->ffs->state != FFS_ACTIVE)) ffs 1301 drivers/usb/gadget/function/f_fs.c epfile->ffs->wait, (ep = epfile->ep)); ffs 1306 drivers/usb/gadget/function/f_fs.c spin_lock_irq(&epfile->ffs->eps_lock); ffs 1310 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&epfile->ffs->eps_lock); ffs 1333 drivers/usb/gadget/function/f_fs.c switch (epfile->ffs->gadget->speed) { ffs 1345 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&epfile->ffs->eps_lock); ffs 1354 drivers/usb/gadget/function/f_fs.c spin_unlock_irq(&epfile->ffs->eps_lock); ffs 1425 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = sb->s_fs_info; ffs 1435 drivers/usb/gadget/function/f_fs.c inode = ffs_sb_make_inode(sb, data, fops, NULL, &ffs->file_perms); ffs 1463 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = data->ffs_data; ffs 1467 drivers/usb/gadget/function/f_fs.c ffs->sb = sb; ffs 1469 drivers/usb/gadget/function/f_fs.c sb->s_fs_info = ffs; ffs 1487 drivers/usb/gadget/function/f_fs.c if (unlikely(!ffs_sb_create_file(sb, "ep0", ffs, ffs 1573 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs; ffs 1580 drivers/usb/gadget/function/f_fs.c ffs = ffs_data_new(fc->source); ffs 1581 drivers/usb/gadget/function/f_fs.c if (unlikely(!ffs)) ffs 1583 drivers/usb/gadget/function/f_fs.c ffs->file_perms = ctx->perms; ffs 1584 drivers/usb/gadget/function/f_fs.c ffs->no_disconnect = ctx->no_disconnect; ffs 1586 drivers/usb/gadget/function/f_fs.c ffs->dev_name = kstrdup(fc->source, GFP_KERNEL); ffs 1587 drivers/usb/gadget/function/f_fs.c if (unlikely(!ffs->dev_name)) { ffs 1588 drivers/usb/gadget/function/f_fs.c ffs_data_put(ffs); ffs 1592 drivers/usb/gadget/function/f_fs.c ffs_dev = ffs_acquire_dev(ffs->dev_name); ffs 1594 drivers/usb/gadget/function/f_fs.c ffs_data_put(ffs); ffs 1598 drivers/usb/gadget/function/f_fs.c ffs->private_data = ffs_dev; ffs 1599 drivers/usb/gadget/function/f_fs.c ctx->ffs_data = ffs; ffs 1692 drivers/usb/gadget/function/f_fs.c static void ffs_data_clear(struct ffs_data *ffs); ffs 1693 drivers/usb/gadget/function/f_fs.c static void ffs_data_reset(struct ffs_data *ffs); ffs 1695 drivers/usb/gadget/function/f_fs.c static void ffs_data_get(struct ffs_data *ffs) ffs 1699 drivers/usb/gadget/function/f_fs.c refcount_inc(&ffs->ref); ffs 1702 drivers/usb/gadget/function/f_fs.c static void ffs_data_opened(struct ffs_data *ffs) ffs 1706 drivers/usb/gadget/function/f_fs.c refcount_inc(&ffs->ref); ffs 1707 drivers/usb/gadget/function/f_fs.c if (atomic_add_return(1, &ffs->opened) == 1 && ffs 1708 drivers/usb/gadget/function/f_fs.c ffs->state == FFS_DEACTIVATED) { ffs 1709 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_CLOSING; ffs 1710 drivers/usb/gadget/function/f_fs.c ffs_data_reset(ffs); ffs 1714 drivers/usb/gadget/function/f_fs.c static void ffs_data_put(struct ffs_data *ffs) ffs 1718 drivers/usb/gadget/function/f_fs.c if (unlikely(refcount_dec_and_test(&ffs->ref))) { ffs 1720 drivers/usb/gadget/function/f_fs.c ffs_data_clear(ffs); ffs 1721 drivers/usb/gadget/function/f_fs.c BUG_ON(waitqueue_active(&ffs->ev.waitq) || ffs 1722 drivers/usb/gadget/function/f_fs.c waitqueue_active(&ffs->ep0req_completion.wait) || ffs 1723 drivers/usb/gadget/function/f_fs.c waitqueue_active(&ffs->wait)); ffs 1724 drivers/usb/gadget/function/f_fs.c destroy_workqueue(ffs->io_completion_wq); ffs 1725 drivers/usb/gadget/function/f_fs.c kfree(ffs->dev_name); ffs 1726 drivers/usb/gadget/function/f_fs.c kfree(ffs); ffs 1730 drivers/usb/gadget/function/f_fs.c static void ffs_data_closed(struct ffs_data *ffs) ffs 1734 drivers/usb/gadget/function/f_fs.c if (atomic_dec_and_test(&ffs->opened)) { ffs 1735 drivers/usb/gadget/function/f_fs.c if (ffs->no_disconnect) { ffs 1736 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_DEACTIVATED; ffs 1737 drivers/usb/gadget/function/f_fs.c if (ffs->epfiles) { ffs 1738 drivers/usb/gadget/function/f_fs.c ffs_epfiles_destroy(ffs->epfiles, ffs 1739 drivers/usb/gadget/function/f_fs.c ffs->eps_count); ffs 1740 drivers/usb/gadget/function/f_fs.c ffs->epfiles = NULL; ffs 1742 drivers/usb/gadget/function/f_fs.c if (ffs->setup_state == FFS_SETUP_PENDING) ffs 1743 drivers/usb/gadget/function/f_fs.c __ffs_ep0_stall(ffs); ffs 1745 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_CLOSING; ffs 1746 drivers/usb/gadget/function/f_fs.c ffs_data_reset(ffs); ffs 1749 drivers/usb/gadget/function/f_fs.c if (atomic_read(&ffs->opened) < 0) { ffs 1750 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_CLOSING; ffs 1751 drivers/usb/gadget/function/f_fs.c ffs_data_reset(ffs); ffs 1754 drivers/usb/gadget/function/f_fs.c ffs_data_put(ffs); ffs 1759 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = kzalloc(sizeof *ffs, GFP_KERNEL); ffs 1760 drivers/usb/gadget/function/f_fs.c if (unlikely(!ffs)) ffs 1765 drivers/usb/gadget/function/f_fs.c ffs->io_completion_wq = alloc_ordered_workqueue("%s", 0, dev_name); ffs 1766 drivers/usb/gadget/function/f_fs.c if (!ffs->io_completion_wq) { ffs 1767 drivers/usb/gadget/function/f_fs.c kfree(ffs); ffs 1771 drivers/usb/gadget/function/f_fs.c refcount_set(&ffs->ref, 1); ffs 1772 drivers/usb/gadget/function/f_fs.c atomic_set(&ffs->opened, 0); ffs 1773 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_READ_DESCRIPTORS; ffs 1774 drivers/usb/gadget/function/f_fs.c mutex_init(&ffs->mutex); ffs 1775 drivers/usb/gadget/function/f_fs.c spin_lock_init(&ffs->eps_lock); ffs 1776 drivers/usb/gadget/function/f_fs.c init_waitqueue_head(&ffs->ev.waitq); ffs 1777 drivers/usb/gadget/function/f_fs.c init_waitqueue_head(&ffs->wait); ffs 1778 drivers/usb/gadget/function/f_fs.c init_completion(&ffs->ep0req_completion); ffs 1781 drivers/usb/gadget/function/f_fs.c ffs->ev.can_stall = 1; ffs 1783 drivers/usb/gadget/function/f_fs.c return ffs; ffs 1786 drivers/usb/gadget/function/f_fs.c static void ffs_data_clear(struct ffs_data *ffs) ffs 1790 drivers/usb/gadget/function/f_fs.c ffs_closed(ffs); ffs 1792 drivers/usb/gadget/function/f_fs.c BUG_ON(ffs->gadget); ffs 1794 drivers/usb/gadget/function/f_fs.c if (ffs->epfiles) ffs 1795 drivers/usb/gadget/function/f_fs.c ffs_epfiles_destroy(ffs->epfiles, ffs->eps_count); ffs 1797 drivers/usb/gadget/function/f_fs.c if (ffs->ffs_eventfd) ffs 1798 drivers/usb/gadget/function/f_fs.c eventfd_ctx_put(ffs->ffs_eventfd); ffs 1800 drivers/usb/gadget/function/f_fs.c kfree(ffs->raw_descs_data); ffs 1801 drivers/usb/gadget/function/f_fs.c kfree(ffs->raw_strings); ffs 1802 drivers/usb/gadget/function/f_fs.c kfree(ffs->stringtabs); ffs 1805 drivers/usb/gadget/function/f_fs.c static void ffs_data_reset(struct ffs_data *ffs) ffs 1809 drivers/usb/gadget/function/f_fs.c ffs_data_clear(ffs); ffs 1811 drivers/usb/gadget/function/f_fs.c ffs->epfiles = NULL; ffs 1812 drivers/usb/gadget/function/f_fs.c ffs->raw_descs_data = NULL; ffs 1813 drivers/usb/gadget/function/f_fs.c ffs->raw_descs = NULL; ffs 1814 drivers/usb/gadget/function/f_fs.c ffs->raw_strings = NULL; ffs 1815 drivers/usb/gadget/function/f_fs.c ffs->stringtabs = NULL; ffs 1817 drivers/usb/gadget/function/f_fs.c ffs->raw_descs_length = 0; ffs 1818 drivers/usb/gadget/function/f_fs.c ffs->fs_descs_count = 0; ffs 1819 drivers/usb/gadget/function/f_fs.c ffs->hs_descs_count = 0; ffs 1820 drivers/usb/gadget/function/f_fs.c ffs->ss_descs_count = 0; ffs 1822 drivers/usb/gadget/function/f_fs.c ffs->strings_count = 0; ffs 1823 drivers/usb/gadget/function/f_fs.c ffs->interfaces_count = 0; ffs 1824 drivers/usb/gadget/function/f_fs.c ffs->eps_count = 0; ffs 1826 drivers/usb/gadget/function/f_fs.c ffs->ev.count = 0; ffs 1828 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_READ_DESCRIPTORS; ffs 1829 drivers/usb/gadget/function/f_fs.c ffs->setup_state = FFS_NO_SETUP; ffs 1830 drivers/usb/gadget/function/f_fs.c ffs->flags = 0; ffs 1832 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_count = 0; ffs 1833 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_name_len = 0; ffs 1834 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_data_len = 0; ffs 1838 drivers/usb/gadget/function/f_fs.c static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev) ffs 1845 drivers/usb/gadget/function/f_fs.c if (WARN_ON(ffs->state != FFS_ACTIVE ffs 1846 drivers/usb/gadget/function/f_fs.c || test_and_set_bit(FFS_FL_BOUND, &ffs->flags))) ffs 1849 drivers/usb/gadget/function/f_fs.c first_id = usb_string_ids_n(cdev, ffs->strings_count); ffs 1853 drivers/usb/gadget/function/f_fs.c ffs->ep0req = usb_ep_alloc_request(cdev->gadget->ep0, GFP_KERNEL); ffs 1854 drivers/usb/gadget/function/f_fs.c if (unlikely(!ffs->ep0req)) ffs 1856 drivers/usb/gadget/function/f_fs.c ffs->ep0req->complete = ffs_ep0_complete; ffs 1857 drivers/usb/gadget/function/f_fs.c ffs->ep0req->context = ffs; ffs 1859 drivers/usb/gadget/function/f_fs.c lang = ffs->stringtabs; ffs 1869 drivers/usb/gadget/function/f_fs.c ffs->gadget = cdev->gadget; ffs 1870 drivers/usb/gadget/function/f_fs.c ffs_data_get(ffs); ffs 1874 drivers/usb/gadget/function/f_fs.c static void functionfs_unbind(struct ffs_data *ffs) ffs 1878 drivers/usb/gadget/function/f_fs.c if (!WARN_ON(!ffs->gadget)) { ffs 1879 drivers/usb/gadget/function/f_fs.c usb_ep_free_request(ffs->gadget->ep0, ffs->ep0req); ffs 1880 drivers/usb/gadget/function/f_fs.c ffs->ep0req = NULL; ffs 1881 drivers/usb/gadget/function/f_fs.c ffs->gadget = NULL; ffs 1882 drivers/usb/gadget/function/f_fs.c clear_bit(FFS_FL_BOUND, &ffs->flags); ffs 1883 drivers/usb/gadget/function/f_fs.c ffs_data_put(ffs); ffs 1887 drivers/usb/gadget/function/f_fs.c static int ffs_epfiles_create(struct ffs_data *ffs) ffs 1894 drivers/usb/gadget/function/f_fs.c count = ffs->eps_count; ffs 1901 drivers/usb/gadget/function/f_fs.c epfile->ffs = ffs; ffs 1903 drivers/usb/gadget/function/f_fs.c if (ffs->user_flags & FUNCTIONFS_VIRTUAL_ADDR) ffs 1904 drivers/usb/gadget/function/f_fs.c sprintf(epfile->name, "ep%02x", ffs->eps_addrmap[i]); ffs 1907 drivers/usb/gadget/function/f_fs.c epfile->dentry = ffs_sb_create_file(ffs->sb, epfile->name, ffs 1916 drivers/usb/gadget/function/f_fs.c ffs->epfiles = epfiles; ffs 1941 drivers/usb/gadget/function/f_fs.c struct ffs_epfile *epfile = func->ffs->epfiles; ffs 1942 drivers/usb/gadget/function/f_fs.c unsigned count = func->ffs->eps_count; ffs 1945 drivers/usb/gadget/function/f_fs.c spin_lock_irqsave(&func->ffs->eps_lock, flags); ffs 1958 drivers/usb/gadget/function/f_fs.c spin_unlock_irqrestore(&func->ffs->eps_lock, flags); ffs 1963 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = func->ffs; ffs 1965 drivers/usb/gadget/function/f_fs.c struct ffs_epfile *epfile = ffs->epfiles; ffs 1966 drivers/usb/gadget/function/f_fs.c unsigned count = ffs->eps_count; ffs 1970 drivers/usb/gadget/function/f_fs.c spin_lock_irqsave(&func->ffs->eps_lock, flags); ffs 1994 drivers/usb/gadget/function/f_fs.c wake_up_interruptible(&ffs->wait); ffs 1995 drivers/usb/gadget/function/f_fs.c spin_unlock_irqrestore(&func->ffs->eps_lock, flags); ffs 2235 drivers/usb/gadget/function/f_fs.c if (*valuep > helper->ffs->strings_count) ffs 2236 drivers/usb/gadget/function/f_fs.c helper->ffs->strings_count = *valuep; ffs 2245 drivers/usb/gadget/function/f_fs.c if (!helper->ffs->eps_count && !helper->ffs->interfaces_count) ffs 2246 drivers/usb/gadget/function/f_fs.c helper->ffs->eps_addrmap[helper->eps_count] = ffs 2248 drivers/usb/gadget/function/f_fs.c else if (helper->ffs->eps_addrmap[helper->eps_count] != ffs 2381 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = priv; ffs 2392 drivers/usb/gadget/function/f_fs.c d->bFirstInterfaceNumber >= ffs->interfaces_count) ffs 2416 drivers/usb/gadget/function/f_fs.c if (len < sizeof(*d) || h->interface >= ffs->interfaces_count) ffs 2440 drivers/usb/gadget/function/f_fs.c ++ffs->ms_os_descs_ext_prop_count; ffs 2442 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_name_len += pnl * 2; ffs 2443 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_data_len += pdl; ffs 2453 drivers/usb/gadget/function/f_fs.c static int __ffs_data_got_descs(struct ffs_data *ffs, ffs 2474 drivers/usb/gadget/function/f_fs.c ffs->user_flags = flags; ffs 2496 drivers/usb/gadget/function/f_fs.c ffs->ffs_eventfd = ffs 2498 drivers/usb/gadget/function/f_fs.c if (IS_ERR(ffs->ffs_eventfd)) { ffs 2499 drivers/usb/gadget/function/f_fs.c ret = PTR_ERR(ffs->ffs_eventfd); ffs 2500 drivers/usb/gadget/function/f_fs.c ffs->ffs_eventfd = NULL; ffs 2530 drivers/usb/gadget/function/f_fs.c helper.ffs = ffs; ffs 2540 drivers/usb/gadget/function/f_fs.c if (!ffs->eps_count && !ffs->interfaces_count) { ffs 2541 drivers/usb/gadget/function/f_fs.c ffs->eps_count = helper.eps_count; ffs 2542 drivers/usb/gadget/function/f_fs.c ffs->interfaces_count = helper.interfaces_count; ffs 2544 drivers/usb/gadget/function/f_fs.c if (ffs->eps_count != helper.eps_count) { ffs 2548 drivers/usb/gadget/function/f_fs.c if (ffs->interfaces_count != helper.interfaces_count) { ffs 2558 drivers/usb/gadget/function/f_fs.c __ffs_data_do_os_desc, ffs); ffs 2570 drivers/usb/gadget/function/f_fs.c ffs->raw_descs_data = _data; ffs 2571 drivers/usb/gadget/function/f_fs.c ffs->raw_descs = raw_descs; ffs 2572 drivers/usb/gadget/function/f_fs.c ffs->raw_descs_length = data - raw_descs; ffs 2573 drivers/usb/gadget/function/f_fs.c ffs->fs_descs_count = counts[0]; ffs 2574 drivers/usb/gadget/function/f_fs.c ffs->hs_descs_count = counts[1]; ffs 2575 drivers/usb/gadget/function/f_fs.c ffs->ss_descs_count = counts[2]; ffs 2576 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_count = os_descs_count; ffs 2585 drivers/usb/gadget/function/f_fs.c static int __ffs_data_got_strings(struct ffs_data *ffs, ffs 2607 drivers/usb/gadget/function/f_fs.c needed_count = ffs->strings_count; ffs 2706 drivers/usb/gadget/function/f_fs.c ffs->stringtabs = stringtabs; ffs 2707 drivers/usb/gadget/function/f_fs.c ffs->raw_strings = _data; ffs 2721 drivers/usb/gadget/function/f_fs.c static void __ffs_event_add(struct ffs_data *ffs, ffs 2735 drivers/usb/gadget/function/f_fs.c if (ffs->setup_state == FFS_SETUP_PENDING) ffs 2736 drivers/usb/gadget/function/f_fs.c ffs->setup_state = FFS_SETUP_CANCELLED; ffs 2771 drivers/usb/gadget/function/f_fs.c u8 *ev = ffs->ev.types, *out = ev; ffs 2772 drivers/usb/gadget/function/f_fs.c unsigned n = ffs->ev.count; ffs 2778 drivers/usb/gadget/function/f_fs.c ffs->ev.count = out - ffs->ev.types; ffs 2782 drivers/usb/gadget/function/f_fs.c ffs->ev.types[ffs->ev.count++] = type; ffs 2783 drivers/usb/gadget/function/f_fs.c wake_up_locked(&ffs->ev.waitq); ffs 2784 drivers/usb/gadget/function/f_fs.c if (ffs->ffs_eventfd) ffs 2785 drivers/usb/gadget/function/f_fs.c eventfd_signal(ffs->ffs_eventfd, 1); ffs 2788 drivers/usb/gadget/function/f_fs.c static void ffs_event_add(struct ffs_data *ffs, ffs 2792 drivers/usb/gadget/function/f_fs.c spin_lock_irqsave(&ffs->ev.waitq.lock, flags); ffs 2793 drivers/usb/gadget/function/f_fs.c __ffs_event_add(ffs, type); ffs 2794 drivers/usb/gadget/function/f_fs.c spin_unlock_irqrestore(&ffs->ev.waitq.lock, flags); ffs 2799 drivers/usb/gadget/function/f_fs.c static int ffs_ep_addr2idx(struct ffs_data *ffs, u8 endpoint_address) ffs 2803 drivers/usb/gadget/function/f_fs.c for (i = 1; i < ARRAY_SIZE(ffs->eps_addrmap); ++i) ffs 2804 drivers/usb/gadget/function/f_fs.c if (ffs->eps_addrmap[i] == endpoint_address) ffs 2843 drivers/usb/gadget/function/f_fs.c idx = ffs_ep_addr2idx(func->ffs, ds->bEndpointAddress) - 1; ffs 2896 drivers/usb/gadget/function/f_fs.c if (func->ffs->user_flags & FUNCTIONFS_VIRTUAL_ADDR) ffs 2936 drivers/usb/gadget/function/f_fs.c newValue = func->ffs->stringtabs[0]->strings[*valuep - 1].id; ffs 2994 drivers/usb/gadget/function/f_fs.c ext_prop = func->ffs->ms_os_descs_ext_prop_avail; ffs 2995 drivers/usb/gadget/function/f_fs.c func->ffs->ms_os_descs_ext_prop_avail += sizeof(*ext_prop); ffs 3003 drivers/usb/gadget/function/f_fs.c ext_prop_name = func->ffs->ms_os_descs_ext_prop_name_avail; ffs 3004 drivers/usb/gadget/function/f_fs.c func->ffs->ms_os_descs_ext_prop_name_avail += ffs 3007 drivers/usb/gadget/function/f_fs.c ext_prop_data = func->ffs->ms_os_descs_ext_prop_data_avail; ffs 3008 drivers/usb/gadget/function/f_fs.c func->ffs->ms_os_descs_ext_prop_data_avail += ffs 3063 drivers/usb/gadget/function/f_fs.c func->ffs = ffs_opts->dev->ffs_data; ffs 3080 drivers/usb/gadget/function/f_fs.c ret = functionfs_bind(func->ffs, c->cdev); ffs 3085 drivers/usb/gadget/function/f_fs.c func->function.strings = func->ffs->stringtabs; ffs 3094 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = func->ffs; ffs 3096 drivers/usb/gadget/function/f_fs.c const int full = !!func->ffs->fs_descs_count; ffs 3097 drivers/usb/gadget/function/f_fs.c const int high = !!func->ffs->hs_descs_count; ffs 3098 drivers/usb/gadget/function/f_fs.c const int super = !!func->ffs->ss_descs_count; ffs 3105 drivers/usb/gadget/function/f_fs.c vla_item_with_sz(d, struct ffs_ep, eps, ffs->eps_count); ffs 3107 drivers/usb/gadget/function/f_fs.c full ? ffs->fs_descs_count + 1 : 0); ffs 3109 drivers/usb/gadget/function/f_fs.c high ? ffs->hs_descs_count + 1 : 0); ffs 3111 drivers/usb/gadget/function/f_fs.c super ? ffs->ss_descs_count + 1 : 0); ffs 3112 drivers/usb/gadget/function/f_fs.c vla_item_with_sz(d, short, inums, ffs->interfaces_count); ffs 3114 drivers/usb/gadget/function/f_fs.c c->cdev->use_os_string ? ffs->interfaces_count : 0); ffs 3116 drivers/usb/gadget/function/f_fs.c c->cdev->use_os_string ? ffs->interfaces_count : 0); ffs 3118 drivers/usb/gadget/function/f_fs.c c->cdev->use_os_string ? ffs->interfaces_count : 0); ffs 3120 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_count); ffs 3122 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_name_len); ffs 3124 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_data_len); ffs 3125 drivers/usb/gadget/function/f_fs.c vla_item_with_sz(d, char, raw_descs, ffs->raw_descs_length); ffs 3139 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_avail = vla_ptr(vlabuf, d, ext_prop); ffs 3140 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_name_avail = ffs 3142 drivers/usb/gadget/function/f_fs.c ffs->ms_os_descs_ext_prop_data_avail = ffs 3146 drivers/usb/gadget/function/f_fs.c memcpy(vla_ptr(vlabuf, d, raw_descs), ffs->raw_descs, ffs 3147 drivers/usb/gadget/function/f_fs.c ffs->raw_descs_length); ffs 3151 drivers/usb/gadget/function/f_fs.c for (i = 0; i < ffs->eps_count; i++) ffs 3167 drivers/usb/gadget/function/f_fs.c fs_len = ffs_do_descs(ffs->fs_descs_count, ffs 3181 drivers/usb/gadget/function/f_fs.c hs_len = ffs_do_descs(ffs->hs_descs_count, ffs 3195 drivers/usb/gadget/function/f_fs.c ss_len = ffs_do_descs(ffs->ss_descs_count, ffs 3212 drivers/usb/gadget/function/f_fs.c ret = ffs_do_descs(ffs->fs_descs_count + ffs 3213 drivers/usb/gadget/function/f_fs.c (high ? ffs->hs_descs_count : 0) + ffs 3214 drivers/usb/gadget/function/f_fs.c (super ? ffs->ss_descs_count : 0), ffs 3222 drivers/usb/gadget/function/f_fs.c for (i = 0; i < ffs->interfaces_count; ++i) { ffs 3232 drivers/usb/gadget/function/f_fs.c ret = ffs_do_os_descs(ffs->ms_os_descs_count, ffs 3242 drivers/usb/gadget/function/f_fs.c c->cdev->use_os_string ? ffs->interfaces_count : 0; ffs 3245 drivers/usb/gadget/function/f_fs.c ffs_event_add(ffs, FUNCTIONFS_BIND); ffs 3265 drivers/usb/gadget/function/f_fs.c functionfs_unbind(func->ffs); ffs 3275 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = container_of(work, ffs 3277 drivers/usb/gadget/function/f_fs.c ffs_data_reset(ffs); ffs 3284 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = func->ffs; ffs 3293 drivers/usb/gadget/function/f_fs.c if (ffs->func) ffs 3294 drivers/usb/gadget/function/f_fs.c ffs_func_eps_disable(ffs->func); ffs 3296 drivers/usb/gadget/function/f_fs.c if (ffs->state == FFS_DEACTIVATED) { ffs 3297 drivers/usb/gadget/function/f_fs.c ffs->state = FFS_CLOSING; ffs 3298 drivers/usb/gadget/function/f_fs.c INIT_WORK(&ffs->reset_work, ffs_reset_work); ffs 3299 drivers/usb/gadget/function/f_fs.c schedule_work(&ffs->reset_work); ffs 3303 drivers/usb/gadget/function/f_fs.c if (ffs->state != FFS_ACTIVE) ffs 3307 drivers/usb/gadget/function/f_fs.c ffs->func = NULL; ffs 3308 drivers/usb/gadget/function/f_fs.c ffs_event_add(ffs, FUNCTIONFS_DISABLE); ffs 3312 drivers/usb/gadget/function/f_fs.c ffs->func = func; ffs 3315 drivers/usb/gadget/function/f_fs.c ffs_event_add(ffs, FUNCTIONFS_ENABLE); ffs 3328 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = func->ffs; ffs 3350 drivers/usb/gadget/function/f_fs.c if (ffs->state != FFS_ACTIVE) ffs 3364 drivers/usb/gadget/function/f_fs.c if (func->ffs->user_flags & FUNCTIONFS_VIRTUAL_ADDR) ffs 3365 drivers/usb/gadget/function/f_fs.c ret = func->ffs->eps_addrmap[ret]; ffs 3369 drivers/usb/gadget/function/f_fs.c if (func->ffs->user_flags & FUNCTIONFS_ALL_CTRL_RECIP) ffs 3375 drivers/usb/gadget/function/f_fs.c spin_lock_irqsave(&ffs->ev.waitq.lock, flags); ffs 3376 drivers/usb/gadget/function/f_fs.c ffs->ev.setup = *creq; ffs 3377 drivers/usb/gadget/function/f_fs.c ffs->ev.setup.wIndex = cpu_to_le16(ret); ffs 3378 drivers/usb/gadget/function/f_fs.c __ffs_event_add(ffs, FUNCTIONFS_SETUP); ffs 3379 drivers/usb/gadget/function/f_fs.c spin_unlock_irqrestore(&ffs->ev.waitq.lock, flags); ffs 3390 drivers/usb/gadget/function/f_fs.c if (config0 && !(func->ffs->user_flags & FUNCTIONFS_CONFIG0_SETUP)) ffs 3401 drivers/usb/gadget/function/f_fs.c return (bool) (func->ffs->user_flags & ffs 3409 drivers/usb/gadget/function/f_fs.c ffs_event_add(ffs_func_from_usb(f)->ffs, FUNCTIONFS_SUSPEND); ffs 3415 drivers/usb/gadget/function/f_fs.c ffs_event_add(ffs_func_from_usb(f)->ffs, FUNCTIONFS_RESUME); ffs 3430 drivers/usb/gadget/function/f_fs.c unsigned count = func->ffs->interfaces_count; ffs 3570 drivers/usb/gadget/function/f_fs.c struct ffs_data *ffs = func->ffs; ffs 3574 drivers/usb/gadget/function/f_fs.c unsigned count = ffs->eps_count; ffs 3578 drivers/usb/gadget/function/f_fs.c if (ffs->func == func) { ffs 3580 drivers/usb/gadget/function/f_fs.c ffs->func = NULL; ffs 3584 drivers/usb/gadget/function/f_fs.c functionfs_unbind(ffs); ffs 3587 drivers/usb/gadget/function/f_fs.c spin_lock_irqsave(&func->ffs->eps_lock, flags); ffs 3594 drivers/usb/gadget/function/f_fs.c spin_unlock_irqrestore(&func->ffs->eps_lock, flags); ffs 3606 drivers/usb/gadget/function/f_fs.c ffs_event_add(ffs, FUNCTIONFS_UNBIND); ffs 3754 drivers/usb/gadget/function/f_fs.c static int ffs_ready(struct ffs_data *ffs) ffs 3762 drivers/usb/gadget/function/f_fs.c ffs_obj = ffs->private_data; ffs 3773 drivers/usb/gadget/function/f_fs.c ffs_obj->ffs_data = ffs; ffs 3776 drivers/usb/gadget/function/f_fs.c ret = ffs_obj->ffs_ready_callback(ffs); ffs 3781 drivers/usb/gadget/function/f_fs.c set_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags); ffs 3787 drivers/usb/gadget/function/f_fs.c static void ffs_closed(struct ffs_data *ffs) ffs 3796 drivers/usb/gadget/function/f_fs.c ffs_obj = ffs->private_data; ffs 3803 drivers/usb/gadget/function/f_fs.c if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags) && ffs 3805 drivers/usb/gadget/function/f_fs.c ffs_obj->ffs_closed_callback(ffs); ffs 3819 drivers/usb/gadget/function/f_fs.c if (test_bit(FFS_FL_BOUND, &ffs->flags)) ffs 3857 drivers/usb/gadget/function/f_fs.c DECLARE_USB_FUNCTION_INIT(ffs, ffs_alloc_inst, ffs_alloc); ffs 50 drivers/usb/gadget/function/u_fs.h int (*ffs_ready_callback)(struct ffs_data *ffs); ffs 51 drivers/usb/gadget/function/u_fs.h void (*ffs_closed_callback)(struct ffs_data *ffs); ffs 141 drivers/usb/gadget/legacy/g_ffs.c static int functionfs_ready_callback(struct ffs_data *ffs); ffs 142 drivers/usb/gadget/legacy/g_ffs.c static void functionfs_closed_callback(struct ffs_data *ffs); ffs 276 drivers/usb/gadget/legacy/g_ffs.c static int functionfs_ready_callback(struct ffs_data *ffs) ffs 300 drivers/usb/gadget/legacy/g_ffs.c static void functionfs_closed_callback(struct ffs_data *ffs) ffs 327 drivers/usb/host/ehci-sched.c return ffs(smask) - 1; ffs 3772 drivers/usb/host/fotg210-hcd.c uframe = ffs(hc32_to_cpup(fotg210, &hw->hw_info2) & QH_SMASK); ffs 2562 drivers/usb/host/oxu210hp-hcd.c uframe = ffs(le32_to_cpup(&qh->hw_info2) & QH_SMASK); ffs 1256 drivers/usb/musb/musb_core.c size = ffs(max(maxpacket, (u16) 8)) - 1; ffs 325 drivers/video/fbdev/core/cfbfillrect.c dst += dst_idx >> (ffs(bits) - 1); ffs 289 drivers/video/fbdev/core/sysfillrect.c dst += dst_idx >> (ffs(bits) - 1); ffs 695 drivers/video/fbdev/intelfb/intelfbhw.c p1 = ffs(p1); ffs 78 drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c seq_printf(s, "%-20s %10d\n", #x, stats.irqs[ffs(DISPC_IRQ_##x)-1]); ffs 1554 drivers/video/fbdev/omap2/omapfb/dss/dsi.c seq_printf(s, "%-20s %10d\n", #x, stats.dsi_irqs[ffs(DSI_IRQ_##x)-1]); ffs 1578 drivers/video/fbdev/omap2/omapfb/dss/dsi.c stats.vc_irqs[0][ffs(DSI_VC_IRQ_##x)-1], \ ffs 1579 drivers/video/fbdev/omap2/omapfb/dss/dsi.c stats.vc_irqs[1][ffs(DSI_VC_IRQ_##x)-1], \ ffs 1580 drivers/video/fbdev/omap2/omapfb/dss/dsi.c stats.vc_irqs[2][ffs(DSI_VC_IRQ_##x)-1], \ ffs 1581 drivers/video/fbdev/omap2/omapfb/dss/dsi.c stats.vc_irqs[3][ffs(DSI_VC_IRQ_##x)-1]); ffs 1597 drivers/video/fbdev/omap2/omapfb/dss/dsi.c stats.cio_irqs[ffs(DSI_CIO_IRQ_##x)-1]); ffs 118 drivers/video/fbdev/omap2/omapfb/vrfb.c for (i = ffs(map); i; i = ffs(map)) { ffs 507 drivers/virt/vboxguest/vboxguest_core.c u32 bit = ffs(changed) - 1; ffs 206 fs/affs/bitmap.c bit = ffs(tmp & mask) - 1; ffs 250 fs/ceph/ioctl.c ci->i_nr_by_mode[ffs(CEPH_FILE_MODE_LAZY)]++; ffs 669 fs/ext4/mballoc.c max = ffs(first | border) - 1; ffs 1700 fs/fat/inode.c sbi->cluster_bits = ffs(sbi->cluster_size) - 1; ffs 1762 fs/fat/inode.c sbi->dir_per_block_bits = ffs(sbi->dir_per_block) - 1; ffs 119 fs/hfs/btree.c tree->node_size_shift = ffs(size) - 1; ffs 237 fs/hfsplus/btree.c tree->node_size_shift = ffs(size) - 1; ffs 1708 fs/ntfs/attrib.c ffs(ni->itype.compressed.block_size) - ffs 857 fs/ntfs/inode.c ffs(ni->itype.index.block_size) - 1; ffs 1078 fs/ntfs/inode.c ffs(ni->itype. ffs 1360 fs/ntfs/inode.c ffs(ni->itype.compressed. ffs 1567 fs/ntfs/inode.c ni->itype.index.block_size_bits = ffs(ni->itype.index.block_size) - 1; ffs 759 fs/ntfs/super.c vol->sector_size_bits = ffs(vol->sector_size) - 1; ffs 772 fs/ntfs/super.c sectors_per_cluster_bits = ffs(b->bpb.sectors_per_cluster) - 1; ffs 779 fs/ntfs/super.c vol->cluster_size_bits = ffs(vol->cluster_size) - 1; ffs 795 fs/ntfs/super.c (ffs(clusters_per_mft_record) - 1); ffs 804 fs/ntfs/super.c vol->mft_record_size_bits = ffs(vol->mft_record_size) - 1; ffs 835 fs/ntfs/super.c (ffs(clusters_per_index_record) - 1); ffs 845 fs/ntfs/super.c vol->index_record_size_bits = ffs(vol->index_record_size) - 1; ffs 1558 fs/ocfs2/cluster/heartbeat.c *ret_bits = ffs(bytes) - 1; ffs 320 fs/orangefs/orangefs-utils.c inode->i_blkbits = ffs(new_op->downcall.resp.getattr. ffs 61 fs/squashfs/xz_wrapper.c n = ffs(opts->dict_size) - 1; ffs 2550 fs/ubifs/debug.c unsigned int from, to, ffs = chance(1, 2); ffs 2558 fs/ubifs/debug.c ffs ? "0xFFs" : "random data"); ffs 2560 fs/ubifs/debug.c if (ffs) ffs 104 fs/xfs/libxfs/xfs_bit.c return result + ffs(tmp) - 1; ffs 44 fs/xfs/libxfs/xfs_bit.h return ffs(v) - 1; ffs 54 fs/xfs/libxfs/xfs_bit.h n = ffs(w); ffs 58 fs/xfs/libxfs/xfs_bit.h n = ffs(w); ffs 389 fs/xfs/xfs_log_recover.c bufblks = 1 << ffs(nbblks); ffs 1597 fs/xfs/xfs_log_recover.c bufblks = 1 << ffs(blocks); ffs 235 fs/xfs/xfs_super.c iosizelog = ffs(iosize) - 1; ffs 1663 fs/xfs/xfs_super.c sb->s_blocksize_bits = ffs(sb->s_blocksize) - 1; ffs 48 include/linux/count_zeros.h return ffs(x); ffs 12 include/linux/soundwire/sdw_registers.h #define SDW_REG_SHIFT(n) (ffs(n) - 1) ffs 280 kernel/softirq.c while ((softirq_bit = ffs(pending))) { ffs 5353 net/core/dev.c while ((i = ffs(bitmask)) != 0) { ffs 696 net/ipv4/netfilter/ipt_CLUSTERIP.c idx->bit = ffs(local_nodes); ffs 712 net/ipv4/netfilter/ipt_CLUSTERIP.c idx->bit = ffs(idx->val); ffs 597 net/mac80211/debugfs_sta.c u8 idx = ((cap[i] & msk) >> (ffs(msk) - 1)) + off; \ ffs 605 net/mac80211/rate.c s8 baserate = basic_rates ? ffs(basic_rates) - 1 : 0; ffs 1097 net/netlink/af_netlink.c nlk->dst_group = ffs(nladdr->nl_groups); ffs 1869 net/netlink/af_netlink.c dst_group = ffs(addr->nl_groups); ffs 317 net/sched/cls_flow.c key = ffs(keymask) - 1; ffs 1045 net/sched/cls_u32.c n->fshift = s->hmask ? ffs(ntohl(s->hmask)) - 1 : 0; ffs 323 sound/soc/bcm/bcm2835-i2s.c *ch1_pos = bcm2835_i2s_convert_slot((ffs(mask) - 1), odd_offset) ffs 2297 sound/soc/codecs/ab8500-codec.c slot = ffs(tx_mask); ffs 2304 sound/soc/codecs/ab8500-codec.c slot = ffs(tx_mask); ffs 2338 sound/soc/codecs/ab8500-codec.c slot = ffs(rx_mask); ffs 2344 sound/soc/codecs/ab8500-codec.c slot = ffs(rx_mask); ffs 1981 sound/soc/codecs/arizona.c slot = ffs(mask) - 1; ffs 562 sound/soc/codecs/cs35l33.c slot = ffs(rx_mask) - 1; ffs 573 sound/soc/codecs/cs35l33.c slot = ffs(tx_mask) - 1; ffs 630 sound/soc/codecs/cs35l33.c slot = ffs(tx_mask) - 1; ffs 281 sound/soc/codecs/cs35l34.c slot = ffs(rx_mask) - 1; ffs 289 sound/soc/codecs/cs35l34.c slot = ffs(tx_mask) - 1; ffs 331 sound/soc/codecs/cs35l34.c slot = ffs(tx_mask) - 1; ffs 1440 sound/soc/codecs/da7219.c slot_offset = ffs(tx_mask) - 1; ffs 3289 sound/soc/codecs/madera.c slot = ffs(mask) - 1; ffs 19 sound/soc/intel/skylake/skl-i2s.h #define SKL_SHIFT(x) (ffs(x) - 1) ffs 3864 sound/soc/soc-dapm.c fmt = ffs(config->formats) - 1; ffs 1987 tools/perf/builtin-sched.c unsigned bit = state ? ffs(state) : 0; ffs 185 virt/kvm/arm/vgic/vgic-v2.c u32 src = ffs(irq->source); ffs 168 virt/kvm/arm/vgic/vgic-v3.c u32 src = ffs(irq->source);