Home
last modified time | relevance | path

Searched refs:best (Results 1 – 25 of 46) sorted by relevance

12

/drivers/usb/core/
Dgeneric.c48 struct usb_host_config *c, *best; in usb_choose_configuration() local
53 best = NULL; in usb_choose_configuration()
118 best = c; in usb_choose_configuration()
130 best = c; in usb_choose_configuration()
136 else if (!best) in usb_choose_configuration()
137 best = c; in usb_choose_configuration()
145 if (best) { in usb_choose_configuration()
146 i = best->desc.bConfigurationValue; in usb_choose_configuration()
/drivers/video/
Dmodedb.c594 u32 best, diff, tdiff; in fb_find_mode() local
709 best = -1; in fb_find_mode()
719 best = i; in fb_find_mode()
723 if (best != -1) { in fb_find_mode()
724 fb_try_mode(var, info, &db[best], bpp); in fb_find_mode()
729 best = -1; in fb_find_mode()
746 best = i; in fb_find_mode()
750 if (best != -1) { in fb_find_mode()
751 fb_try_mode(var, info, &db[best], bpp); in fb_find_mode()
884 struct fb_videomode *mode, *best = NULL; in fb_find_best_mode() local
[all …]
Dtmiofb.c561 struct fb_videomode *best = NULL; in tmiofb_find_mode() local
568 && (!best || (mode->xres < best->xres in tmiofb_find_mode()
569 && mode->yres < best->yres))) in tmiofb_find_mode()
570 best = mode; in tmiofb_find_mode()
573 return best; in tmiofb_find_mode()
/drivers/gpu/drm/omapdrm/
Dtcm-sita.c62 struct score *best);
280 struct score best = {{0}, {0}, {0}, 0}; in scan_r2l_t2b() local
312 CR_R2L_T2B, &best)) in scan_r2l_t2b()
329 if (!best.a.tcm) in scan_r2l_t2b()
332 assign(area, best.a.p0.x, best.a.p0.y, best.a.p1.x, best.a.p1.y); in scan_r2l_t2b()
354 struct score best = {{0}, {0}, {0}, 0}; in scan_l2r_t2b() local
388 CR_L2R_T2B, &best)) in scan_l2r_t2b()
405 if (!best.a.tcm) in scan_l2r_t2b()
408 assign(area, best.a.p0.x, best.a.p0.y, best.a.p1.x, best.a.p1.y); in scan_l2r_t2b()
604 struct score *best) in update_candidate() argument
[all …]
/drivers/net/bonding/
Dbond_3ad.c1405 static struct aggregator *ad_agg_selection_test(struct aggregator *best, in ad_agg_selection_test() argument
1433 if (!best) in ad_agg_selection_test()
1436 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test()
1439 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test()
1440 return best; in ad_agg_selection_test()
1442 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test()
1445 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test()
1446 return best; in ad_agg_selection_test()
1450 if (curr->num_of_ports > best->num_of_ports) in ad_agg_selection_test()
1453 if (curr->num_of_ports < best->num_of_ports) in ad_agg_selection_test()
[all …]
/drivers/md/
Ddm-queue-length.c175 struct path_info *pi = NULL, *best = NULL; in ql_select_path() local
184 if (!best || in ql_select_path()
185 (atomic_read(&pi->qlen) < atomic_read(&best->qlen))) in ql_select_path()
186 best = pi; in ql_select_path()
188 if (!atomic_read(&best->qlen)) in ql_select_path()
192 if (!best) in ql_select_path()
195 *repeat_count = best->repeat_count; in ql_select_path()
197 return best->path; in ql_select_path()
Ddm-service-time.c262 struct path_info *pi = NULL, *best = NULL; in st_select_path() local
271 if (!best || (st_compare_load(pi, best, nr_bytes) < 0)) in st_select_path()
272 best = pi; in st_select_path()
274 if (!best) in st_select_path()
277 *repeat_count = best->repeat_count; in st_select_path()
279 return best->path; in st_select_path()
/drivers/staging/comedi/drivers/
Ddt9812.c810 struct slot_dt9812 *best = NULL; in dt9812_probe() local
815 if (!best && dt9812[i].serial == dev->serial) in dt9812_probe()
816 best = &dt9812[i]; in dt9812_probe()
819 if (!best) in dt9812_probe()
820 best = first; in dt9812_probe()
822 if (best) { in dt9812_probe()
823 down(&best->mutex); in dt9812_probe()
824 best->usb = dev; in dt9812_probe()
825 dev->slot = best; in dt9812_probe()
826 up(&best->mutex); in dt9812_probe()
[all …]
/drivers/md/bcache/
Djournal.c347 struct btree *b, *best = NULL; in btree_flush_write() local
360 if (!best) in btree_flush_write()
361 best = b; in btree_flush_write()
363 btree_current_write(best), in btree_flush_write()
365 rw_unlock(true, best); in btree_flush_write()
366 best = b; in btree_flush_write()
371 if (best) in btree_flush_write()
377 best = b; in btree_flush_write()
378 rw_lock(true, best, best->level); in btree_flush_write()
383 if (!best) in btree_flush_write()
[all …]
/drivers/gpu/drm/nouveau/core/subdev/bios/
Dbase.c310 struct methods *mthd, *best; in nouveau_bios_shadow() local
366 best = mthd; in nouveau_bios_shadow()
368 if (mthd->score > best->score) { in nouveau_bios_shadow()
369 kfree(best->data); in nouveau_bios_shadow()
370 best = mthd; in nouveau_bios_shadow()
374 if (best->score) { in nouveau_bios_shadow()
375 nv_info(bios, "using image from %s\n", best->desc); in nouveau_bios_shadow()
376 bios->size = best->size; in nouveau_bios_shadow()
377 bios->data = best->data; in nouveau_bios_shadow()
/drivers/leds/
Dleds-tca6507.c397 int best = -1;/* full-on */ in led_prepare() local
409 best = i; in led_prepare()
415 best = i; in led_prepare()
418 if (best == -1) { in led_prepare()
425 if (!tca->bank[best].level_use) in led_prepare()
426 set_level(tca, best, level); in led_prepare()
428 tca->bank[best].level_use++; in led_prepare()
429 led->bank = best; in led_prepare()
430 set_select(tca, led->num, bank_source[best]); in led_prepare()
431 led->led_cdev.brightness = TO_BRIGHT(tca->bank[best].level); in led_prepare()
/drivers/media/platform/
Dsh_vou.c532 unsigned int best_err = UINT_MAX, best = 0, img_height_max; in vou_adjust_input() local
558 best = found; in vou_adjust_input()
564 geo->in_width = best; in vou_adjust_input()
583 best = found; in vou_adjust_input()
589 geo->in_height = best; in vou_adjust_input()
599 unsigned int best_err = UINT_MAX, best = geo->in_width, in vou_adjust_output() local
627 best = found; in vou_adjust_output()
633 geo->output.width = best; in vou_adjust_output()
635 if (geo->output.left + best > width_max) in vou_adjust_output()
636 geo->output.left = width_max - best; in vou_adjust_output()
[all …]
/drivers/video/via/
Dviamode.c357 const struct fb_videomode *best = NULL; in get_best_mode() local
364 if (!best || abs(modes[i].refresh - refresh) < in get_best_mode()
365 abs(best->refresh - refresh)) in get_best_mode()
366 best = &modes[i]; in get_best_mode()
369 return best; in get_best_mode()
Dhw.c1391 struct via_pll_config cur, up, down, best = {0, 1, 0}; in get_pll_config() local
1414 if (f < abs(get_pll_output_frequency(f0, best) - clk)) in get_pll_config()
1415 best = cur; in get_pll_config()
1418 return best; in get_pll_config()
2015 const struct fb_videomode *best; in viafb_get_refresh() local
2017 best = viafb_get_best_mode(hres, vres, long_refresh); in viafb_get_refresh()
2018 if (!best) in viafb_get_refresh()
2021 if (abs(best->refresh - long_refresh) > 3) { in viafb_get_refresh()
2028 return best->refresh; in viafb_get_refresh()
/drivers/mtd/
Dftl.c611 uint32_t best; in reclaim_block() local
617 best = 0xffffffff; xfer = 0xffff; in reclaim_block()
640 if (part->XferInfo[i].EraseCount <= best) { in reclaim_block()
641 best = part->XferInfo[i].EraseCount; in reclaim_block()
671 best = 0xffffffff; in reclaim_block()
673 if (part->EUNInfo[i].EraseCount <= best) { in reclaim_block()
674 best = part->EUNInfo[i].EraseCount; in reclaim_block()
678 best = 0; in reclaim_block()
680 if (part->EUNInfo[i].Deleted >= best) { in reclaim_block()
681 best = part->EUNInfo[i].Deleted; in reclaim_block()
[all …]
/drivers/sh/clk/
Dcore.c568 struct cpufreq_frequency_table *freq, *best = NULL; in clk_round_parent() local
589 best = freq; in clk_round_parent()
609 best = freq; in clk_round_parent()
629 best = freq; in clk_round_parent()
636 best = freq; in clk_round_parent()
643 *best_freq, best->frequency); in clk_round_parent()
650 *parent_freq = best->frequency; in clk_round_parent()
/drivers/gpu/drm/
Ddrm_mm.c424 struct drm_mm_node *best; in drm_mm_search_free_generic() local
431 best = NULL; in drm_mm_search_free_generic()
448 best = entry; in drm_mm_search_free_generic()
453 return best; in drm_mm_search_free_generic()
466 struct drm_mm_node *best; in drm_mm_search_free_in_range_generic() local
473 best = NULL; in drm_mm_search_free_in_range_generic()
495 best = entry; in drm_mm_search_free_in_range_generic()
500 return best; in drm_mm_search_free_in_range_generic()
/drivers/base/
Dmap.c100 unsigned long best = ~0UL; in kobj_lookup() local
111 if (p->range - 1 >= best) in kobj_lookup()
118 best = p->range - 1; in kobj_lookup()
/drivers/block/paride/
Dparide.c274 int best, range; in pi_probe_mode() local
287 best = -1; in pi_probe_mode()
296 best = pi->mode; in pi_probe_mode()
298 pi->mode = best; in pi_probe_mode()
299 return (best > -1); in pi_probe_mode()
/drivers/clk/
Dclk-wm831x.c148 int best = 0; in wm831x_fll_round_rate() local
153 abs(wm831x_fll_auto_rates[best] - rate)) in wm831x_fll_round_rate()
154 best = i; in wm831x_fll_round_rate()
156 return wm831x_fll_auto_rates[best]; in wm831x_fll_round_rate()
Dclk-divider.c152 unsigned long parent_rate, best = 0, now, maxdiv; in clk_divider_bestdiv() local
179 if (now <= rate && now > best) { in clk_divider_bestdiv()
181 best = now; in clk_divider_bestdiv()
/drivers/gpu/drm/radeon/
Dradeon_sa.c251 unsigned i, soffset, best, tmp; in radeon_sa_bo_next_hole() local
262 best = sa_manager->size * 2; in radeon_sa_bo_next_hole()
292 if (tmp < best) { in radeon_sa_bo_next_hole()
294 best = tmp; in radeon_sa_bo_next_hole()
/drivers/net/wan/
Dixp4xx_hss.c1189 u32 *best, u32 *best_diff, u32 *reg) in check_clock() argument
1200 *best = new_rate; in check_clock()
1207 static void find_best_clock(u32 rate, u32 *best, u32 *reg) in find_best_clock() argument
1214 check_clock(rate, 0x3FF, 1, 1, best, &diff, reg); in find_best_clock()
1223 check_clock(rate, a - 1, 1, 1, best, &diff, reg); in find_best_clock()
1233 !check_clock(rate, a - 1, 1, 1, best, &diff, reg)) in find_best_clock()
1235 check_clock(rate, a, b, 0xFFF, best, &diff, reg); in find_best_clock()
1238 if (!check_clock(rate, a, b, c, best, &diff, reg)) in find_best_clock()
1240 if (!check_clock(rate, a, b, c + 1, best, &diff, reg)) in find_best_clock()
/drivers/scsi/fcoe/
Dfcoe_ctlr.c1550 struct fcoe_fcf *best = fip->sel_fcf; in fcoe_ctlr_select() local
1568 if (!best || fcf->pri < best->pri || best->flogi_sent) in fcoe_ctlr_select()
1569 best = fcf; in fcoe_ctlr_select()
1570 if (fcf->fabric_name != best->fabric_name || in fcoe_ctlr_select()
1571 fcf->vfid != best->vfid || in fcoe_ctlr_select()
1572 fcf->fc_map != best->fc_map) { in fcoe_ctlr_select()
1578 fip->sel_fcf = best; in fcoe_ctlr_select()
1579 if (best) { in fcoe_ctlr_select()
1580 LIBFCOE_FIP_DBG(fip, "using FCF mac %pM\n", best->fcf_mac); in fcoe_ctlr_select()
1583 fip->ctlr_ka_time = jiffies + best->fka_period; in fcoe_ctlr_select()
[all …]
/drivers/mmc/host/
Dsdhci-s3c.c185 unsigned int best = UINT_MAX; in sdhci_s3c_set_clock() local
197 if (delta < best) { in sdhci_s3c_set_clock()
198 best = delta; in sdhci_s3c_set_clock()
205 best_src, clock, best); in sdhci_s3c_set_clock()

12