Home
last modified time | relevance | path

Searched refs:do_div (Results 1 – 25 of 666) sorted by relevance

12345678910>>...27

/linux/scripts/coccinelle/misc/
H A Ddo_div.cocci2 /// 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.
62 msg="WARNING: do_div() does a 64-by-32 division, please consider using %s instead."
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);
[all …]
/linux/include/linux/
H A Dacct.h77 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 Dmath.h40 ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
105 do_div(_tmp, __d); \
135 #define sector_div(a, b) do_div(a, b)
/linux/drivers/clk/imx/
H A Dclk-frac-pll.c112 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 Dclk-pfd.c60 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 Dclk-pllv4.c93 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 Dclk-pfdv2.c96 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()
H A Dclk-sscg-pll.c136 do_div(temp_setup->vco2, temp_setup->divr2 + 1); in clk_sscg_divq_lookup()
142 do_div(temp_setup->fout, 2 * (temp_setup->divq + 1)); in clk_sscg_divq_lookup()
178 do_div(temp_setup->ref_div2, temp_setup->divr2 + 1); in clk_sscg_divr2_lookup()
214 do_div(vco1, temp_setup->divr1 + 1); in clk_sscg_divf1_lookup()
236 do_div(temp_setup->ref_div1, temp_setup->divr1 + 1); in clk_sscg_divr1_lookup()
348 do_div(temp64, (divr2 + 1) * (divq + 1)); in clk_sscg_pll_recalc_rate()
352 do_div(temp64, (divr1 + 1) * (divr2 + 1) * (divq + 1)); in clk_sscg_pll_recalc_rate()
/linux/drivers/media/platform/st/sti/hva/
H A Dhva-debugfs.c132 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()
/linux/kernel/trace/
H A Dtrace_benchmark.c101 do_div(stddev, (u32)bm_cnt); in trace_do_benchmark()
102 do_div(stddev, (u32)bm_cnt - 1); in trace_do_benchmark()
107 do_div(delta, (u32)bm_cnt); in trace_do_benchmark()
131 do_div(seed, 2); in trace_do_benchmark()
/linux/drivers/clk/mxs/
H A Dclk-ref.c55 do_div(tmp, frac); in clk_ref_recalc_rate()
68 do_div(tmp, rate); in clk_ref_round_rate()
73 do_div(tmp, frac); in clk_ref_round_rate()
88 do_div(tmp, rate); in clk_ref_set_rate()
/linux/lib/math/
H A Dreciprocal_div.c25 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()
/linux/drivers/media/dvb-frontends/
H A Dves1820.c129 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()
H A Dtda10048.c307 do_div(t, sample_freq_hz); in tda10048_set_phy2()
309 do_div(t, 10); in tda10048_set_phy2()
315 do_div(t, sample_freq_hz); in tda10048_set_phy2()
317 do_div(t, 10); in tda10048_set_phy2()
345 do_div(t, z); in tda10048_set_wref()
347 do_div(t, 10); in tda10048_set_wref()
373 do_div(t, bw); in tda10048_set_invwref()
375 do_div(t, 10); in tda10048_set_invwref()
457 do_div(sample_freq, state->pll_nfactor + 1); in tda10048_set_if()
458 do_div(sample_freq, state->pll_pfactor + 4); in tda10048_set_if()
/linux/fs/xfs/
H A Dxfs_linux.h181 do_div(x, y); in rounddown_64()
188 do_div(x, y); in roundup_64()
195 do_div(x, y); in howmany_64()
201 return do_div(x, y) == 0; in isaligned_64()
/linux/drivers/iio/dac/
H A Ddpot-dac.c69 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()
/linux/arch/powerpc/kvm/
H A Dtiming.c140 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()
/linux/kernel/
H A Dtsacct.c36 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()
/linux/drivers/clk/sophgo/
H A Dclk-sg2042-pll.c158 do_div(numerator, denominator); in sg2042_pll_recalc_rate()
209 do_div(tmp0, refdiv); in sg2042_pll_get_postdiv_1_2()
215 do_div(tmp0, rate); in sg2042_pll_get_postdiv_1_2()
277 do_div(tmp, refdiv); in sg2042_get_pll_ctl_setting()
287 do_div(foutvco, refdiv); in sg2042_get_pll_ctl_setting()
302 do_div(tmp, (postdiv1 * postdiv2)); in sg2042_get_pll_ctl_setting()
/linux/drivers/phy/
H A Dphy-core-mipi-dphy.c33 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()
/linux/drivers/pwm/
H A Dpwm-lpss.c132 do_div(freq, period_ns); in pwm_lpss_prepare()
146 do_div(on_time_div, period_ns); in pwm_lpss_prepare()
225 do_div(freq, base_unit_range); in pwm_lpss_get_state()
232 do_div(on_time_div, 255); in pwm_lpss_get_state()
/linux/drivers/clk/samsung/
H A Dclk-pll.c162 do_div(fvco, (pdiv + 2) << sdiv); in samsung_pll2126_recalc_rate()
195 do_div(fvco, pdiv << sdiv); in samsung_pll3000_recalc_rate()
232 do_div(fvco, (pdiv << sdiv)); in samsung_pll35xx_recalc_rate()
339 do_div(fvco, (pdiv << sdiv)); in samsung_pll36xx_recalc_rate()
455 do_div(fvco, (pdiv << sdiv)); in samsung_pll0822x_recalc_rate()
548 do_div(fvco, (pdiv << sdiv)); in samsung_pll0831x_recalc_rate()
646 do_div(fvco, (pdiv << sdiv)); in samsung_pll45xx_recalc_rate()
782 do_div(fvco, (pdiv << sdiv)); in samsung_pll46xx_recalc_rate()
910 do_div(fvco, (pdiv << sdiv)); in samsung_pll6552_recalc_rate()
947 do_div(fvco, (pdiv << sdiv)); in samsung_pll6553_recalc_rate()
[all …]
/linux/drivers/iio/common/scmi_sensors/
H A Dscmi_iio.c74 do_div(time, int_pow(10, abs(tstamp_scale))); in scmi_iio_sensor_update_cb()
162 do_div(sf, MICROHZ_PER_HZ); in scmi_iio_set_odr_val()
166 do_div(sec, uHz); in scmi_iio_set_odr_val()
244 rem = do_div(freq, interval_ns); in convert_ns_to_freq()
247 do_div(*uhz, interval_ns); in convert_ns_to_freq()
273 do_div(sensor_update_interval, sensor_interval_mult); in scmi_iio_get_odr_val()
400 rem = do_div(resolution, in scmi_iio_get_raw_available()
507 do_div(sensor_update_interval, sensor_interval_mult); in scmi_iio_convert_interval_to_ns()
/linux/drivers/clk/rockchip/
H A Dclk-pll.c173 do_div(rate64, cur.refdiv); in rockchip_rk3036_pll_recalc_rate()
179 do_div(frac_rate64, cur.refdiv); in rockchip_rk3036_pll_recalc_rate()
183 do_div(rate64, cur.postdiv1); in rockchip_rk3036_pll_recalc_rate()
184 do_div(rate64, cur.postdiv2); in rockchip_rk3036_pll_recalc_rate()
418 do_div(rate64, cur.nr); in rockchip_rk3066_pll_recalc_rate()
419 do_div(rate64, cur.no); in rockchip_rk3066_pll_recalc_rate()
655 do_div(rate64, cur.refdiv); in rockchip_rk3399_pll_recalc_rate()
661 do_div(frac_rate64, cur.refdiv); in rockchip_rk3399_pll_recalc_rate()
665 do_div(rate64, cur.postdiv1); in rockchip_rk3399_pll_recalc_rate()
666 do_div(rate64, cur.postdiv2); in rockchip_rk3399_pll_recalc_rate()
[all …]
/linux/include/asm-generic/
H A Ddiv64.h45 # define do_div(n,base) ({ \ macro
219 # define do_div(n,base) ({ \ macro
245 # error do_div() does not yet support the C64

12345678910>>...27