/linux-6.1.9/scripts/coccinelle/misc/ |
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. 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-6.1.9/include/linux/ |
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()
|
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)
|
/linux-6.1.9/kernel/trace/ |
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()
|
/linux-6.1.9/drivers/clk/imx/ |
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()
|
D | clk-pfd.c | 59 do_div(tmp, frac); in clk_pfd_recalc_rate() 71 do_div(tmp, rate); in clk_pfd_round_rate() 79 do_div(tmp, frac); in clk_pfd_round_rate() 92 do_div(tmp, rate); in clk_pfd_set_rate()
|
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()
|
D | clk-pllv4.c | 89 do_div(temp64, mfd); in clk_pllv4_recalc_rate() 122 do_div(temp64, parent_rate); in clk_pllv4_round_rate() 136 do_div(temp64, mfd); in clk_pllv4_round_rate() 171 do_div(temp64, parent_rate); in clk_pllv4_set_rate()
|
D | clk-sscg-pll.c | 136 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-6.1.9/drivers/media/platform/st/sti/hva/ |
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()
|
/linux-6.1.9/drivers/clk/mxs/ |
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()
|
/linux-6.1.9/lib/math/ |
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()
|
/linux-6.1.9/drivers/media/dvb-frontends/ |
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()
|
/linux-6.1.9/drivers/iio/dac/ |
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()
|
/linux-6.1.9/arch/x86/kernel/ |
D | tsc.c | 347 do_div(tmp, 1000000); in calc_hpet_ref() 367 do_div(tmp, PMTMR_TICKS_PER_SEC); in calc_pmtimer_ref() 368 do_div(deltatsc, tmp); in calc_pmtimer_ref() 451 do_div(delta, ms); in pit_calibrate_tsc() 613 do_div(delta, i*256*1000); in quick_pit_calibrate() 790 do_div(delta, tsc_ref_min); in pit_hpet_ptimer_calibrate_cpu() 1263 rem = do_div(art, art_to_tsc_denominator); in convert_art_to_tsc() 1268 do_div(tmp, art_to_tsc_denominator); in convert_art_to_tsc() 1301 rem = do_div(art_ns, USEC_PER_SEC); in convert_art_ns_to_tsc() 1306 do_div(tmp, USEC_PER_SEC); in convert_art_ns_to_tsc() [all …]
|
/linux-6.1.9/drivers/phy/ |
D | phy-core-mipi-dphy.c | 32 do_div(hs_clk_rate, lanes); in phy_mipi_dphy_get_default_config() 35 do_div(ui, hs_clk_rate); in phy_mipi_dphy_get_default_config() 92 do_div(ui, cfg->hs_clk_rate); in phy_mipi_dphy_config_validate()
|
/linux-6.1.9/kernel/ |
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()
|
/linux-6.1.9/arch/powerpc/kvm/ |
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()
|
/linux-6.1.9/drivers/clk/samsung/ |
D | clk-pll.c | 162 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() 446 do_div(fvco, (pdiv << sdiv)); in samsung_pll0822x_recalc_rate() 534 do_div(fvco, (pdiv << sdiv)); in samsung_pll0831x_recalc_rate() 632 do_div(fvco, (pdiv << sdiv)); in samsung_pll45xx_recalc_rate() 768 do_div(fvco, (pdiv << sdiv)); in samsung_pll46xx_recalc_rate() 896 do_div(fvco, (pdiv << sdiv)); in samsung_pll6552_recalc_rate() 933 do_div(fvco, (pdiv << sdiv)); in samsung_pll6553_recalc_rate() [all …]
|
/linux-6.1.9/fs/xfs/ |
D | xfs_linux.h | 180 do_div(x, y); in rounddown_64() 187 do_div(x, y); in roundup_64() 194 do_div(x, y); in howmany_64()
|
/linux-6.1.9/kernel/time/ |
D | jiffies.c | 94 do_div(shift_hz, cycles_per_tick); in register_refined_jiffies() 98 do_div(nsec_per_tick, (u32)shift_hz); in register_refined_jiffies()
|
/linux-6.1.9/drivers/pwm/ |
D | pwm-lpss.c | 132 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-6.1.9/include/asm-generic/ |
D | div64.h | 45 # define do_div(n,base) ({ \ macro 219 # define do_div(n,base) ({ \ macro 245 # error do_div() does not yet support the C64
|
/linux-6.1.9/drivers/clk/mmp/ |
D | clk-pll.c | 75 do_div(rate, refdiv); in mmp_clk_pll_recalc_rate() 76 do_div(rate, postdivs[postdiv]); in mmp_clk_pll_recalc_rate() 89 do_div(rate, refdiv + 2); in mmp_clk_pll_recalc_rate()
|
/linux-6.1.9/drivers/iio/common/scmi_sensors/ |
D | scmi_iio.c | 71 do_div(time, int_pow(10, abs(tstamp_scale))); in scmi_iio_sensor_update_cb() 159 do_div(sf, MICROHZ_PER_HZ); in scmi_iio_set_odr_val() 163 do_div(sec, uHz); in scmi_iio_set_odr_val() 240 rem = do_div(freq, interval_ns); in convert_ns_to_freq() 243 do_div(*uhz, interval_ns); in convert_ns_to_freq() 269 do_div(sensor_update_interval, sensor_interval_mult); in scmi_iio_get_odr_val() 396 rem = do_div(resolution, in scmi_iio_get_raw_available() 503 do_div(sensor_update_interval, sensor_interval_mult); in scmi_iio_convert_interval_to_ns()
|