Home
last modified time | relevance | path

Searched refs:opt (Results 1 – 25 of 829) sorted by relevance

12345678910>>...34

/linux-6.12.1/drivers/iio/light/
Dopt3001.c151 static int opt3001_find_scale(const struct opt3001 *opt, int val, in opt3001_find_scale() argument
174 static void opt3001_to_iio_ret(struct opt3001 *opt, u8 exponent, in opt3001_to_iio_ret() argument
184 static void opt3001_set_mode(struct opt3001 *opt, u16 *reg, u16 mode) in opt3001_set_mode() argument
188 opt->mode = mode; in opt3001_set_mode()
228 static int opt3001_get_lux(struct opt3001 *opt, int *val, int *val2) in opt3001_get_lux() argument
237 if (opt->use_irq) { in opt3001_get_lux()
243 ret = i2c_smbus_write_word_swapped(opt->client, in opt3001_get_lux()
247 dev_err(opt->dev, "failed to write register %02x\n", in opt3001_get_lux()
253 opt->ok_to_ignore_lock = true; in opt3001_get_lux()
257 opt->result_ready = false; in opt3001_get_lux()
[all …]
/linux-6.12.1/tools/lib/subcmd/
Dparse-options.c20 static int opterror(const struct option *opt, const char *reason, int flags) in opterror() argument
23 fprintf(stderr, " Error: switch `%c' %s", opt->short_name, reason); in opterror()
25 fprintf(stderr, " Error: option `no-%s' %s", opt->long_name, reason); in opterror()
27 fprintf(stderr, " Error: option `%s' %s", opt->long_name, reason); in opterror()
38 static void optwarning(const struct option *opt, const char *reason, int flags) in optwarning() argument
41 fprintf(stderr, " Warning: switch `%c' %s", opt->short_name, reason); in optwarning()
43 fprintf(stderr, " Warning: option `no-%s' %s", opt->long_name, reason); in optwarning()
45 fprintf(stderr, " Warning: option `%s' %s", opt->long_name, reason); in optwarning()
48 static int get_arg(struct parse_opt_ctx_t *p, const struct option *opt, in get_arg() argument
53 if (p->opt) { in get_arg()
[all …]
/linux-6.12.1/drivers/clk/mvebu/
Dorion.c30 u32 opt = (readl(sar) >> SAR_MV88F5181_TCLK_FREQ) & in mv88f5181_get_tclk_freq() local
32 if (opt == 0) in mv88f5181_get_tclk_freq()
34 else if (opt == 1) in mv88f5181_get_tclk_freq()
36 else if (opt == 2) in mv88f5181_get_tclk_freq()
47 u32 opt = (readl(sar) >> SAR_MV88F5181_CPU_FREQ) & in mv88f5181_get_cpu_freq() local
49 if (opt == 0) in mv88f5181_get_cpu_freq()
51 else if (opt == 1 || opt == 2) in mv88f5181_get_cpu_freq()
53 else if (opt == 3) in mv88f5181_get_cpu_freq()
62 u32 opt = (readl(sar) >> SAR_MV88F5181_CPU_FREQ) & in mv88f5181_get_clk_ratio() local
64 if (opt == 0 || opt == 1) { in mv88f5181_get_clk_ratio()
[all …]
/linux-6.12.1/net/ipv4/
Dip_options.c44 void ip_options_build(struct sk_buff *skb, struct ip_options *opt, in ip_options_build() argument
49 memcpy(&(IPCB(skb)->opt), opt, sizeof(struct ip_options)); in ip_options_build()
50 memcpy(iph + sizeof(struct iphdr), opt->__data, opt->optlen); in ip_options_build()
51 opt = &(IPCB(skb)->opt); in ip_options_build()
53 if (opt->srr) in ip_options_build()
54 memcpy(iph + opt->srr + iph[opt->srr + 1] - 4, &daddr, 4); in ip_options_build()
56 if (opt->rr_needaddr) in ip_options_build()
57 ip_rt_get_source(iph + opt->rr + iph[opt->rr + 2] - 5, skb, rt); in ip_options_build()
58 if (opt->ts_needaddr) in ip_options_build()
59 ip_rt_get_source(iph + opt->ts + iph[opt->ts + 2] - 9, skb, rt); in ip_options_build()
[all …]
Dcipso_ipv4.c1548 unsigned char *opt = *option; in cipso_v4_validate() local
1558 opt_len = opt[1]; in cipso_v4_validate()
1565 doi_def = cipso_v4_doi_search(get_unaligned_be32(&opt[2])); in cipso_v4_validate()
1572 tag = opt + opt_iter; in cipso_v4_validate()
1685 *option = opt + err_offset; in cipso_v4_validate()
1719 struct ip_options *opt = (struct ip_options *)optbuf; in cipso_v4_error() local
1730 memset(opt, 0, sizeof(struct ip_options)); in cipso_v4_error()
1731 opt->optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr); in cipso_v4_error()
1733 res = __ip_options_compile(dev_net(skb->dev), opt, skb, NULL); in cipso_v4_error()
1740 __icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0, opt); in cipso_v4_error()
[all …]
/linux-6.12.1/net/ceph/
Dceph_common.c310 struct ceph_options *opt; in ceph_alloc_options() local
312 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_alloc_options()
313 if (!opt) in ceph_alloc_options()
316 opt->crush_locs = RB_ROOT; in ceph_alloc_options()
317 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr), in ceph_alloc_options()
319 if (!opt->mon_addr) { in ceph_alloc_options()
320 kfree(opt); in ceph_alloc_options()
324 opt->flags = CEPH_OPT_DEFAULT; in ceph_alloc_options()
325 opt->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT; in ceph_alloc_options()
326 opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; in ceph_alloc_options()
[all …]
/linux-6.12.1/tools/testing/selftests/net/
Dcmsg_sender.c75 } opt = { variable
121 opt.silent_send = true; in cs_parse_args()
124 opt.size = atoi(optarg); in cs_parse_args()
127 opt.sock.family = AF_INET; in cs_parse_args()
130 opt.sock.family = AF_INET6; in cs_parse_args()
134 opt.sock.proto = IPPROTO_UDP; in cs_parse_args()
136 opt.sock.proto = IPPROTO_ICMP; in cs_parse_args()
138 opt.sock.type = SOCK_RAW; in cs_parse_args()
145 opt.sockopt.priority = atoi(optarg); in cs_parse_args()
148 opt.mark.ena = true; in cs_parse_args()
[all …]
/linux-6.12.1/drivers/net/ethernet/intel/e1000e/
Dparam.c162 const struct e1000_option *opt, in e1000_validate_option() argument
166 *value = opt->def; in e1000_validate_option()
170 switch (opt->type) { in e1000_validate_option()
175 opt->name); in e1000_validate_option()
179 opt->name); in e1000_validate_option()
184 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in e1000_validate_option()
186 opt->name, *value); in e1000_validate_option()
194 for (i = 0; i < opt->arg.l.nr; i++) { in e1000_validate_option()
195 ent = &opt->arg.l.p[i]; in e1000_validate_option()
210 opt->name, *value, opt->err); in e1000_validate_option()
[all …]
/linux-6.12.1/tools/testing/selftests/bpf/
Dtest_sockmap.c154 void (*tester)(int cg_fd, struct sockmap_options *opt);
417 struct sockmap_options *opt) in msg_loop_sendpage() argument
419 bool drop = opt->drop_expected; in msg_loop_sendpage()
554 struct sockmap_options *opt) in msg_loop() argument
558 bool drop = opt->drop_expected; in msg_loop()
559 bool data = opt->data_test; in msg_loop()
562 if (!tx && opt->check_recved_len) in msg_loop()
583 if (opt->tx_wait_mem && errno == EACCES) { in msg_loop()
646 if (opt->verbose) in msg_loop()
653 if (opt->tx_wait_mem) { in msg_loop()
[all …]
/linux-6.12.1/tools/testing/selftests/bpf/progs/
Dsetget_sockopt.c25 int opt; member
38 { .opt = SO_REUSEADDR, .flip = 1, },
39 { .opt = SO_SNDBUF, .new = 8123, .expected = 8123 * 2, },
40 { .opt = SO_RCVBUF, .new = 8123, .expected = 8123 * 2, },
41 { .opt = SO_KEEPALIVE, .flip = 1, },
42 { .opt = SO_PRIORITY, .new = 0xeb9f, .expected = 0xeb9f, },
43 { .opt = SO_REUSEPORT, .flip = 1, },
44 { .opt = SO_RCVLOWAT, .new = 8123, .expected = 8123, },
45 { .opt = SO_MARK, .new = 0xeb9f, .expected = 0xeb9f, },
46 { .opt = SO_MAX_PACING_RATE, .new = 0xeb9f, .expected = 0xeb9f, },
[all …]
/linux-6.12.1/drivers/net/ethernet/intel/e1000/
De1000_param.c182 const struct e1000_option *opt, in e1000_validate_option() argument
186 *value = opt->def; in e1000_validate_option()
190 switch (opt->type) { in e1000_validate_option()
194 e_dev_info("%s Enabled\n", opt->name); in e1000_validate_option()
197 e_dev_info("%s Disabled\n", opt->name); in e1000_validate_option()
202 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in e1000_validate_option()
203 e_dev_info("%s set to %i\n", opt->name, *value); in e1000_validate_option()
211 for (i = 0; i < opt->arg.l.nr; i++) { in e1000_validate_option()
212 ent = &opt->arg.l.p[i]; in e1000_validate_option()
226 opt->name, *value, opt->err); in e1000_validate_option()
[all …]
/linux-6.12.1/fs/bcachefs/
Dopts.c290 int bch2_opt_validate(const struct bch_option *opt, u64 v, struct printbuf *err) in bch2_opt_validate() argument
292 if (v < opt->min) { in bch2_opt_validate()
295 opt->attr.name, opt->min); in bch2_opt_validate()
299 if (opt->max && v >= opt->max) { in bch2_opt_validate()
302 opt->attr.name, opt->max); in bch2_opt_validate()
306 if ((opt->flags & OPT_SB_FIELD_SECTORS) && (v & 511)) { in bch2_opt_validate()
309 opt->attr.name); in bch2_opt_validate()
313 if ((opt->flags & OPT_MUST_BE_POW_2) && !is_power_of_2(v)) { in bch2_opt_validate()
316 opt->attr.name); in bch2_opt_validate()
320 if (opt->fn.validate) in bch2_opt_validate()
[all …]
/linux-6.12.1/Documentation/usb/
Dgadget_hid.rst143 const char *opt;
148 {.opt = "--left-ctrl", .val = 0x01},
149 {.opt = "--right-ctrl", .val = 0x10},
150 {.opt = "--left-shift", .val = 0x02},
151 {.opt = "--right-shift", .val = 0x20},
152 {.opt = "--left-alt", .val = 0x04},
153 {.opt = "--right-alt", .val = 0x40},
154 {.opt = "--left-meta", .val = 0x08},
155 {.opt = "--right-meta", .val = 0x80},
156 {.opt = NULL}
[all …]
/linux-6.12.1/drivers/net/ethernet/atheros/atl1e/
Datl1e_param.c106 static int atl1e_validate_option(int *value, struct atl1e_option *opt, in atl1e_validate_option() argument
110 *value = opt->def; in atl1e_validate_option()
114 switch (opt->type) { in atl1e_validate_option()
119 "%s Enabled\n", opt->name); in atl1e_validate_option()
123 "%s Disabled\n", opt->name); in atl1e_validate_option()
128 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in atl1e_validate_option()
130 opt->name, *value); in atl1e_validate_option()
138 for (i = 0; i < opt->arg.l.nr; i++) { in atl1e_validate_option()
139 ent = &opt->arg.l.p[i]; in atl1e_validate_option()
154 opt->name, *value, opt->err); in atl1e_validate_option()
[all …]
/linux-6.12.1/drivers/net/ethernet/netronome/nfp/abm/
Dqdisc.c517 struct tc_gred_qopt_offload *opt) in nfp_abm_gred_check_params() argument
523 if (opt->set.grio_on || opt->set.wred_on) { in nfp_abm_gred_check_params()
525 opt->parent, opt->handle); in nfp_abm_gred_check_params()
528 if (opt->set.dp_def != alink->def_band) { in nfp_abm_gred_check_params()
530 alink->def_band, opt->parent, opt->handle); in nfp_abm_gred_check_params()
533 if (opt->set.dp_cnt != abm->num_bands) { in nfp_abm_gred_check_params()
535 abm->num_bands, opt->parent, opt->handle); in nfp_abm_gred_check_params()
540 struct tc_gred_vq_qopt_offload_params *band = &opt->set.tab[i]; in nfp_abm_gred_check_params()
546 opt->parent, opt->handle, i); in nfp_abm_gred_check_params()
551 opt->parent, opt->handle, i); in nfp_abm_gred_check_params()
[all …]
/linux-6.12.1/net/ipv6/
Dexthdrs.c234 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_dest_hao() local
239 if (opt->dsthao) { in ipv6_dest_hao()
243 opt->dsthao = opt->dst1; in ipv6_dest_hao()
244 opt->dst1 = 0; in ipv6_dest_hao()
298 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_destopt_rcv() local
320 opt->lastopt = opt->dst1 = skb_network_header_len(skb); in ipv6_destopt_rcv()
322 dstbuf = opt->dst1; in ipv6_destopt_rcv()
327 opt = IP6CB(skb); in ipv6_destopt_rcv()
329 opt->nhoff = dstbuf; in ipv6_destopt_rcv()
331 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
[all …]
/linux-6.12.1/drivers/net/ethernet/mellanox/mlx5/core/lib/
Dgeneve.c25 void *hdr, *opt; in mlx5_geneve_tlv_option_create() local
34 opt = MLX5_ADDR_OF(create_geneve_tlv_option_in, in, geneve_tlv_opt); in mlx5_geneve_tlv_option_create()
39 MLX5_SET(geneve_tlv_option, opt, option_class, be16_to_cpu(class)); in mlx5_geneve_tlv_option_create()
40 MLX5_SET(geneve_tlv_option, opt, option_type, type); in mlx5_geneve_tlv_option_create()
41 MLX5_SET(geneve_tlv_option, opt, option_data_length, len); in mlx5_geneve_tlv_option_create()
63 int mlx5_geneve_tlv_option_add(struct mlx5_geneve *geneve, struct geneve_opt *opt) in mlx5_geneve_tlv_option_add() argument
73 if (geneve->opt_class == opt->opt_class && in mlx5_geneve_tlv_option_add()
74 geneve->opt_type == opt->type) { in mlx5_geneve_tlv_option_add()
84 be16_to_cpu(opt->opt_class), in mlx5_geneve_tlv_option_add()
85 opt->type, in mlx5_geneve_tlv_option_add()
[all …]
/linux-6.12.1/tools/perf/tests/shell/base_probe/
Dtest_invalid_options.sh29 for opt in '-a' '-d' '-L' '-V'; do
30 ! $CMD_PERF probe $opt 2> $LOGS_DIR/invalid_options_missing_argument$opt.err
33 …s_found.pl "Error: switch .* requires a value" < $LOGS_DIR/invalid_options_missing_argument$opt.err
36 print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "missing argument for $opt"
44 for opt in '-F' '-l'; do
45 $CMD_PERF probe -F > /dev/null 2> $LOGS_DIR/invalid_options_unnecessary_argument$opt.err
48 test ! -s $LOGS_DIR/invalid_options_unnecessary_argument$opt.err
51 print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "unnecessary argument for $opt"
60 for opt in '-a xxx -d xxx' '-a xxx -L foo' '-a xxx -V foo' '-a xxx -l' '-a xxx -F' \
63 ! $CMD_PERF probe $opt > /dev/null 2> $LOGS_DIR/aux.log
[all …]
/linux-6.12.1/drivers/net/ethernet/oki-semi/pch_gbe/
Dpch_gbe_param.c216 const struct pch_gbe_option *opt, in pch_gbe_validate_option() argument
220 *value = opt->def; in pch_gbe_validate_option()
224 switch (opt->type) { in pch_gbe_validate_option()
228 netdev_dbg(adapter->netdev, "%s Enabled\n", opt->name); in pch_gbe_validate_option()
231 netdev_dbg(adapter->netdev, "%s Disabled\n", opt->name); in pch_gbe_validate_option()
236 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in pch_gbe_validate_option()
238 opt->name, *value); in pch_gbe_validate_option()
246 for (i = 0; i < opt->arg.l.nr; i++) { in pch_gbe_validate_option()
247 ent = &opt->arg.l.p[i]; in pch_gbe_validate_option()
262 opt->name, *value, opt->err); in pch_gbe_validate_option()
[all …]
/linux-6.12.1/tools/testing/selftests/powerpc/dexcr/
Dchdexcr.c41 printf(" --%-6s / --no-%-6s : %s\n", aspect->opt, aspect->opt, aspect->desc); in help()
45 static const struct dexcr_aspect *opt_to_aspect(const char *opt) in opt_to_aspect() argument
48 if (aspects[i].prctl != -1 && !strcmp(aspects[i].opt, opt)) in opt_to_aspect()
57 const char *opt = NULL; in apply_option() local
70 opt = &option[strlen(clear_prefix)]; in apply_option()
73 opt = &option[strlen(set_prefix)]; in apply_option()
77 if (!opt || !*opt) in apply_option()
80 aspect = opt_to_aspect(opt); in apply_option()
/linux-6.12.1/fs/isofs/
Dinode.c346 int opt; in isofs_parse_param() local
353 opt = fs_parse(fc, isofs_param_spec, param, &result); in isofs_parse_param()
354 if (opt < 0) in isofs_parse_param()
355 return opt; in isofs_parse_param()
357 switch (opt) { in isofs_parse_param()
582 struct isofs_options *opt = fc->fs_private; in isofs_fill_super() local
612 opt->blocksize = sb_min_blocksize(s, opt->blocksize); in isofs_fill_super()
615 sbi->s_session = opt->session; in isofs_fill_super()
616 sbi->s_sbsector = opt->sbsector; in isofs_fill_super()
618 vol_desc_start = (opt->sbsector != -1) ? in isofs_fill_super()
[all …]
/linux-6.12.1/scripts/
Dexport_report.pl65 my (%SYMBOL, %MODULE, %opt, @allcfiles);
67 if (not getopts('hk:o:f',\%opt) or defined $opt{'h'}) {
71 if (defined $opt{'f'}) {
77 if (not defined $opt{'k'}) {
78 $opt{'k'} = "Module.symvers";
81 open (my $module_symvers, '<', $opt{'k'})
82 or die "Sorry, cannot open $opt{'k'}: $!\n";
84 if (defined $opt{'o'}) {
85 open (my $out, '>', $opt{'o'})
86 or die "Sorry, cannot open $opt{'o'} $!\n";
/linux-6.12.1/net/netfilter/
Dxt_TCPMSS.c34 optlen(const u_int8_t *opt, unsigned int offset) in optlen() argument
37 if (opt[offset] <= TCPOPT_NOP || opt[offset+1] == 0) in optlen()
40 return opt[offset+1]; in optlen()
83 u8 *opt; in tcpmss_mangle_packet() local
116 opt = (u_int8_t *)tcph; in tcpmss_mangle_packet()
117 for (i = sizeof(struct tcphdr); i <= tcp_hdrlen - TCPOLEN_MSS; i += optlen(opt, i)) { in tcpmss_mangle_packet()
118 if (opt[i] == TCPOPT_MSS && opt[i+1] == TCPOLEN_MSS) { in tcpmss_mangle_packet()
121 oldmss = (opt[i+2] << 8) | opt[i+3]; in tcpmss_mangle_packet()
130 opt[i+2] = (newmss & 0xff00) >> 8; in tcpmss_mangle_packet()
131 opt[i+3] = newmss & 0x00ff; in tcpmss_mangle_packet()
[all …]
/linux-6.12.1/tools/power/cpupower/bench/
Dparse.c158 char opt[16], val[32], *line = NULL; in prepare_config() local
178 if (sscanf(line, "%14s = %30s", opt, val) < 2) in prepare_config()
181 dprintf("parsing: %s -> %s\n", opt, val); in prepare_config()
183 if (strcmp("sleep", opt) == 0) in prepare_config()
186 else if (strcmp("load", opt) == 0) in prepare_config()
189 else if (strcmp("load_step", opt) == 0) in prepare_config()
192 else if (strcmp("sleep_step", opt) == 0) in prepare_config()
195 else if (strcmp("cycles", opt) == 0) in prepare_config()
198 else if (strcmp("rounds", opt) == 0) in prepare_config()
201 else if (strcmp("verbose", opt) == 0) in prepare_config()
[all …]
/linux-6.12.1/net/sched/
Dsch_gred.c59 struct tc_gred_qopt_offload *opt; member
315 struct tc_gred_qopt_offload *opt = table->opt; in gred_offload() local
320 memset(opt, 0, sizeof(*opt)); in gred_offload()
321 opt->command = command; in gred_offload()
322 opt->handle = sch->handle; in gred_offload()
323 opt->parent = sch->parent; in gred_offload()
328 opt->set.grio_on = gred_rio_mode(table); in gred_offload()
329 opt->set.wred_on = gred_wred_mode(table); in gred_offload()
330 opt->set.dp_cnt = table->DPs; in gred_offload()
331 opt->set.dp_def = table->def; in gred_offload()
[all …]

12345678910>>...34