| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
| H A D | shadow.c | 186 }, *mthd, *best = NULL; in nvbios_shadow() local 199 best = mthd; in nvbios_shadow() 206 if (!best && (best = mthd)) { in nvbios_shadow() 212 if (!best->score) { in nvbios_shadow() 220 if (!best || !best->score) { in nvbios_shadow() 221 for (mthd = mthds, best = mthd; mthd->func; mthd++) { in nvbios_shadow() 222 if (!mthd->skip || best->score < mthd->skip) { in nvbios_shadow() 224 if (mthd->score > best->score) in nvbios_shadow() 225 best = mthd; in nvbios_shadow() 233 if (mthd != best) in nvbios_shadow() [all …]
|
| /linux/drivers/clk/renesas/ |
| H A D | rzv2h-cpg-lib.c | 40 struct rzv2h_pll_pars p, best; in rzv2h_cpg_get_pll_pars() local 47 best.error_millihz = S64_MAX; in rzv2h_cpg_get_pll_pars() 153 if (abs(best.error_millihz) > abs(p.error_millihz)) in rzv2h_cpg_get_pll_pars() 154 best = p; in rzv2h_cpg_get_pll_pars() 160 if (best.error_millihz == S64_MAX) in rzv2h_cpg_get_pll_pars() 163 *pars = best; in rzv2h_cpg_get_pll_pars() 190 struct rzv2h_pll_div_pars p, best; in rzv2h_cpg_get_pll_divs_pars() local 192 best.div.error_millihz = S64_MAX; in rzv2h_cpg_get_pll_divs_pars() 207 if (abs(best.div.error_millihz) > abs(p.div.error_millihz)) in rzv2h_cpg_get_pll_divs_pars() 208 best = p; in rzv2h_cpg_get_pll_divs_pars() [all …]
|
| /linux/sound/pci/emu10k1/ |
| H A D | emu10k1_callback.c | 27 struct best_voice *best, int active_only); 84 struct best_voice best[V_END]; in snd_emu10k1_synth_get_voice() local 89 lookup_voices(emu, hw, best, 1); /* no OFF voices */ in snd_emu10k1_synth_get_voice() 91 if (best[i].voice >= 0) { in snd_emu10k1_synth_get_voice() 93 vp = &emu->voices[best[i].voice]; in snd_emu10k1_synth_get_voice() 211 struct best_voice *best, int active_only) in lookup_voices() argument 218 best[i].time = (unsigned int)-1; /* XXX MAX_?INT really */ in lookup_voices() 219 best[i].voice = -1; in lookup_voices() 235 bp = best + V_FREE; in lookup_voices() 237 bp = best + V_OFF; in lookup_voices() [all …]
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_vma_manager.c | 145 struct drm_mm_node *node, *best; in drm_vma_offset_lookup_locked() local 150 best = NULL; in drm_vma_offset_lookup_locked() 157 best = node; in drm_vma_offset_lookup_locked() 166 if (best) { in drm_vma_offset_lookup_locked() 167 offset = best->start + best->size; in drm_vma_offset_lookup_locked() 169 best = NULL; in drm_vma_offset_lookup_locked() 172 if (!best) in drm_vma_offset_lookup_locked() 175 return container_of(best, struct drm_vma_offset_node, vm_node); in drm_vma_offset_lookup_locked()
|
| /linux/fs/jffs2/ |
| H A D | compr.c | 35 struct jffs2_compressor *best, uint32_t size, uint32_t bestsize) in jffs2_is_best_compression() argument 45 if ((best->compr != JFFS2_COMPR_LZO) && (bestsize > size)) in jffs2_is_best_compression() 154 struct jffs2_compressor *this, *best=NULL; in jffs2_compress() local 210 if (((!best_dlen) || jffs2_is_best_compression(this, best, *cdatalen, best_dlen)) in jffs2_compress() 214 best = this; in jffs2_compress() 221 output_buf = best->compr_buf; in jffs2_compress() 222 best->compr_buf = NULL; in jffs2_compress() 223 best->compr_buf_size = 0; in jffs2_compress() 224 best->stat_compr_blocks++; in jffs2_compress() 225 best->stat_compr_orig_size += best_slen; in jffs2_compress() [all …]
|
| /linux/drivers/md/ |
| H A D | dm-ps-queue-length.c | 194 struct path_info *pi = NULL, *best = NULL; in ql_select_path() local 203 if (!best || in ql_select_path() 204 (atomic_read(&pi->qlen) < atomic_read(&best->qlen))) in ql_select_path() 205 best = pi; in ql_select_path() 207 if (!atomic_read(&best->qlen)) in ql_select_path() 211 if (!best) in ql_select_path() 215 list_move_tail(&best->list, &s->valid_paths); in ql_select_path() 217 ret = best->path; in ql_select_path()
|
| H A D | dm-ps-service-time.c | 280 struct path_info *pi = NULL, *best = NULL; in st_select_path() local 289 if (!best || (st_compare_load(pi, best, nr_bytes) < 0)) in st_select_path() 290 best = pi; in st_select_path() 292 if (!best) in st_select_path() 296 list_move_tail(&best->list, &s->valid_paths); in st_select_path() 298 ret = best->path; in st_select_path()
|
| H A D | dm-ps-historical-service-time.c | 434 struct path_info *pi = NULL, *best = NULL; in hst_select_path() local 444 if (!best || (hst_compare(pi, best, time_now, ps) < 0)) in hst_select_path() 445 best = pi; in hst_select_path() 448 if (!best) in hst_select_path() 452 list_move_tail(&best->list, &s->valid_paths); in hst_select_path() 454 ret = best->path; in hst_select_path()
|
| /linux/drivers/net/bonding/ |
| H A D | bond_3ad.c | 1736 static struct aggregator *ad_agg_selection_test(struct aggregator *best, in ad_agg_selection_test() argument 1766 if (!best) in ad_agg_selection_test() 1769 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test() 1772 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test() 1773 return best; in ad_agg_selection_test() 1775 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test() 1778 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test() 1779 return best; in ad_agg_selection_test() 1783 if (__agg_ports_priority(curr) > __agg_ports_priority(best)) in ad_agg_selection_test() 1786 if (__agg_ports_priority(curr) < __agg_ports_priority(best)) in ad_agg_selection_test() [all …]
|
| /linux/sound/isa/sb/ |
| H A D | emu8000_callback.c | 156 struct best { in get_voice() struct 159 } best[END]; in get_voice() local 160 struct best *bp; in get_voice() 165 best[i].time = (unsigned int)(-1); /* XXX MAX_?INT really */ in get_voice() 166 best[i].voice = -1; in get_voice() 179 bp = best + OFF; in get_voice() 182 bp = best + RELEASED; in get_voice() 185 bp = best + OFF; in get_voice() 188 bp = best + PLAYING; in get_voice() 197 bp = best + OFF; in get_voice() [all …]
|
| /linux/net/dccp/ |
| H A D | qpolicy.c | |
| /linux/arch/sh/kernel/ |
| H A D | unwinder.c | 68 struct unwinder *best; in select_unwinder() local 73 best = list_entry(unwinder_list.next, struct unwinder, list); in select_unwinder() 74 if (best == curr_unwinder) in select_unwinder() 77 return best; in select_unwinder()
|
| /linux/drivers/clk/sophgo/ |
| H A D | clk-sg2042-pll.c | 252 static int sg2042_get_pll_ctl_setting(struct sg2042_pll_ctrl *best, in sg2042_get_pll_ctl_setting() argument 272 memset(best, 0, sizeof(struct sg2042_pll_ctrl)); in sg2042_get_pll_ctl_setting() 305 if (abs_diff(foutpostdiv, req_rate) < abs_diff(best->freq, req_rate)) { in sg2042_get_pll_ctl_setting() 306 best->freq = foutpostdiv; in sg2042_get_pll_ctl_setting() 307 best->refdiv = refdiv; in sg2042_get_pll_ctl_setting() 308 best->fbdiv = fbdiv; in sg2042_get_pll_ctl_setting() 309 best->postdiv1 = postdiv1; in sg2042_get_pll_ctl_setting() 310 best->postdiv2 = postdiv2; in sg2042_get_pll_ctl_setting() 318 if (best->freq == 0) in sg2042_get_pll_ctl_setting()
|
| /linux/drivers/clk/rockchip/ |
| H A D | clk-half-divider.c | 14 unsigned long best, unsigned long flags) in _is_best_half_div() argument 17 return abs(rate - now) < abs(rate - best); in _is_best_half_div() 19 return now <= rate && now > best; in _is_best_half_div() 40 unsigned long parent_rate, best = 0, now, maxdiv; in clk_half_divider_bestdiv() local 80 if (_is_best_half_div(rate, now, best, flags)) { in clk_half_divider_bestdiv() 82 best = now; in clk_half_divider_bestdiv()
|
| /linux/drivers/crypto/intel/qat/qat_common/ |
| H A D | qat_crypto.c | 55 unsigned long best = ~0; in qat_crypto_get_instance_node() local 65 if (best > ctr) { in qat_crypto_get_instance_node() 67 best = ctr; in qat_crypto_get_instance_node() 87 best = ~0; in qat_crypto_get_instance_node() 92 if (best > ctr) { in qat_crypto_get_instance_node() 94 best = ctr; in qat_crypto_get_instance_node()
|
| /linux/sound/soc/codecs/ |
| H A D | wm8731.c | 72 int val, i, best; in wm8731_set_deemph() 78 best = 1; in wm8731_set_deemph() 81 abs(wm8731_deemph[best] - wm8731->playback_fs)) in wm8731_set_deemph() 82 best = i; in wm8731_set_deemph() 85 val = best << 1; in wm8731_set_deemph() 87 best = 0; in wm8731_set_deemph() 92 best, wm8731_deemph[best]); in wm8731_set_deemph() 71 int val, i, best; wm8731_set_deemph() local
|
| H A D | ak4641.c | |
| /linux/scripts/ |
| H A D | kallsyms.c | 287 /* uncompress a compressed symbol. When this function is called, the best table 549 int i, best, bestprofit; in find_best_token() 552 best = 0; in find_best_token() 556 best = i; in find_best_token() 560 return best; in optimize_result() 563 /* this is the core of the algorithm: calculate the "best" table */ in optimize_result() 566 int i, best; in optimize_result() 576 /* find the token with the best profit value */ in optimize_result() 577 best = find_best_token(); in optimize_result() 578 if (token_profit[best] in optimize_result() 545 int i, best, bestprofit; find_best_token() local 562 int i, best; optimize_result() local [all...] |
| /linux/drivers/clk/versatile/ |
| H A D | icst.c | 51 unsigned int i = 0, rd, best = (unsigned int)-1; in icst_hz_to_vco() local 90 if ((unsigned)f_diff < best) { in icst_hz_to_vco() 95 best = f_diff; in icst_hz_to_vco()
|
| /linux/drivers/acpi/numa/ |
| H A D | hmat.c | 683 static bool hmat_update_best(u8 type, u32 value, u32 *best) in hmat_update_best() argument 694 if (!*best || *best > value) { in hmat_update_best() 695 *best = value; in hmat_update_best() 702 if (!*best || *best < value) { in hmat_update_best() 703 *best = value; in hmat_update_best() 743 u32 best = 0; in hmat_update_target_attrs() local 785 best = 0; in hmat_update_target_attrs() 799 if (hmat_update_best(loc->hmat_loc->data_type, value, &best)) in hmat_update_target_attrs() 801 if (value != best) in hmat_update_target_attrs() 804 if (best) in hmat_update_target_attrs() [all …]
|
| /linux/drivers/clk/ |
| H A D | clk-multiplier.c | 57 unsigned long best, unsigned long flags) in __is_best_rate() argument 60 return abs(rate - new) < abs(rate - best); in __is_best_rate() 62 return new >= rate && new < best; in __is_best_rate()
|
| /linux/drivers/mtd/ |
| H A D | ftl.c | 568 uint32_t best; in reclaim_block() local 574 best = 0xffffffff; xfer = 0xffff; in reclaim_block() 597 if (part->XferInfo[i].EraseCount <= best) { in reclaim_block() 598 best = part->XferInfo[i].EraseCount; in reclaim_block() 628 best = 0xffffffff; in reclaim_block() 630 if (part->EUNInfo[i].EraseCount <= best) { in reclaim_block() 631 best = part->EUNInfo[i].EraseCount; in reclaim_block() 635 best = 0; in reclaim_block() 637 if (part->EUNInfo[i].Deleted >= best) { in reclaim_block() 638 best = part->EUNInfo[i].Deleted; in reclaim_block() [all …]
|
| /linux/drivers/video/fbdev/via/ |
| H A D | viamode.c | 343 const struct fb_videomode *best = NULL; in get_best_mode() local 350 if (!best || abs(modes[i].refresh - refresh) < in get_best_mode() 351 abs(best->refresh - refresh)) in get_best_mode() 352 best = &modes[i]; in get_best_mode() 355 return best; in get_best_mode()
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/volt/ |
| H A D | base.c | 54 int i, ret = -EINVAL, best_err = volt->max_uv, best = -1; in nvkm_volt_set() local 65 best = i; in nvkm_volt_set() 70 if (best == -1) { in nvkm_volt_set() 75 ret = volt->func->vid_set(volt, volt->vid[best].vid); in nvkm_volt_set() 77 volt->vid[best].uv, ret); in nvkm_volt_set()
|
| /linux/drivers/clk/qcom/ |
| H A D | clk-regmap-mux-div.c | 82 static inline bool is_better_rate(unsigned long req, unsigned long best, in is_better_rate() argument 85 return (req <= new && new < best) || (best < req && best < new); in is_better_rate()
|