Home
last modified time | relevance | path

Searched refs:diff (Results 1 – 25 of 100) sorted by relevance

1234

/drivers/isdn/pcbit/
Dlayer2.h205 int diff; in memcpy_topcbit() local
207 diff = len - (BANKLEN - (dev->writeptr - dev->sh_mem)); in memcpy_topcbit()
209 if (diff > 0) in memcpy_topcbit()
211 memcpy_toio(dev->writeptr, data, len - diff); in memcpy_topcbit()
212 memcpy_toio(dev->sh_mem, data + (len - diff), diff); in memcpy_topcbit()
213 dev->writeptr = dev->sh_mem + diff; in memcpy_topcbit()
220 if (diff == 0) in memcpy_topcbit()
262 int diff; in memcpy_frompcbit() local
264 diff = len - (BANKLEN - (dev->readptr - (dev->sh_mem + BANK2))); in memcpy_frompcbit()
265 if (diff > 0) in memcpy_frompcbit()
[all …]
/drivers/video/vermilion/
Dcr_pll.c105 int diff; in crvml_nearest_index() local
110 diff = clock - crvml_clocks[i]; in crvml_nearest_index()
111 diff = (diff < 0) ? -diff : diff; in crvml_nearest_index()
112 if (diff < cur_diff) { in crvml_nearest_index()
114 cur_diff = diff; in crvml_nearest_index()
/drivers/net/ethernet/broadcom/bnx2x/
Dbnx2x_stats.h371 DIFF_64(diff.hi, new->s##_hi, pstats->mac_stx[0].t##_hi, \
372 diff.lo, new->s##_lo, pstats->mac_stx[0].t##_lo); \
375 ADD_64(pstats->mac_stx[1].t##_hi, diff.hi, \
376 pstats->mac_stx[1].t##_lo, diff.lo); \
381 DIFF_64(diff.hi, new->s##_hi, old->s##_hi, \
382 diff.lo, new->s##_lo, old->s##_lo); \
383 ADD_64(estats->t##_hi, diff.hi, \
384 estats->t##_lo, diff.lo); \
394 #define ADD_STAT64(diff, t) \ argument
396 ADD_64(pstats->mac_stx[1].t##_hi, new->diff##_hi, \
[all …]
/drivers/net/fddi/skfp/
Dhwt.c229 long diff ; in hwt_wait_time() local
244 diff = (long)(start - hwt_quick_read(smc)) ; in hwt_wait_time()
245 if (diff < 0) { in hwt_wait_time()
246 diff += interval ; in hwt_wait_time()
248 } while (diff <= duration) ; in hwt_wait_time()
251 diff = interval ; in hwt_wait_time()
256 diff += interval ; in hwt_wait_time()
265 } while (diff <= duration) ; in hwt_wait_time()
/drivers/video/geode/
Dvideo_cs5530.c77 long min, diff; in cs5530_set_dclk_frequency() local
84 diff = cs5530_pll_table[i].pixclock - info->var.pixclock; in cs5530_set_dclk_frequency()
85 if (diff < 0L) diff = -diff; in cs5530_set_dclk_frequency()
86 if (diff < min) { in cs5530_set_dclk_frequency()
87 min = diff; in cs5530_set_dclk_frequency()
Dvideo_gx.c125 long min, diff; in gx_set_dclk_frequency() local
142 diff = abs(pll_table[i].pixclock - info->var.pixclock); in gx_set_dclk_frequency()
143 if (diff < min) { in gx_set_dclk_frequency()
144 min = diff; in gx_set_dclk_frequency()
/drivers/cpuidle/
Dcpuidle.c247 s64 diff; in cpuidle_wrap_enter() local
257 diff = ktime_to_us(ktime_sub(time_end, time_start)); in cpuidle_wrap_enter()
258 if (diff > INT_MAX) in cpuidle_wrap_enter()
259 diff = INT_MAX; in cpuidle_wrap_enter()
261 dev->last_residency = (int) diff; in cpuidle_wrap_enter()
271 s64 diff; in poll_idle() local
279 diff = ktime_to_us(ktime_sub(t2, t1)); in poll_idle()
280 if (diff > INT_MAX) in poll_idle()
281 diff = INT_MAX; in poll_idle()
283 dev->last_residency = (int) diff; in poll_idle()
/drivers/gpu/drm/nouveau/
Dnv50_sor.c160 u32 calc, diff; in nv50_sor_dp_calc_tu() local
165 diff = tu_valid - calc; in nv50_sor_dp_calc_tu()
166 if (diff) { in nv50_sor_dp_calc_tu()
167 if (diff >= (symbol / 2)) { in nv50_sor_dp_calc_tu()
168 VTUf = symbol / (symbol - diff); in nv50_sor_dp_calc_tu()
169 if (symbol - (VTUf * diff)) in nv50_sor_dp_calc_tu()
182 VTUf = min((int)(symbol / diff), 15); in nv50_sor_dp_calc_tu()
186 diff = calc - tu_valid; in nv50_sor_dp_calc_tu()
197 if (diff < best_diff) { in nv50_sor_dp_calc_tu()
198 best_diff = diff; in nv50_sor_dp_calc_tu()
[all …]
/drivers/video/
Dmodedb.c594 u32 best, diff, tdiff; in fb_find_mode() local
708 diff = -1; in fb_find_mode()
717 if (abs(db[i].refresh - refresh) < diff) { in fb_find_mode()
718 diff = abs(db[i].refresh - refresh); in fb_find_mode()
728 diff = 2 * (xres + yres); in fb_find_mode()
744 if (diff > tdiff) { in fb_find_mode()
745 diff = tdiff; in fb_find_mode()
885 u32 diff = -1; in fb_find_best_mode() local
896 if (diff > d) { in fb_find_best_mode()
897 diff = d; in fb_find_best_mode()
[all …]
/drivers/infiniband/core/
Dumem.c226 umem->mm->pinned_vm -= umem->diff; in ib_umem_account()
240 unsigned long diff; in ib_umem_release() local
250 diff = PAGE_ALIGN(umem->length + umem->offset) >> PAGE_SHIFT; in ib_umem_release()
264 umem->diff = diff; in ib_umem_release()
272 current->mm->pinned_vm -= diff; in ib_umem_release()
/drivers/video/i810/
Di810_gtf.c228 u32 i, size = 0, pixclock, wm_best = 0, min, diff; in i810_get_watermark() local
266 diff = wmark[i].freq - pixclock; in i810_get_watermark()
268 diff = pixclock - wmark[i].freq; in i810_get_watermark()
269 if (diff < min) { in i810_get_watermark()
271 min = diff; in i810_get_watermark()
Di810_dvt.c217 u32 diff = 0, diff_best = 0xFFFFFFFF, i = 0, i_best = 0; in i810fb_find_best_mode() local
223 diff = pixclock - std_modes[i].pixclock; in i810fb_find_best_mode()
224 if (diff < diff_best) { in i810fb_find_best_mode()
226 diff_best = diff; in i810fb_find_best_mode()
/drivers/s390/cio/
Dblacklist.c81 int diff; in pure_hex() local
83 diff = 0; in pure_hex()
86 while (diff <= max_digit) { in pure_hex()
93 diff++; in pure_hex()
96 if ((diff < min_digit) || (diff > max_digit) || (*val > max_val)) in pure_hex()
/drivers/input/touchscreen/
Dti_tscadc.c204 unsigned int read, diff; in tscadc_read_coordinates() local
217 diff = abs(read - prev_val_x); in tscadc_read_coordinates()
218 if (diff < prev_diff_x) { in tscadc_read_coordinates()
219 prev_diff_x = diff; in tscadc_read_coordinates()
225 diff = abs(read - prev_val_y); in tscadc_read_coordinates()
226 if (diff < prev_diff_y) { in tscadc_read_coordinates()
227 prev_diff_y = diff; in tscadc_read_coordinates()
/drivers/mtd/nand/
Ddavinci_nand.c198 uint32_t diff = eccCalc ^ eccNand; in nand_davinci_correct_1bit() local
200 if (diff) { in nand_davinci_correct_1bit()
201 if ((((diff >> 12) ^ diff) & 0xfff) == 0xfff) { in nand_davinci_correct_1bit()
203 if ((diff >> (12 + 3)) < chip->ecc.size) { in nand_davinci_correct_1bit()
204 dat[diff >> (12 + 3)] ^= BIT((diff >> 12) & 7); in nand_davinci_correct_1bit()
209 } else if (!(diff & (diff - 1))) { in nand_davinci_correct_1bit()
/drivers/gpu/drm/via/
Dvia_dma.c408 uint32_t diff; in via_hook_segment() local
431 diff = (uint32_t) (ptr - reader) - dev_priv->dma_diff; in via_hook_segment()
433 while (diff == 0 && count--) { in via_hook_segment()
438 diff = (uint32_t) (ptr - reader) - dev_priv->dma_diff; in via_hook_segment()
445 diff = (uint32_t) (ptr - reader) - dev_priv->dma_diff; in via_hook_segment()
446 diff &= (dev_priv->dma_high - 1); in via_hook_segment()
447 if (diff != 0 && diff < (dev_priv->dma_high >> 1)) { in via_hook_segment()
451 } else if (diff == 0) { in via_hook_segment()
/drivers/media/common/tuners/
Dmt2060.c105 int dia,diamin,diff; in mt2060_spurcalc() local
109 diff = I*(int)lo1-J*(int)lo2; in mt2060_spurcalc()
110 if (diff < 0) diff=-diff; in mt2060_spurcalc()
111 dia = (diff-(int)if2); in mt2060_spurcalc()
/drivers/virtio/
Dvirtio_balloon.c293 s64 diff; in balloon() local
297 (diff = towards_target(vb)) != 0 in balloon()
303 if (diff > 0) in balloon()
304 fill_balloon(vb, diff); in balloon()
305 else if (diff < 0) in balloon()
306 leak_balloon(vb, -diff); in balloon()
/drivers/platform/x86/
Dmsi-wmi.c169 ktime_t diff; in msi_wmi_notify() local
171 diff = ktime_sub(cur, last_pressed[key->code - in msi_wmi_notify()
175 if (ktime_to_us(diff) < 1000 * 50) { in msi_wmi_notify()
178 key->code, ktime_to_us(diff)); in msi_wmi_notify()
/drivers/cpufreq/
Dcpufreq-nforce2.c173 int diff; in nforce2_set_fsb() local
202 diff = tfsb - fsb; in nforce2_set_fsb()
204 if (!diff) in nforce2_set_fsb()
208 if (diff < 0) in nforce2_set_fsb()
/drivers/gpu/drm/
Ddrm_modes.c925 int diff; in drm_mode_compare() local
927 diff = ((b->type & DRM_MODE_TYPE_PREFERRED) != 0) - in drm_mode_compare()
929 if (diff) in drm_mode_compare()
930 return diff; in drm_mode_compare()
931 diff = b->hdisplay * b->vdisplay - a->hdisplay * a->vdisplay; in drm_mode_compare()
932 if (diff) in drm_mode_compare()
933 return diff; in drm_mode_compare()
934 diff = b->clock - a->clock; in drm_mode_compare()
935 return diff; in drm_mode_compare()
/drivers/net/wireless/ath/ath9k/
Deeprom_def.c763 int16_t *diff) in ath9k_change_gain_boundary_setting() argument
778 *diff = (u16)(pwr_table_offset - AR5416_PWR_TABLE_OFFSET_DB); in ath9k_change_gain_boundary_setting()
780 *diff *= 2; in ath9k_change_gain_boundary_setting()
785 gb[k] = (u16)(gb[k] - *diff); in ath9k_change_gain_boundary_setting()
796 return *diff; in ath9k_change_gain_boundary_setting()
801 int16_t diff, in ath9k_adjust_pdadc_values() argument
804 #define NUM_PDADC(diff) (AR5416_NUM_PDADC_VALUES - diff) in ath9k_adjust_pdadc_values() argument
815 for (k = 0; k < (u16)NUM_PDADC(diff); k++ ) { in ath9k_adjust_pdadc_values()
816 pdadcValues[k] = pdadcValues[k + diff]; in ath9k_adjust_pdadc_values()
820 for (k = (u16)NUM_PDADC(diff); k < NUM_PDADC(0); k++) { in ath9k_adjust_pdadc_values()
[all …]
/drivers/ptp/
Dptp_ixp46x.c139 u32 diff, addend; in ptp_ixp_adjfreq() local
151 diff = div_u64(adj, 1000000000ULL); in ptp_ixp_adjfreq()
153 addend = neg_adj ? addend - diff : addend + diff; in ptp_ixp_adjfreq()
/drivers/macintosh/
Dvia-pmu-backlight.c48 int diff = abs(bl_curve[i] - value); in pmu_backlight_curve_lookup() local
49 if (diff < max) { in pmu_backlight_curve_lookup()
50 max = diff; in pmu_backlight_curve_lookup()
/drivers/infiniband/hw/ipath/
Dipath_rc.c744 int diff; in reset_psn() local
751 diff = ipath_cmp24(psn, wqe->psn); in reset_psn()
752 if (diff < 0) in reset_psn()
759 if (diff == 0) { in reset_psn()
866 int diff; in do_rc_ack() local
894 while ((diff = ipath_cmp24(ack_psn, wqe->lpsn)) >= 0) { in do_rc_ack()
903 diff == 0) { in do_rc_ack()
917 (opcode != OP(RDMA_READ_RESPONSE_LAST) || diff != 0)) || in do_rc_ack()
920 (opcode != OP(ATOMIC_ACKNOWLEDGE) || diff != 0))) { in do_rc_ack()
1128 int diff; in ipath_rc_rcv_resp() local
[all …]

1234