/openbmc/linux/scripts/coccinelle/misc/ |
H A D | do_div.cocci | 2 /// do_div() does a 64-by-32 division. 4 /// do_div() truncates it to 32 bits, this means it can test 7 //# This makes an effort to find those inappropriate do_div() calls. 74 * do_div(f, l); 76 * do_div(f, ul); 78 * do_div(f, ul64); 80 * do_div(f, sl64); 92 do_div@p(f, l); 94 do_div@p(f, ul); 96 do_div@p(f, ul64); [all …]
|
/openbmc/linux/include/linux/ |
H A D | acct.h | 77 do_div(tmp, (NSEC_PER_SEC / AHZ)); in jiffies_to_AHZ() 85 do_div(x, (NSEC_PER_SEC / AHZ)); in nsec_to_AHZ() 88 do_div(x, (NSEC_PER_SEC / 512)); in nsec_to_AHZ() 96 do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (AHZ/2)) in nsec_to_AHZ()
|
H A D | math.h | 40 ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) 105 do_div(_tmp, __d); \ 133 #define sector_div(a, b) do_div(a, b)
|
/openbmc/u-boot/arch/arm/cpu/arm926ejs/mx27/ |
H A D | timer.c | 43 do_div(tick, CONFIG_MX27_CLK32); in tick_to_time() 50 do_div(time, CONFIG_SYS_HZ); in time_to_tick() 57 do_div(us, 1000000); in us_to_tick() 68 do_div(tick, TICK_PER_TIME); in tick_to_time() 80 do_div(us, US_PER_TICK); in us_to_tick()
|
/openbmc/u-boot/board/armltd/integrator/ |
H A D | timer.c | 87 do_div(div_timer, CONFIG_SYS_HZ); in timer_init() 88 do_div(div_timer, div_clock); in timer_init() 114 do_div(now, div_timer); in get_timer_masked() 159 do_div(tmp, div_clock); in get_tbclk()
|
/openbmc/linux/kernel/trace/ |
H A D | trace_benchmark.c | 102 do_div(stddev, (u32)bm_cnt); in trace_do_benchmark() 103 do_div(stddev, (u32)bm_cnt - 1); in trace_do_benchmark() 108 do_div(delta, bm_cnt); in trace_do_benchmark() 130 do_div(seed, last_seed); in trace_do_benchmark() 132 do_div(seed, 2); in trace_do_benchmark()
|
/openbmc/linux/drivers/clk/imx/ |
H A D | clk-frac-pll.c | 112 do_div(temp64, PLL_FRAC_DENOM); in clk_pll_recalc_rate() 113 do_div(temp64, divq); in clk_pll_recalc_rate() 116 do_div(rate, divq); in clk_pll_recalc_rate() 132 do_div(temp64, parent_rate); in clk_pll_round_rate() 136 do_div(temp64, parent_rate); in clk_pll_round_rate() 141 do_div(temp64, PLL_FRAC_DENOM); in clk_pll_round_rate() 169 do_div(temp64, parent_rate); in clk_pll_set_rate()
|
H A D | clk-pfd.c | 60 do_div(tmp, frac); in clk_pfd_recalc_rate() 72 do_div(tmp, rate); in clk_pfd_round_rate() 80 do_div(tmp, frac); in clk_pfd_round_rate() 93 do_div(tmp, rate); in clk_pfd_set_rate()
|
H A D | clk-pllv4.c | 93 do_div(temp64, mfd); in clk_pllv4_recalc_rate() 111 do_div(temp64, parent_rate); in clk_pllv4_round_rate() 139 do_div(temp64, parent_rate); in clk_pllv4_round_rate() 153 do_div(temp64, mfd); in clk_pllv4_round_rate() 194 do_div(temp64, parent_rate); in clk_pllv4_set_rate()
|
H A D | clk-pfdv2.c | 96 do_div(tmp, frac); in clk_pfdv2_recalc_rate() 118 do_div(tmp, rate); in clk_pfdv2_determine_rate() 128 do_div(tmp, frac); in clk_pfdv2_determine_rate() 177 do_div(tmp, rate); in clk_pfdv2_set_rate()
|
/openbmc/linux/drivers/media/platform/st/sti/hva/ |
H A D | hva-debugfs.c | 132 do_div(div, 100); in hva_dbg_perf_begin() 153 do_div(div, dbg->window_duration); in hva_dbg_perf_begin() 188 do_div(div, 1000); in hva_dbg_perf_end() 201 do_div(div, 100); in hva_dbg_perf_end() 226 do_div(div, dbg->cnt_duration); in hva_dbg_perf_compute() 234 do_div(div, dbg->total_duration); in hva_dbg_perf_compute() 242 do_div(div, dbg->cnt_period); in hva_dbg_perf_compute() 250 do_div(div, dbg->total_period); in hva_dbg_perf_compute() 263 do_div(div, dbg->total_period); in hva_dbg_perf_compute()
|
/openbmc/linux/lib/math/ |
H A D | reciprocal_div.c | 25 do_div(m, d); in reciprocal_value() 52 do_div(mlow, d); in reciprocal_value_adv() 54 do_div(mhigh, d); in reciprocal_value_adv()
|
/openbmc/linux/drivers/clk/mxs/ |
H A D | clk-ref.c | 55 do_div(tmp, frac); in clk_ref_recalc_rate() 68 do_div(tmp, rate); in clk_ref_round_rate() 78 do_div(tmp, frac); in clk_ref_round_rate() 93 do_div(tmp, rate); in clk_ref_set_rate()
|
/openbmc/u-boot/arch/arm/cpu/arm926ejs/lpc32xx/ |
H A D | clk.c | 48 do_div(fin, p_div); in get_hclk_pll_rate() 52 do_div(fref, n_div); in get_hclk_pll_rate() 61 do_div(fout, p_div); in get_hclk_pll_rate()
|
/openbmc/u-boot/include/ |
H A D | div64.h | 28 # define do_div(n,base) ({ \ macro 204 # define do_div(n,base) ({ \ macro 230 # error do_div() does not yet support the C64 240 do_div(__res, divisor); in lldiv()
|
/openbmc/linux/drivers/media/dvb-frontends/ |
H A D | ves1820.c | 129 fptmp = fpxin; do_div(fptmp, 123); in ves1820_set_symbolrate() 132 fptmp = fpxin; do_div(fptmp, 160); in ves1820_set_symbolrate() 135 fptmp = fpxin; do_div(fptmp, 246); in ves1820_set_symbolrate() 138 fptmp = fpxin; do_div(fptmp, 320); in ves1820_set_symbolrate() 141 fptmp = fpxin; do_div(fptmp, 492); in ves1820_set_symbolrate() 144 fptmp = fpxin; do_div(fptmp, 640); in ves1820_set_symbolrate() 147 fptmp = fpxin; do_div(fptmp, 984); in ves1820_set_symbolrate()
|
/openbmc/u-boot/drivers/pwm/ |
H A D | pwm-imx-util.c | 60 do_div(c, 1000000000); in pwm_imx_get_parms() 67 do_div(c, period_ns); in pwm_imx_get_parms()
|
/openbmc/linux/drivers/iio/dac/ |
H A D | dpot-dac.c | 69 do_div(tmp, dac->max_ohms); in dpot_dac_read_raw() 71 do_div(tmp, 1000000000LL); in dpot_dac_read_raw() 152 do_div(tmp, val2); in dpot_dac_channel_max_ohms() 156 do_div(tmp, 1000000000LL); in dpot_dac_channel_max_ohms()
|
/openbmc/linux/kernel/ |
H A D | tsacct.c | 36 do_div(delta, NSEC_PER_USEC); in bacct_add_tsk() 39 do_div(delta, NSEC_PER_USEC); in bacct_add_tsk() 97 do_div(stats->coremem, 1000 * KB); in xacct_add_tsk() 99 do_div(stats->virtmem, 1000 * KB); in xacct_add_tsk()
|
/openbmc/linux/arch/powerpc/kvm/ |
H A D | timing.c | 140 do_div(min, tb_ticks_per_usec); in kvmppc_exit_timing_show() 142 do_div(max, tb_ticks_per_usec); in kvmppc_exit_timing_show() 144 do_div(sum, tb_ticks_per_usec); in kvmppc_exit_timing_show() 146 do_div(sum_quad, tb_ticks_per_usec); in kvmppc_exit_timing_show()
|
/openbmc/u-boot/arch/arm/cpu/armv7/vf610/ |
H A D | timer.c | 21 do_div(tick, mxc_get_clock(MXC_IPG_CLK)); in tick_to_time() 29 do_div(usec, 1000000); in us_to_tick()
|
/openbmc/u-boot/arch/arm/mach-rmobile/ |
H A D | timer.c | 41 do_div(timer, CLK2MHZ(CONFIG_SYS_CPU_CLK)); in get_time_us() 49 do_div(us, 1000); in get_time_ms()
|
/openbmc/u-boot/arch/arm/cpu/armv7/ls102xa/ |
H A D | timer.c | 38 do_div(tick, freq); in tick_to_time() 50 do_div(usec, 1000000); in us_to_tick()
|
/openbmc/linux/drivers/phy/ |
H A D | phy-core-mipi-dphy.c | 33 do_div(hs_clk_rate, lanes); in phy_mipi_dphy_calc_config() 37 do_div(ui, hs_clk_rate); in phy_mipi_dphy_calc_config() 115 do_div(ui, cfg->hs_clk_rate); in phy_mipi_dphy_config_validate()
|
/openbmc/u-boot/arch/arm/cpu/arm920t/ep93xx/ |
H A D | timer.c | 35 do_div(ticks, 1000 * 1000); in usecs_to_ticks() 64 do_div(sys_ticks, TIMER_FREQ); in get_ticks()
|