/linux-4.1.27/drivers/usb/gadget/function/ |
H A D | u_ether_configfs.h | 25 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \ 27 usb_put_function_instance(&opts->func_inst); \ 37 static ssize_t _f_##_opts_dev_addr_show(struct f_##_f_##_opts *opts, \ 42 mutex_lock(&opts->lock); \ 43 result = gether_get_dev_addr(opts->net, page, PAGE_SIZE); \ 44 mutex_unlock(&opts->lock); \ 49 static ssize_t _f_##_opts_dev_addr_store(struct f_##_f_##_opts *opts, \ 54 mutex_lock(&opts->lock); \ 55 if (opts->refcnt) { \ 56 mutex_unlock(&opts->lock); \ 60 ret = gether_set_dev_addr(opts->net, page); \ 61 mutex_unlock(&opts->lock); \ 73 static ssize_t _f_##_opts_host_addr_show(struct f_##_f_##_opts *opts, \ 78 mutex_lock(&opts->lock); \ 79 result = gether_get_host_addr(opts->net, page, PAGE_SIZE); \ 80 mutex_unlock(&opts->lock); \ 85 static ssize_t _f_##_opts_host_addr_store(struct f_##_f_##_opts *opts, \ 90 mutex_lock(&opts->lock); \ 91 if (opts->refcnt) { \ 92 mutex_unlock(&opts->lock); \ 96 ret = gether_set_host_addr(opts->net, page); \ 97 mutex_unlock(&opts->lock); \ 109 static ssize_t _f_##_opts_qmult_show(struct f_##_f_##_opts *opts, \ 114 mutex_lock(&opts->lock); \ 115 qmult = gether_get_qmult(opts->net); \ 116 mutex_unlock(&opts->lock); \ 120 static ssize_t _f_##_opts_qmult_store(struct f_##_f_##_opts *opts, \ 126 mutex_lock(&opts->lock); \ 127 if (opts->refcnt) { \ 136 gether_set_qmult(opts->net, val); \ 139 mutex_unlock(&opts->lock); \ 149 static ssize_t _f_##_opts_ifname_show(struct f_##_f_##_opts *opts, \ 154 mutex_lock(&opts->lock); \ 155 ret = gether_get_ifname(opts->net, page, PAGE_SIZE); \ 156 mutex_unlock(&opts->lock); \
|
H A D | f_uac1.c | 326 struct f_uac1_opts *opts; f_audio_out_ep_complete() local 330 opts = container_of(audio->card.func.fi, struct f_uac1_opts, f_audio_out_ep_complete() 332 audio_buf_size = opts->audio_buf_size; f_audio_out_ep_complete() 578 struct f_uac1_opts *opts; f_audio_set_alt() local 584 opts = container_of(f->fi, struct f_uac1_opts, func_inst); f_audio_set_alt() 585 req_buf_size = opts->req_buf_size; f_audio_set_alt() 586 req_count = opts->req_count; f_audio_set_alt() 587 audio_buf_size = opts->audio_buf_size; f_audio_set_alt() 781 struct f_uac1_opts *opts = to_f_uac1_opts(item); f_uac1_attr_release() local 783 usb_put_function_instance(&opts->func_inst); f_uac1_attr_release() 793 static ssize_t f_uac1_opts_##name##_show(struct f_uac1_opts *opts, \ 798 mutex_lock(&opts->lock); \ 799 result = sprintf(page, "%u\n", opts->name); \ 800 mutex_unlock(&opts->lock); \ 805 static ssize_t f_uac1_opts_##name##_store(struct f_uac1_opts *opts, \ 811 mutex_lock(&opts->lock); \ 812 if (opts->refcnt) { \ 821 opts->name = num; \ 825 mutex_unlock(&opts->lock); \ 839 static ssize_t f_uac1_opts_##name##_show(struct f_uac1_opts *opts, \ 844 mutex_lock(&opts->lock); \ 845 result = sprintf(page, "%s\n", opts->name); \ 846 mutex_unlock(&opts->lock); \ 851 static ssize_t f_uac1_opts_##name##_store(struct f_uac1_opts *opts, \ 857 mutex_lock(&opts->lock); \ 858 if (opts->refcnt) \ 866 if (opts->name##_alloc) \ 867 kfree(opts->name); \ 868 opts->name##_alloc = true; \ 869 opts->name = tmp; \ 873 mutex_unlock(&opts->lock); \ 904 struct f_uac1_opts *opts; f_audio_free_inst() local 906 opts = container_of(f, struct f_uac1_opts, func_inst); f_audio_free_inst() 907 if (opts->fn_play_alloc) f_audio_free_inst() 908 kfree(opts->fn_play); f_audio_free_inst() 909 if (opts->fn_cap_alloc) f_audio_free_inst() 910 kfree(opts->fn_cap); f_audio_free_inst() 911 if (opts->fn_cntl_alloc) f_audio_free_inst() 912 kfree(opts->fn_cntl); f_audio_free_inst() 913 kfree(opts); f_audio_free_inst() 918 struct f_uac1_opts *opts; f_audio_alloc_inst() local 920 opts = kzalloc(sizeof(*opts), GFP_KERNEL); f_audio_alloc_inst() 921 if (!opts) f_audio_alloc_inst() 924 mutex_init(&opts->lock); f_audio_alloc_inst() 925 opts->func_inst.free_func_inst = f_audio_free_inst; f_audio_alloc_inst() 927 config_group_init_type_name(&opts->func_inst.group, "", f_audio_alloc_inst() 930 opts->req_buf_size = UAC1_OUT_EP_MAX_PACKET_SIZE; f_audio_alloc_inst() 931 opts->req_count = UAC1_REQ_COUNT; f_audio_alloc_inst() 932 opts->audio_buf_size = UAC1_AUDIO_BUF_SIZE; f_audio_alloc_inst() 933 opts->fn_play = FILE_PCM_PLAYBACK; f_audio_alloc_inst() 934 opts->fn_cap = FILE_PCM_CAPTURE; f_audio_alloc_inst() 935 opts->fn_cntl = FILE_CONTROL; f_audio_alloc_inst() 936 return &opts->func_inst; f_audio_alloc_inst() 942 struct f_uac1_opts *opts; f_audio_free() local 945 opts = container_of(f->fi, struct f_uac1_opts, func_inst); f_audio_free() 947 mutex_lock(&opts->lock); f_audio_free() 948 --opts->refcnt; f_audio_free() 949 mutex_unlock(&opts->lock); f_audio_free() 960 struct f_uac1_opts *opts; f_audio_alloc() local 969 opts = container_of(fi, struct f_uac1_opts, func_inst); f_audio_alloc() 970 mutex_lock(&opts->lock); f_audio_alloc() 971 ++opts->refcnt; f_audio_alloc() 972 mutex_unlock(&opts->lock); f_audio_alloc()
|
H A D | f_hid.c | 717 struct f_hid_opts *opts = to_f_hid_opts(item); hid_attr_release() local 719 usb_put_function_instance(&opts->func_inst); hid_attr_release() 729 static ssize_t f_hid_opts_##name##_show(struct f_hid_opts *opts, char *page)\ 733 mutex_lock(&opts->lock); \ 734 result = sprintf(page, "%d\n", opts->name); \ 735 mutex_unlock(&opts->lock); \ 740 static ssize_t f_hid_opts_##name##_store(struct f_hid_opts *opts, \ 746 mutex_lock(&opts->lock); \ 747 if (opts->refcnt) { \ 760 opts->name = num; \ 764 mutex_unlock(&opts->lock); \ 776 static ssize_t f_hid_opts_report_desc_show(struct f_hid_opts *opts, char *page) f_hid_opts_report_desc_show() argument 780 mutex_lock(&opts->lock); f_hid_opts_report_desc_show() 781 result = opts->report_desc_length; f_hid_opts_report_desc_show() 782 memcpy(page, opts->report_desc, opts->report_desc_length); f_hid_opts_report_desc_show() 783 mutex_unlock(&opts->lock); f_hid_opts_report_desc_show() 788 static ssize_t f_hid_opts_report_desc_store(struct f_hid_opts *opts, f_hid_opts_report_desc_store() argument 794 mutex_lock(&opts->lock); f_hid_opts_report_desc_store() 796 if (opts->refcnt) f_hid_opts_report_desc_store() 807 kfree(opts->report_desc); f_hid_opts_report_desc_store() 808 opts->report_desc = d; f_hid_opts_report_desc_store() 809 opts->report_desc_length = len; f_hid_opts_report_desc_store() 810 opts->report_desc_alloc = true; f_hid_opts_report_desc_store() 813 mutex_unlock(&opts->lock); f_hid_opts_report_desc_store() 843 struct f_hid_opts *opts; hidg_free_inst() local 845 opts = container_of(f, struct f_hid_opts, func_inst); hidg_free_inst() 849 hidg_put_minor(opts->minor); hidg_free_inst() 855 if (opts->report_desc_alloc) hidg_free_inst() 856 kfree(opts->report_desc); hidg_free_inst() 858 kfree(opts); hidg_free_inst() 863 struct f_hid_opts *opts; hidg_alloc_inst() local 867 opts = kzalloc(sizeof(*opts), GFP_KERNEL); hidg_alloc_inst() 868 if (!opts) hidg_alloc_inst() 870 mutex_init(&opts->lock); hidg_alloc_inst() 871 opts->func_inst.free_func_inst = hidg_free_inst; hidg_alloc_inst() 872 ret = &opts->func_inst; hidg_alloc_inst() 880 kfree(opts); hidg_alloc_inst() 885 opts->minor = hidg_get_minor(); hidg_alloc_inst() 886 if (opts->minor < 0) { hidg_alloc_inst() 887 ret = ERR_PTR(opts->minor); hidg_alloc_inst() 888 kfree(opts); hidg_alloc_inst() 893 config_group_init_type_name(&opts->func_inst.group, "", &hid_func_type); hidg_alloc_inst() 903 struct f_hid_opts *opts; hidg_free() local 906 opts = container_of(f->fi, struct f_hid_opts, func_inst); hidg_free() 909 mutex_lock(&opts->lock); hidg_free() 910 --opts->refcnt; hidg_free() 911 mutex_unlock(&opts->lock); hidg_free() 932 struct f_hid_opts *opts; hidg_alloc() local 939 opts = container_of(fi, struct f_hid_opts, func_inst); hidg_alloc() 941 mutex_lock(&opts->lock); hidg_alloc() 942 ++opts->refcnt; hidg_alloc() 944 hidg->minor = opts->minor; hidg_alloc() 945 hidg->bInterfaceSubClass = opts->subclass; hidg_alloc() 946 hidg->bInterfaceProtocol = opts->protocol; hidg_alloc() 947 hidg->report_length = opts->report_length; hidg_alloc() 948 hidg->report_desc_length = opts->report_desc_length; hidg_alloc() 949 if (opts->report_desc) { hidg_alloc() 950 hidg->report_desc = kmemdup(opts->report_desc, hidg_alloc() 951 opts->report_desc_length, hidg_alloc() 955 mutex_unlock(&opts->lock); hidg_alloc() 960 mutex_unlock(&opts->lock); hidg_alloc()
|
H A D | f_uvc.c | 602 struct f_uvc_opts *opts; uvc_function_bind() local 607 opts = fi_to_f_uvc_opts(f->fi); uvc_function_bind() 610 opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); uvc_function_bind() 611 opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); uvc_function_bind() 612 opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); uvc_function_bind() 620 if (opts->streaming_maxpacket <= 1024) { uvc_function_bind() 622 max_packet_size = opts->streaming_maxpacket; uvc_function_bind() 623 } else if (opts->streaming_maxpacket <= 2048) { uvc_function_bind() 625 max_packet_size = opts->streaming_maxpacket / 2; uvc_function_bind() 628 max_packet_size = opts->streaming_maxpacket / 3; uvc_function_bind() 632 cpu_to_le16(min(opts->streaming_maxpacket, 1023U)); uvc_function_bind() 633 uvc_fs_streaming_ep.bInterval = opts->streaming_interval; uvc_function_bind() 637 uvc_hs_streaming_ep.bInterval = opts->streaming_interval; uvc_function_bind() 640 uvc_ss_streaming_ep.bInterval = opts->streaming_interval; uvc_function_bind() 642 uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst; uvc_function_bind() 645 opts->streaming_maxburst); uvc_function_bind() 783 struct f_uvc_opts *opts = fi_to_f_uvc_opts(f); uvc_free_inst() local 785 mutex_destroy(&opts->lock); uvc_free_inst() 786 kfree(opts); uvc_free_inst() 791 struct f_uvc_opts *opts; uvc_alloc_inst() local 798 opts = kzalloc(sizeof(*opts), GFP_KERNEL); uvc_alloc_inst() 799 if (!opts) uvc_alloc_inst() 801 opts->func_inst.free_func_inst = uvc_free_inst; uvc_alloc_inst() 802 mutex_init(&opts->lock); uvc_alloc_inst() 804 cd = &opts->uvc_camera_terminal; uvc_alloc_inst() 820 pd = &opts->uvc_processing; uvc_alloc_inst() 832 od = &opts->uvc_output_terminal; uvc_alloc_inst() 842 md = &opts->uvc_color_matching; uvc_alloc_inst() 851 ctl_cls = opts->uvc_fs_control_cls; uvc_alloc_inst() 857 opts->fs_control = uvc_alloc_inst() 861 ctl_cls = opts->uvc_ss_control_cls; uvc_alloc_inst() 867 opts->ss_control = uvc_alloc_inst() 870 opts->streaming_interval = 1; uvc_alloc_inst() 871 opts->streaming_maxpacket = 1024; uvc_alloc_inst() 873 uvcg_attach_configfs(opts); uvc_alloc_inst() 874 return &opts->func_inst; uvc_alloc_inst() 880 struct f_uvc_opts *opts = container_of(f->fi, struct f_uvc_opts, uvc_free() local 882 --opts->refcnt; uvc_free() 907 struct f_uvc_opts *opts; uvc_alloc() local 916 opts = fi_to_f_uvc_opts(fi); uvc_alloc() 918 mutex_lock(&opts->lock); uvc_alloc() 919 if (opts->uvc_fs_streaming_cls) { uvc_alloc() 920 strm_cls = opts->uvc_fs_streaming_cls; uvc_alloc() 921 opts->fs_streaming = uvc_alloc() 924 if (opts->uvc_hs_streaming_cls) { uvc_alloc() 925 strm_cls = opts->uvc_hs_streaming_cls; uvc_alloc() 926 opts->hs_streaming = uvc_alloc() 929 if (opts->uvc_ss_streaming_cls) { uvc_alloc() 930 strm_cls = opts->uvc_ss_streaming_cls; uvc_alloc() 931 opts->ss_streaming = uvc_alloc() 935 uvc->desc.fs_control = opts->fs_control; uvc_alloc() 936 uvc->desc.ss_control = opts->ss_control; uvc_alloc() 937 uvc->desc.fs_streaming = opts->fs_streaming; uvc_alloc() 938 uvc->desc.hs_streaming = opts->hs_streaming; uvc_alloc() 939 uvc->desc.ss_streaming = opts->ss_streaming; uvc_alloc() 940 ++opts->refcnt; uvc_alloc() 941 mutex_unlock(&opts->lock); uvc_alloc()
|
H A D | uvc_configfs.c | 63 struct f_uvc_opts *opts; \ 71 opts = to_f_uvc_opts(opts_item); \ 73 mutex_lock(&opts->lock); \ 75 mutex_unlock(&opts->lock); \ 85 struct f_uvc_opts *opts; \ 94 opts = to_f_uvc_opts(opts_item); \ 96 mutex_lock(&opts->lock); \ 97 if (ch->linked || opts->refcnt) { \ 113 mutex_unlock(&opts->lock); \ 210 struct f_uvc_opts *opts; \ 219 opts = to_f_uvc_opts(opts_item); \ 220 pd = &opts->uvc_processing; \ 222 mutex_lock(&opts->lock); \ 224 mutex_unlock(&opts->lock); \ 248 struct f_uvc_opts *opts; uvcg_default_processing_bm_controls_show() local 258 opts = to_f_uvc_opts(opts_item); uvcg_default_processing_bm_controls_show() 259 pd = &opts->uvc_processing; uvcg_default_processing_bm_controls_show() 261 mutex_lock(&opts->lock); uvcg_default_processing_bm_controls_show() 266 mutex_unlock(&opts->lock); uvcg_default_processing_bm_controls_show() 332 struct f_uvc_opts *opts; \ 342 opts = to_f_uvc_opts(opts_item); \ 343 cd = &opts->uvc_camera_terminal; \ 345 mutex_lock(&opts->lock); \ 347 mutex_unlock(&opts->lock); \ 378 struct f_uvc_opts *opts; uvcg_default_camera_bm_controls_show() local 389 opts = to_f_uvc_opts(opts_item); uvcg_default_camera_bm_controls_show() 390 cd = &opts->uvc_camera_terminal; uvcg_default_camera_bm_controls_show() 392 mutex_lock(&opts->lock); uvcg_default_camera_bm_controls_show() 397 mutex_unlock(&opts->lock); uvcg_default_camera_bm_controls_show() 464 struct f_uvc_opts *opts; \ 474 opts = to_f_uvc_opts(opts_item); \ 475 cd = &opts->uvc_output_terminal; \ 477 mutex_lock(&opts->lock); \ 479 mutex_unlock(&opts->lock); \ 573 struct f_uvc_opts *opts; uvcg_control_class_allow_link() local 586 opts = to_f_uvc_opts(control->ci_parent); uvcg_control_class_allow_link() 588 mutex_lock(&opts->lock); uvcg_control_class_allow_link() 590 class_array = uvcg_get_ctl_class_arr(src, opts); uvcg_control_class_allow_link() 593 if (opts->refcnt || class_array[0]) { uvcg_control_class_allow_link() 604 mutex_unlock(&opts->lock); uvcg_control_class_allow_link() 614 struct f_uvc_opts *opts; uvcg_control_class_drop_link() local 627 opts = to_f_uvc_opts(control->ci_parent); uvcg_control_class_drop_link() 629 mutex_lock(&opts->lock); uvcg_control_class_drop_link() 631 class_array = uvcg_get_ctl_class_arr(src, opts); uvcg_control_class_drop_link() 634 if (opts->refcnt) { uvcg_control_class_drop_link() 645 mutex_unlock(&opts->lock); uvcg_control_class_drop_link() 728 struct f_uvc_opts *opts; uvcg_format_bma_controls_show() local 737 opts = to_f_uvc_opts(opts_item); uvcg_format_bma_controls_show() 739 mutex_lock(&opts->lock); uvcg_format_bma_controls_show() 746 mutex_unlock(&opts->lock); uvcg_format_bma_controls_show() 755 struct f_uvc_opts *opts; uvcg_format_bma_controls_store() local 763 opts = to_f_uvc_opts(opts_item); uvcg_format_bma_controls_store() 765 mutex_lock(&opts->lock); uvcg_format_bma_controls_store() 766 if (ch->linked || opts->refcnt) { uvcg_format_bma_controls_store() 779 mutex_unlock(&opts->lock); uvcg_format_bma_controls_store() 811 struct f_uvc_opts *opts; uvcg_streaming_header_allow_link() local 821 opts = to_f_uvc_opts(opts_item); uvcg_streaming_header_allow_link() 823 mutex_lock(&opts->lock); uvcg_streaming_header_allow_link() 852 mutex_unlock(&opts->lock); uvcg_streaming_header_allow_link() 862 struct f_uvc_opts *opts; uvcg_streaming_header_drop_link() local 872 opts = to_f_uvc_opts(opts_item); uvcg_streaming_header_drop_link() 874 mutex_lock(&opts->lock); uvcg_streaming_header_drop_link() 889 mutex_unlock(&opts->lock); uvcg_streaming_header_drop_link() 906 struct f_uvc_opts *opts; \ 914 opts = to_f_uvc_opts(opts_item); \ 916 mutex_lock(&opts->lock); \ 918 mutex_unlock(&opts->lock); \ 1036 struct f_uvc_opts *opts; \ 1044 opts = to_f_uvc_opts(opts_item); \ 1046 mutex_lock(&opts->lock); \ 1048 mutex_unlock(&opts->lock); \ 1057 struct f_uvc_opts *opts; \ 1071 opts = to_f_uvc_opts(opts_item); \ 1074 mutex_lock(&opts->lock); \ 1075 if (fmt->linked || opts->refcnt) { \ 1083 mutex_unlock(&opts->lock); \ 1114 struct f_uvc_opts *opts; uvcg_frame_dw_frame_interval_show() local 1123 opts = to_f_uvc_opts(opts_item); uvcg_frame_dw_frame_interval_show() 1125 mutex_lock(&opts->lock); uvcg_frame_dw_frame_interval_show() 1131 mutex_unlock(&opts->lock); uvcg_frame_dw_frame_interval_show() 1191 struct f_uvc_opts *opts; uvcg_frame_dw_frame_interval_store() local 1201 opts = to_f_uvc_opts(opts_item); uvcg_frame_dw_frame_interval_store() 1204 mutex_lock(&opts->lock); uvcg_frame_dw_frame_interval_store() 1205 if (fmt->linked || opts->refcnt) { uvcg_frame_dw_frame_interval_store() 1232 mutex_unlock(&opts->lock); uvcg_frame_dw_frame_interval_store() 1266 struct f_uvc_opts *opts; uvcg_frame_make() local 1283 opts = to_f_uvc_opts(opts_item); uvcg_frame_make() 1285 mutex_lock(&opts->lock); uvcg_frame_make() 1294 mutex_unlock(&opts->lock); uvcg_frame_make() 1299 mutex_unlock(&opts->lock); uvcg_frame_make() 1310 struct f_uvc_opts *opts; uvcg_frame_drop() local 1314 opts = to_f_uvc_opts(opts_item); uvcg_frame_drop() 1316 mutex_lock(&opts->lock); uvcg_frame_drop() 1320 mutex_unlock(&opts->lock); uvcg_frame_drop() 1352 struct f_uvc_opts *opts; uvcg_uncompressed_guid_format_show() local 1359 opts = to_f_uvc_opts(opts_item); uvcg_uncompressed_guid_format_show() 1361 mutex_lock(&opts->lock); uvcg_uncompressed_guid_format_show() 1363 mutex_unlock(&opts->lock); uvcg_uncompressed_guid_format_show() 1373 struct f_uvc_opts *opts; uvcg_uncompressed_guid_format_store() local 1381 opts = to_f_uvc_opts(opts_item); uvcg_uncompressed_guid_format_store() 1383 mutex_lock(&opts->lock); uvcg_uncompressed_guid_format_store() 1384 if (ch->fmt.linked || opts->refcnt) { uvcg_uncompressed_guid_format_store() 1394 mutex_unlock(&opts->lock); uvcg_uncompressed_guid_format_store() 1409 struct f_uvc_opts *opts; \ 1417 opts = to_f_uvc_opts(opts_item); \ 1419 mutex_lock(&opts->lock); \ 1421 mutex_unlock(&opts->lock); \ 1435 struct f_uvc_opts *opts; \ 1443 opts = to_f_uvc_opts(opts_item); \ 1445 mutex_lock(&opts->lock); \ 1447 mutex_unlock(&opts->lock); \ 1457 struct f_uvc_opts *opts; \ 1466 opts = to_f_uvc_opts(opts_item); \ 1468 mutex_lock(&opts->lock); \ 1469 if (u->fmt.linked || opts->refcnt) { \ 1485 mutex_unlock(&opts->lock); \ 1624 struct f_uvc_opts *opts; \ 1632 opts = to_f_uvc_opts(opts_item); \ 1634 mutex_lock(&opts->lock); \ 1636 mutex_unlock(&opts->lock); \ 1649 struct f_uvc_opts *opts; \ 1657 opts = to_f_uvc_opts(opts_item); \ 1659 mutex_lock(&opts->lock); \ 1661 mutex_unlock(&opts->lock); \ 1671 struct f_uvc_opts *opts; \ 1680 opts = to_f_uvc_opts(opts_item); \ 1682 mutex_lock(&opts->lock); \ 1683 if (u->fmt.linked || opts->refcnt) { \ 1699 mutex_unlock(&opts->lock); \ 1825 struct f_uvc_opts *opts; \ 1834 opts = to_f_uvc_opts(opts_item); \ 1835 cd = &opts->uvc_color_matching; \ 1837 mutex_lock(&opts->lock); \ 1839 mutex_unlock(&opts->lock); \ 2119 struct f_uvc_opts *opts; uvcg_streaming_class_allow_link() local 2134 opts = to_f_uvc_opts(streaming->ci_parent); uvcg_streaming_class_allow_link() 2136 mutex_lock(&opts->lock); uvcg_streaming_class_allow_link() 2138 class_array = __uvcg_get_stream_class_arr(src, opts); uvcg_streaming_class_allow_link() 2139 if (!class_array || *class_array || opts->refcnt) { uvcg_streaming_class_allow_link() 2176 *cl_arr = (struct uvc_descriptor_header *)&opts->uvc_color_matching; uvcg_streaming_class_allow_link() 2182 mutex_unlock(&opts->lock); uvcg_streaming_class_allow_link() 2192 struct f_uvc_opts *opts; uvcg_streaming_class_drop_link() local 2205 opts = to_f_uvc_opts(streaming->ci_parent); uvcg_streaming_class_drop_link() 2207 mutex_lock(&opts->lock); uvcg_streaming_class_drop_link() 2209 class_array = __uvcg_get_stream_class_arr(src, opts); uvcg_streaming_class_drop_link() 2213 if (opts->refcnt) { uvcg_streaming_class_drop_link() 2226 mutex_unlock(&opts->lock); uvcg_streaming_class_drop_link() 2293 struct f_uvc_opts *opts = to_f_uvc_opts(item); uvc_attr_release() local 2295 usb_put_function_instance(&opts->func_inst); uvc_attr_release() 2306 struct f_uvc_opts *opts, char *page) \ 2310 mutex_lock(&opts->lock); \ 2311 result = sprintf(page, "%d\n", conv(opts->cname)); \ 2312 mutex_unlock(&opts->lock); \ 2318 f_uvc_opts_##cname##_store(struct f_uvc_opts *opts, \ 2324 mutex_lock(&opts->lock); \ 2325 if (opts->refcnt) { \ 2338 opts->cname = vnoc(num); \ 2341 mutex_unlock(&opts->lock); \ 2386 int uvcg_attach_configfs(struct f_uvc_opts *opts) uvcg_attach_configfs() argument 2463 uvcg_init_group(&opts->func_inst.group, uvcg_attach_configfs()
|
H A D | f_serial.c | 275 struct f_serial_opts *opts = to_f_serial_opts(item); f_serial_attr_show() local 281 ret = f_serial_opts_attr->show(opts, page); f_serial_attr_show() 288 struct f_serial_opts *opts = to_f_serial_opts(item); serial_attr_release() local 290 usb_put_function_instance(&opts->func_inst); serial_attr_release() 298 static ssize_t f_serial_port_num_show(struct f_serial_opts *opts, char *page) f_serial_port_num_show() argument 300 return sprintf(page, "%u\n", opts->port_num); f_serial_port_num_show() 319 struct f_serial_opts *opts; gser_free_inst() local 321 opts = container_of(f, struct f_serial_opts, func_inst); gser_free_inst() 322 gserial_free_line(opts->port_num); gser_free_inst() 323 kfree(opts); gser_free_inst() 328 struct f_serial_opts *opts; gser_alloc_inst() local 331 opts = kzalloc(sizeof(*opts), GFP_KERNEL); gser_alloc_inst() 332 if (!opts) gser_alloc_inst() 335 opts->func_inst.free_func_inst = gser_free_inst; gser_alloc_inst() 336 ret = gserial_alloc_line(&opts->port_num); gser_alloc_inst() 338 kfree(opts); gser_alloc_inst() 341 config_group_init_type_name(&opts->func_inst.group, "", gser_alloc_inst() 344 return &opts->func_inst; gser_alloc_inst() 363 struct f_serial_opts *opts; gser_alloc() local 370 opts = container_of(fi, struct f_serial_opts, func_inst); gser_alloc() 372 gser->port_num = opts->port_num; gser_alloc()
|
H A D | f_loopback.c | 234 struct f_lb_opts *opts; lb_free_func() local 236 opts = container_of(f->fi, struct f_lb_opts, func_inst); lb_free_func() 238 mutex_lock(&opts->lock); lb_free_func() 239 opts->refcnt--; lb_free_func() 240 mutex_unlock(&opts->lock); lb_free_func() 437 static ssize_t f_lb_opts_qlen_show(struct f_lb_opts *opts, char *page) f_lb_opts_qlen_show() argument 441 mutex_lock(&opts->lock); f_lb_opts_qlen_show() 442 result = sprintf(page, "%d", opts->qlen); f_lb_opts_qlen_show() 443 mutex_unlock(&opts->lock); f_lb_opts_qlen_show() 448 static ssize_t f_lb_opts_qlen_store(struct f_lb_opts *opts, f_lb_opts_qlen_store() argument 454 mutex_lock(&opts->lock); f_lb_opts_qlen_store() 455 if (opts->refcnt) { f_lb_opts_qlen_store() 464 opts->qlen = num; f_lb_opts_qlen_store() 467 mutex_unlock(&opts->lock); f_lb_opts_qlen_store() 476 static ssize_t f_lb_opts_bulk_buflen_show(struct f_lb_opts *opts, char *page) f_lb_opts_bulk_buflen_show() argument 480 mutex_lock(&opts->lock); f_lb_opts_bulk_buflen_show() 481 result = sprintf(page, "%d", opts->bulk_buflen); f_lb_opts_bulk_buflen_show() 482 mutex_unlock(&opts->lock); f_lb_opts_bulk_buflen_show() 487 static ssize_t f_lb_opts_bulk_buflen_store(struct f_lb_opts *opts, f_lb_opts_bulk_buflen_store() argument 493 mutex_lock(&opts->lock); f_lb_opts_bulk_buflen_store() 494 if (opts->refcnt) { f_lb_opts_bulk_buflen_store() 503 opts->bulk_buflen = num; f_lb_opts_bulk_buflen_store() 506 mutex_unlock(&opts->lock); f_lb_opts_bulk_buflen_store()
|
H A D | f_midi.c | 910 struct f_midi_opts *opts = to_f_midi_opts(item); midi_attr_release() local 912 usb_put_function_instance(&opts->func_inst); midi_attr_release() 922 static ssize_t f_midi_opts_##name##_show(struct f_midi_opts *opts, char *page) \ 926 mutex_lock(&opts->lock); \ 927 result = sprintf(page, "%d\n", opts->name); \ 928 mutex_unlock(&opts->lock); \ 933 static ssize_t f_midi_opts_##name##_store(struct f_midi_opts *opts, \ 939 mutex_lock(&opts->lock); \ 940 if (opts->refcnt) { \ 953 opts->name = num; \ 957 mutex_unlock(&opts->lock); \ 971 static ssize_t f_midi_opts_id_show(struct f_midi_opts *opts, char *page) f_midi_opts_id_show() argument 975 mutex_lock(&opts->lock); f_midi_opts_id_show() 976 if (opts->id) { f_midi_opts_id_show() 977 result = strlcpy(page, opts->id, PAGE_SIZE); f_midi_opts_id_show() 983 mutex_unlock(&opts->lock); f_midi_opts_id_show() 988 static ssize_t f_midi_opts_id_store(struct f_midi_opts *opts, f_midi_opts_id_store() argument 994 mutex_lock(&opts->lock); f_midi_opts_id_store() 995 if (opts->refcnt) { f_midi_opts_id_store() 1005 if (opts->id_allocated) f_midi_opts_id_store() 1006 kfree(opts->id); f_midi_opts_id_store() 1007 opts->id = c; f_midi_opts_id_store() 1008 opts->id_allocated = true; f_midi_opts_id_store() 1011 mutex_unlock(&opts->lock); f_midi_opts_id_store() 1037 struct f_midi_opts *opts; f_midi_free_inst() local 1039 opts = container_of(f, struct f_midi_opts, func_inst); f_midi_free_inst() 1041 if (opts->id_allocated) f_midi_free_inst() 1042 kfree(opts->id); f_midi_free_inst() 1044 kfree(opts); f_midi_free_inst() 1049 struct f_midi_opts *opts; f_midi_alloc_inst() local 1051 opts = kzalloc(sizeof(*opts), GFP_KERNEL); f_midi_alloc_inst() 1052 if (!opts) f_midi_alloc_inst() 1055 mutex_init(&opts->lock); f_midi_alloc_inst() 1056 opts->func_inst.free_func_inst = f_midi_free_inst; f_midi_alloc_inst() 1057 opts->index = SNDRV_DEFAULT_IDX1; f_midi_alloc_inst() 1058 opts->id = SNDRV_DEFAULT_STR1; f_midi_alloc_inst() 1059 opts->buflen = 256; f_midi_alloc_inst() 1060 opts->qlen = 32; f_midi_alloc_inst() 1061 opts->in_ports = 1; f_midi_alloc_inst() 1062 opts->out_ports = 1; f_midi_alloc_inst() 1064 config_group_init_type_name(&opts->func_inst.group, "", f_midi_alloc_inst() 1067 return &opts->func_inst; f_midi_alloc_inst() 1073 struct f_midi_opts *opts; f_midi_free() local 1077 opts = container_of(f->fi, struct f_midi_opts, func_inst); f_midi_free() 1079 mutex_lock(&opts->lock); f_midi_free() 1080 for (i = opts->in_ports - 1; i >= 0; --i) f_midi_free() 1083 --opts->refcnt; f_midi_free() 1084 mutex_unlock(&opts->lock); f_midi_free() 1109 struct f_midi_opts *opts; f_midi_alloc() local 1112 opts = container_of(fi, struct f_midi_opts, func_inst); f_midi_alloc() 1114 mutex_lock(&opts->lock); f_midi_alloc() 1116 if (opts->in_ports > MAX_PORTS || opts->out_ports > MAX_PORTS) { f_midi_alloc() 1117 mutex_unlock(&opts->lock); f_midi_alloc() 1124 mutex_unlock(&opts->lock); f_midi_alloc() 1128 for (i = 0; i < opts->in_ports; i++) { f_midi_alloc() 1133 mutex_unlock(&opts->lock); f_midi_alloc() 1144 midi->id = kstrdup(opts->id, GFP_KERNEL); f_midi_alloc() 1145 if (opts->id && !midi->id) { f_midi_alloc() 1147 mutex_unlock(&opts->lock); f_midi_alloc() 1150 midi->in_ports = opts->in_ports; f_midi_alloc() 1151 midi->out_ports = opts->out_ports; f_midi_alloc() 1152 midi->index = opts->index; f_midi_alloc() 1153 midi->buflen = opts->buflen; f_midi_alloc() 1154 midi->qlen = opts->qlen; f_midi_alloc() 1155 ++opts->refcnt; f_midi_alloc() 1156 mutex_unlock(&opts->lock); f_midi_alloc()
|
H A D | f_obex.c | 422 struct f_serial_opts *opts = to_f_serial_opts(item); f_obex_attr_show() local 428 ret = f_serial_opts_attr->show(opts, page); f_obex_attr_show() 435 struct f_serial_opts *opts = to_f_serial_opts(item); obex_attr_release() local 437 usb_put_function_instance(&opts->func_inst); obex_attr_release() 445 static ssize_t f_obex_port_num_show(struct f_serial_opts *opts, char *page) f_obex_port_num_show() argument 447 return sprintf(page, "%u\n", opts->port_num); f_obex_port_num_show() 466 struct f_serial_opts *opts; obex_free_inst() local 468 opts = container_of(f, struct f_serial_opts, func_inst); obex_free_inst() 469 gserial_free_line(opts->port_num); obex_free_inst() 470 kfree(opts); obex_free_inst() 475 struct f_serial_opts *opts; obex_alloc_inst() local 478 opts = kzalloc(sizeof(*opts), GFP_KERNEL); obex_alloc_inst() 479 if (!opts) obex_alloc_inst() 482 opts->func_inst.free_func_inst = obex_free_inst; obex_alloc_inst() 483 ret = gserial_alloc_line(&opts->port_num); obex_alloc_inst() 485 kfree(opts); obex_alloc_inst() 488 config_group_init_type_name(&opts->func_inst.group, "", obex_alloc_inst() 491 return &opts->func_inst; obex_alloc_inst() 510 struct f_serial_opts *opts; obex_alloc() local 517 opts = container_of(fi, struct f_serial_opts, func_inst); obex_alloc() 519 obex->port_num = opts->port_num; obex_alloc()
|
H A D | f_eem.c | 573 struct f_eem_opts *opts; eem_free_inst() local 575 opts = container_of(f, struct f_eem_opts, func_inst); eem_free_inst() 576 if (opts->bound) eem_free_inst() 577 gether_cleanup(netdev_priv(opts->net)); eem_free_inst() 579 free_netdev(opts->net); eem_free_inst() 580 kfree(opts); eem_free_inst() 585 struct f_eem_opts *opts; eem_alloc_inst() local 587 opts = kzalloc(sizeof(*opts), GFP_KERNEL); eem_alloc_inst() 588 if (!opts) eem_alloc_inst() 590 mutex_init(&opts->lock); eem_alloc_inst() 591 opts->func_inst.free_func_inst = eem_free_inst; eem_alloc_inst() 592 opts->net = gether_setup_default(); eem_alloc_inst() 593 if (IS_ERR(opts->net)) { eem_alloc_inst() 594 struct net_device *net = opts->net; eem_alloc_inst() 595 kfree(opts); eem_alloc_inst() 599 config_group_init_type_name(&opts->func_inst.group, "", &eem_func_type); eem_alloc_inst() 601 return &opts->func_inst; eem_alloc_inst() 607 struct f_eem_opts *opts; eem_free() local 610 opts = container_of(f->fi, struct f_eem_opts, func_inst); eem_free() 612 mutex_lock(&opts->lock); eem_free() 613 opts->refcnt--; eem_free() 614 mutex_unlock(&opts->lock); eem_free() 627 struct f_eem_opts *opts; eem_alloc() local 634 opts = container_of(fi, struct f_eem_opts, func_inst); eem_alloc() 635 mutex_lock(&opts->lock); eem_alloc() 636 opts->refcnt++; eem_alloc() 638 eem->port.ioport = netdev_priv(opts->net); eem_alloc() 639 mutex_unlock(&opts->lock); eem_alloc()
|
H A D | f_uac2.c | 366 struct f_uac2_opts *opts; uac2_pcm_open() local 372 opts = container_of(audio_dev->func.fi, struct f_uac2_opts, func_inst); uac2_pcm_open() 373 p_ssize = opts->p_ssize; uac2_pcm_open() 374 c_ssize = opts->c_ssize; uac2_pcm_open() 375 p_srate = opts->p_srate; uac2_pcm_open() 376 c_srate = opts->c_srate; uac2_pcm_open() 377 p_chmask = opts->p_chmask; uac2_pcm_open() 378 c_chmask = opts->c_chmask; uac2_pcm_open() 450 struct f_uac2_opts *opts; snd_uac2_probe() local 455 opts = container_of(audio_dev->func.fi, struct f_uac2_opts, func_inst); snd_uac2_probe() 456 p_chmask = opts->p_chmask; snd_uac2_probe() 457 c_chmask = opts->c_chmask; snd_uac2_probe() 1177 struct f_uac2_opts *opts = agdev_to_uac2_opts(agdev); afunc_set_alt() local 1196 uac2->p_framesize = opts->p_ssize * afunc_set_alt() 1197 num_channels(opts->p_chmask); afunc_set_alt() 1198 rate = opts->p_srate * uac2->p_framesize; afunc_set_alt() 1285 struct f_uac2_opts *opts; in_rq_cur() local 1294 opts = agdev_to_uac2_opts(agdev); in_rq_cur() 1295 p_srate = opts->p_srate; in_rq_cur() 1296 c_srate = opts->c_srate; in_rq_cur() 1326 struct f_uac2_opts *opts; in_rq_range() local 1336 opts = agdev_to_uac2_opts(agdev); in_rq_range() 1337 p_srate = opts->p_srate; in_rq_range() 1338 c_srate = opts->c_srate; in_rq_range() 1453 struct f_uac2_opts *opts = to_f_uac2_opts(item); f_uac2_attr_release() local 1455 usb_put_function_instance(&opts->func_inst); f_uac2_attr_release() 1465 static ssize_t f_uac2_opts_##name##_show(struct f_uac2_opts *opts, \ 1470 mutex_lock(&opts->lock); \ 1471 result = sprintf(page, "%u\n", opts->name); \ 1472 mutex_unlock(&opts->lock); \ 1477 static ssize_t f_uac2_opts_##name##_store(struct f_uac2_opts *opts, \ 1483 mutex_lock(&opts->lock); \ 1484 if (opts->refcnt) { \ 1493 opts->name = num; \ 1497 mutex_unlock(&opts->lock); \ 1531 struct f_uac2_opts *opts; afunc_free_inst() local 1533 opts = container_of(f, struct f_uac2_opts, func_inst); afunc_free_inst() 1534 kfree(opts); afunc_free_inst() 1539 struct f_uac2_opts *opts; afunc_alloc_inst() local 1541 opts = kzalloc(sizeof(*opts), GFP_KERNEL); afunc_alloc_inst() 1542 if (!opts) afunc_alloc_inst() 1545 mutex_init(&opts->lock); afunc_alloc_inst() 1546 opts->func_inst.free_func_inst = afunc_free_inst; afunc_alloc_inst() 1548 config_group_init_type_name(&opts->func_inst.group, "", afunc_alloc_inst() 1551 opts->p_chmask = UAC2_DEF_PCHMASK; afunc_alloc_inst() 1552 opts->p_srate = UAC2_DEF_PSRATE; afunc_alloc_inst() 1553 opts->p_ssize = UAC2_DEF_PSSIZE; afunc_alloc_inst() 1554 opts->c_chmask = UAC2_DEF_CCHMASK; afunc_alloc_inst() 1555 opts->c_srate = UAC2_DEF_CSRATE; afunc_alloc_inst() 1556 opts->c_ssize = UAC2_DEF_CSSIZE; afunc_alloc_inst() 1557 return &opts->func_inst; afunc_alloc_inst() 1563 struct f_uac2_opts *opts; afunc_free() local 1566 opts = container_of(f->fi, struct f_uac2_opts, func_inst); afunc_free() 1568 mutex_lock(&opts->lock); afunc_free() 1569 --opts->refcnt; afunc_free() 1570 mutex_unlock(&opts->lock); afunc_free() 1596 struct f_uac2_opts *opts; afunc_alloc() local 1602 opts = container_of(fi, struct f_uac2_opts, func_inst); afunc_alloc() 1603 mutex_lock(&opts->lock); afunc_alloc() 1604 ++opts->refcnt; afunc_alloc() 1605 mutex_unlock(&opts->lock); afunc_alloc()
|
H A D | f_sourcesink.c | 480 struct f_ss_opts *opts; sourcesink_free_func() local 482 opts = container_of(f->fi, struct f_ss_opts, func_inst); sourcesink_free_func() 484 mutex_lock(&opts->lock); sourcesink_free_func() 485 opts->refcnt--; sourcesink_free_func() 486 mutex_unlock(&opts->lock); sourcesink_free_func() 923 static ssize_t f_ss_opts_pattern_show(struct f_ss_opts *opts, char *page) f_ss_opts_pattern_show() argument 927 mutex_lock(&opts->lock); f_ss_opts_pattern_show() 928 result = sprintf(page, "%u", opts->pattern); f_ss_opts_pattern_show() 929 mutex_unlock(&opts->lock); f_ss_opts_pattern_show() 934 static ssize_t f_ss_opts_pattern_store(struct f_ss_opts *opts, f_ss_opts_pattern_store() argument 940 mutex_lock(&opts->lock); f_ss_opts_pattern_store() 941 if (opts->refcnt) { f_ss_opts_pattern_store() 955 opts->pattern = num; f_ss_opts_pattern_store() 958 mutex_unlock(&opts->lock); f_ss_opts_pattern_store() 967 static ssize_t f_ss_opts_isoc_interval_show(struct f_ss_opts *opts, char *page) f_ss_opts_isoc_interval_show() argument 971 mutex_lock(&opts->lock); f_ss_opts_isoc_interval_show() 972 result = sprintf(page, "%u", opts->isoc_interval); f_ss_opts_isoc_interval_show() 973 mutex_unlock(&opts->lock); f_ss_opts_isoc_interval_show() 978 static ssize_t f_ss_opts_isoc_interval_store(struct f_ss_opts *opts, f_ss_opts_isoc_interval_store() argument 984 mutex_lock(&opts->lock); f_ss_opts_isoc_interval_store() 985 if (opts->refcnt) { f_ss_opts_isoc_interval_store() 999 opts->isoc_interval = num; f_ss_opts_isoc_interval_store() 1002 mutex_unlock(&opts->lock); f_ss_opts_isoc_interval_store() 1011 static ssize_t f_ss_opts_isoc_maxpacket_show(struct f_ss_opts *opts, char *page) f_ss_opts_isoc_maxpacket_show() argument 1015 mutex_lock(&opts->lock); f_ss_opts_isoc_maxpacket_show() 1016 result = sprintf(page, "%u", opts->isoc_maxpacket); f_ss_opts_isoc_maxpacket_show() 1017 mutex_unlock(&opts->lock); f_ss_opts_isoc_maxpacket_show() 1022 static ssize_t f_ss_opts_isoc_maxpacket_store(struct f_ss_opts *opts, f_ss_opts_isoc_maxpacket_store() argument 1028 mutex_lock(&opts->lock); f_ss_opts_isoc_maxpacket_store() 1029 if (opts->refcnt) { f_ss_opts_isoc_maxpacket_store() 1043 opts->isoc_maxpacket = num; f_ss_opts_isoc_maxpacket_store() 1046 mutex_unlock(&opts->lock); f_ss_opts_isoc_maxpacket_store() 1055 static ssize_t f_ss_opts_isoc_mult_show(struct f_ss_opts *opts, char *page) f_ss_opts_isoc_mult_show() argument 1059 mutex_lock(&opts->lock); f_ss_opts_isoc_mult_show() 1060 result = sprintf(page, "%u", opts->isoc_mult); f_ss_opts_isoc_mult_show() 1061 mutex_unlock(&opts->lock); f_ss_opts_isoc_mult_show() 1066 static ssize_t f_ss_opts_isoc_mult_store(struct f_ss_opts *opts, f_ss_opts_isoc_mult_store() argument 1072 mutex_lock(&opts->lock); f_ss_opts_isoc_mult_store() 1073 if (opts->refcnt) { f_ss_opts_isoc_mult_store() 1087 opts->isoc_mult = num; f_ss_opts_isoc_mult_store() 1090 mutex_unlock(&opts->lock); f_ss_opts_isoc_mult_store() 1099 static ssize_t f_ss_opts_isoc_maxburst_show(struct f_ss_opts *opts, char *page) f_ss_opts_isoc_maxburst_show() argument 1103 mutex_lock(&opts->lock); f_ss_opts_isoc_maxburst_show() 1104 result = sprintf(page, "%u", opts->isoc_maxburst); f_ss_opts_isoc_maxburst_show() 1105 mutex_unlock(&opts->lock); f_ss_opts_isoc_maxburst_show() 1110 static ssize_t f_ss_opts_isoc_maxburst_store(struct f_ss_opts *opts, f_ss_opts_isoc_maxburst_store() argument 1116 mutex_lock(&opts->lock); f_ss_opts_isoc_maxburst_store() 1117 if (opts->refcnt) { f_ss_opts_isoc_maxburst_store() 1131 opts->isoc_maxburst = num; f_ss_opts_isoc_maxburst_store() 1134 mutex_unlock(&opts->lock); f_ss_opts_isoc_maxburst_store() 1143 static ssize_t f_ss_opts_bulk_buflen_show(struct f_ss_opts *opts, char *page) f_ss_opts_bulk_buflen_show() argument 1147 mutex_lock(&opts->lock); f_ss_opts_bulk_buflen_show() 1148 result = sprintf(page, "%u", opts->bulk_buflen); f_ss_opts_bulk_buflen_show() 1149 mutex_unlock(&opts->lock); f_ss_opts_bulk_buflen_show() 1154 static ssize_t f_ss_opts_bulk_buflen_store(struct f_ss_opts *opts, f_ss_opts_bulk_buflen_store() argument 1160 mutex_lock(&opts->lock); f_ss_opts_bulk_buflen_store() 1161 if (opts->refcnt) { f_ss_opts_bulk_buflen_store() 1170 opts->bulk_buflen = num; f_ss_opts_bulk_buflen_store() 1173 mutex_unlock(&opts->lock); f_ss_opts_bulk_buflen_store()
|
H A D | f_phonet.c | 597 struct f_phonet_opts *opts = to_f_phonet_opts(item); f_phonet_attr_show() local 603 ret = f_phonet_opts_attr->show(opts, page); f_phonet_attr_show() 609 struct f_phonet_opts *opts = to_f_phonet_opts(item); phonet_attr_release() local 611 usb_put_function_instance(&opts->func_inst); phonet_attr_release() 619 static ssize_t f_phonet_ifname_show(struct f_phonet_opts *opts, char *page) f_phonet_ifname_show() argument 621 return gether_get_ifname(opts->net, page, PAGE_SIZE); f_phonet_ifname_show() 640 struct f_phonet_opts *opts; phonet_free_inst() local 642 opts = container_of(f, struct f_phonet_opts, func_inst); phonet_free_inst() 643 if (opts->bound) phonet_free_inst() 644 gphonet_cleanup(opts->net); phonet_free_inst() 646 free_netdev(opts->net); phonet_free_inst() 647 kfree(opts); phonet_free_inst() 652 struct f_phonet_opts *opts; phonet_alloc_inst() local 654 opts = kzalloc(sizeof(*opts), GFP_KERNEL); phonet_alloc_inst() 655 if (!opts) phonet_alloc_inst() 658 opts->func_inst.free_func_inst = phonet_free_inst; phonet_alloc_inst() 659 opts->net = gphonet_setup_default(); phonet_alloc_inst() 660 if (IS_ERR(opts->net)) { phonet_alloc_inst() 661 struct net_device *net = opts->net; phonet_alloc_inst() 662 kfree(opts); phonet_alloc_inst() 666 config_group_init_type_name(&opts->func_inst.group, "", phonet_alloc_inst() 669 return &opts->func_inst; phonet_alloc_inst() 698 struct f_phonet_opts *opts; phonet_alloc() local 706 opts = container_of(fi, struct f_phonet_opts, func_inst); phonet_alloc() 708 fp->dev = opts->net; phonet_alloc()
|
H A D | f_subset.c | 431 struct f_gether_opts *opts; geth_free_inst() local 433 opts = container_of(f, struct f_gether_opts, func_inst); geth_free_inst() 434 if (opts->bound) geth_free_inst() 435 gether_cleanup(netdev_priv(opts->net)); geth_free_inst() 437 free_netdev(opts->net); geth_free_inst() 438 kfree(opts); geth_free_inst() 443 struct f_gether_opts *opts; geth_alloc_inst() local 445 opts = kzalloc(sizeof(*opts), GFP_KERNEL); geth_alloc_inst() 446 if (!opts) geth_alloc_inst() 448 mutex_init(&opts->lock); geth_alloc_inst() 449 opts->func_inst.free_func_inst = geth_free_inst; geth_alloc_inst() 450 opts->net = gether_setup_default(); geth_alloc_inst() 451 if (IS_ERR(opts->net)) { geth_alloc_inst() 452 struct net_device *net = opts->net; geth_alloc_inst() 453 kfree(opts); geth_alloc_inst() 457 config_group_init_type_name(&opts->func_inst.group, "", geth_alloc_inst() 460 return &opts->func_inst; geth_alloc_inst() 480 struct f_gether_opts *opts; geth_alloc() local 488 opts = container_of(fi, struct f_gether_opts, func_inst); geth_alloc() 490 mutex_lock(&opts->lock); geth_alloc() 491 opts->refcnt++; geth_alloc() 493 status = gether_get_host_addr_cdc(opts->net, geth->ethaddr, geth_alloc() 497 mutex_unlock(&opts->lock); geth_alloc() 502 geth->port.ioport = netdev_priv(opts->net); geth_alloc() 503 mutex_unlock(&opts->lock); geth_alloc()
|
H A D | f_printer.c | 1155 struct f_printer_opts *opts = to_f_printer_opts(item); printer_attr_release() local 1157 usb_put_function_instance(&opts->func_inst); printer_attr_release() 1166 static ssize_t f_printer_opts_pnp_string_show(struct f_printer_opts *opts, f_printer_opts_pnp_string_show() argument 1171 mutex_lock(&opts->lock); f_printer_opts_pnp_string_show() 1172 result = strlcpy(page, opts->pnp_string + 2, PNP_STRING_LEN - 2); f_printer_opts_pnp_string_show() 1173 mutex_unlock(&opts->lock); f_printer_opts_pnp_string_show() 1178 static ssize_t f_printer_opts_pnp_string_store(struct f_printer_opts *opts, f_printer_opts_pnp_string_store() argument 1183 mutex_lock(&opts->lock); f_printer_opts_pnp_string_store() 1184 result = strlcpy(opts->pnp_string + 2, page, PNP_STRING_LEN - 2); f_printer_opts_pnp_string_store() 1185 l = strlen(opts->pnp_string + 2) + 2; f_printer_opts_pnp_string_store() 1186 opts->pnp_string[0] = (l >> 8) & 0xFF; f_printer_opts_pnp_string_store() 1187 opts->pnp_string[1] = l & 0xFF; f_printer_opts_pnp_string_store() 1188 mutex_unlock(&opts->lock); f_printer_opts_pnp_string_store() 1198 static ssize_t f_printer_opts_q_len_show(struct f_printer_opts *opts, f_printer_opts_q_len_show() argument 1203 mutex_lock(&opts->lock); f_printer_opts_q_len_show() 1204 result = sprintf(page, "%d\n", opts->q_len); f_printer_opts_q_len_show() 1205 mutex_unlock(&opts->lock); f_printer_opts_q_len_show() 1210 static ssize_t f_printer_opts_q_len_store(struct f_printer_opts *opts, f_printer_opts_q_len_store() argument 1216 mutex_lock(&opts->lock); f_printer_opts_q_len_store() 1217 if (opts->refcnt) { f_printer_opts_q_len_store() 1226 opts->q_len = (unsigned)num; f_printer_opts_q_len_store() 1229 mutex_unlock(&opts->lock); f_printer_opts_q_len_store() 1264 struct f_printer_opts *opts; gprinter_free_inst() local 1266 opts = container_of(f, struct f_printer_opts, func_inst); gprinter_free_inst() 1270 gprinter_put_minor(opts->minor); gprinter_free_inst() 1276 kfree(opts); gprinter_free_inst() 1281 struct f_printer_opts *opts; gprinter_alloc_inst() local 1285 opts = kzalloc(sizeof(*opts), GFP_KERNEL); gprinter_alloc_inst() 1286 if (!opts) gprinter_alloc_inst() 1289 mutex_init(&opts->lock); gprinter_alloc_inst() 1290 opts->func_inst.free_func_inst = gprinter_free_inst; gprinter_alloc_inst() 1291 ret = &opts->func_inst; gprinter_alloc_inst() 1299 kfree(opts); gprinter_alloc_inst() 1304 opts->minor = gprinter_get_minor(); gprinter_alloc_inst() 1305 if (opts->minor < 0) { gprinter_alloc_inst() 1306 ret = ERR_PTR(opts->minor); gprinter_alloc_inst() 1307 kfree(opts); gprinter_alloc_inst() 1312 config_group_init_type_name(&opts->func_inst.group, "", gprinter_alloc_inst() 1323 struct f_printer_opts *opts; gprinter_free() local 1325 opts = container_of(f->fi, struct f_printer_opts, func_inst); gprinter_free() 1327 mutex_lock(&opts->lock); gprinter_free() 1328 --opts->refcnt; gprinter_free() 1329 mutex_unlock(&opts->lock); gprinter_free() 1379 struct f_printer_opts *opts; gprinter_alloc() local 1381 opts = container_of(fi, struct f_printer_opts, func_inst); gprinter_alloc() 1383 mutex_lock(&opts->lock); gprinter_alloc() 1384 if (opts->minor >= minors) { gprinter_alloc() 1385 mutex_unlock(&opts->lock); gprinter_alloc() 1391 mutex_unlock(&opts->lock); gprinter_alloc() 1395 ++opts->refcnt; gprinter_alloc() 1396 dev->minor = opts->minor; gprinter_alloc() 1397 dev->pnp_string = opts->pnp_string; gprinter_alloc() 1398 dev->q_len = opts->q_len; gprinter_alloc() 1399 mutex_unlock(&opts->lock); gprinter_alloc()
|
H A D | f_ncm.c | 900 const struct ndp_parser_opts *opts = ncm->parser_opts; package_for_tx() local 902 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; package_for_tx() 916 put_ncm(&ntb_iter, opts->block_length, new_len); package_for_tx() 917 put_ncm(&ntb_iter, opts->ndp_index, ndp_index); package_for_tx() 920 new_len = opts->ndp_size + package_for_tx() 963 const struct ndp_parser_opts *opts = ncm->parser_opts; ncm_wrap_ntb() local 967 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; ncm_wrap_ntb() 1002 ncb_len = opts->nth_size; ncm_wrap_ntb() 1014 put_unaligned_le32(opts->nth_sign, ntb_data); ncm_wrap_ntb() 1017 put_unaligned_le16(opts->nth_size, ntb_data++); ncm_wrap_ntb() 1023 ncm->skb_tx_ndp = alloc_skb((int)(opts->ndp_size ncm_wrap_ntb() 1024 + opts->dpe_size ncm_wrap_ntb() 1030 opts->ndp_size); ncm_wrap_ntb() 1039 /* Note: we skip opts->next_ndp_index */ ncm_wrap_ntb() 1056 put_ncm(&ntb_ndp, opts->dgram_item_len, ncb_len); ncm_wrap_ntb() 1058 put_ncm(&ntb_ndp, opts->dgram_item_len, skb->len); ncm_wrap_ntb() 1141 const struct ndp_parser_opts *opts = ncm->parser_opts; ncm_unwrap_ntb() local 1146 if (get_unaligned_le32(tmp) != opts->nth_sign) { ncm_unwrap_ntb() 1156 if (get_unaligned_le16(tmp++) != opts->nth_size) { ncm_unwrap_ntb() 1163 if (get_ncm(&tmp, opts->block_length) > max_size) { ncm_unwrap_ntb() 1168 ndp_index = get_ncm(&tmp, opts->ndp_index); ncm_unwrap_ntb() 1174 (ndp_index < opts->nth_size)) { ncm_unwrap_ntb() 1192 * item size is 16/32 bits, opts->dgram_item_len * 2 bytes ncm_unwrap_ntb() 1196 if ((ndp_len < opts->ndp_size ncm_unwrap_ntb() 1197 + 2 * 2 * (opts->dgram_item_len * 2)) ncm_unwrap_ntb() 1198 || (ndp_len % opts->ndplen_align != 0)) { ncm_unwrap_ntb() 1203 tmp += opts->reserved1; ncm_unwrap_ntb() 1205 ndp_index = get_ncm(&tmp, opts->next_ndp_index); ncm_unwrap_ntb() 1206 tmp += opts->reserved2; ncm_unwrap_ntb() 1208 ndp_len -= opts->ndp_size; ncm_unwrap_ntb() 1209 index2 = get_ncm(&tmp, opts->dgram_item_len); ncm_unwrap_ntb() 1210 dg_len2 = get_ncm(&tmp, opts->dgram_item_len); ncm_unwrap_ntb() 1237 index2 = get_ncm(&tmp, opts->dgram_item_len); ncm_unwrap_ntb() 1238 dg_len2 = get_ncm(&tmp, opts->dgram_item_len); ncm_unwrap_ntb() 1253 ndp_len -= 2 * (opts->dgram_item_len * 2); ncm_unwrap_ntb() 1259 } while (ndp_len > 2 * (opts->dgram_item_len * 2)); ncm_unwrap_ntb() 1522 struct f_ncm_opts *opts; ncm_free_inst() local 1524 opts = container_of(f, struct f_ncm_opts, func_inst); ncm_free_inst() 1525 if (opts->bound) ncm_free_inst() 1526 gether_cleanup(netdev_priv(opts->net)); ncm_free_inst() 1528 free_netdev(opts->net); ncm_free_inst() 1529 kfree(opts); ncm_free_inst() 1534 struct f_ncm_opts *opts; ncm_alloc_inst() local 1536 opts = kzalloc(sizeof(*opts), GFP_KERNEL); ncm_alloc_inst() 1537 if (!opts) ncm_alloc_inst() 1539 mutex_init(&opts->lock); ncm_alloc_inst() 1540 opts->func_inst.free_func_inst = ncm_free_inst; ncm_alloc_inst() 1541 opts->net = gether_setup_default(); ncm_alloc_inst() 1542 if (IS_ERR(opts->net)) { ncm_alloc_inst() 1543 struct net_device *net = opts->net; ncm_alloc_inst() 1544 kfree(opts); ncm_alloc_inst() 1548 config_group_init_type_name(&opts->func_inst.group, "", &ncm_func_type); ncm_alloc_inst() 1550 return &opts->func_inst; ncm_alloc_inst() 1556 struct f_ncm_opts *opts; ncm_free() local 1559 opts = container_of(f->fi, struct f_ncm_opts, func_inst); ncm_free() 1561 mutex_lock(&opts->lock); ncm_free() 1562 opts->refcnt--; ncm_free() 1563 mutex_unlock(&opts->lock); ncm_free() 1585 struct f_ncm_opts *opts; ncm_alloc() local 1593 opts = container_of(fi, struct f_ncm_opts, func_inst); ncm_alloc() 1594 mutex_lock(&opts->lock); ncm_alloc() 1595 opts->refcnt++; ncm_alloc() 1598 status = gether_get_host_addr_cdc(opts->net, ncm->ethaddr, ncm_alloc() 1602 mutex_unlock(&opts->lock); ncm_alloc() 1609 ncm->port.ioport = netdev_priv(opts->net); ncm_alloc() 1610 mutex_unlock(&opts->lock); ncm_alloc()
|
H A D | uvc_configfs.h | 20 int uvcg_attach_configfs(struct f_uvc_opts *opts);
|
H A D | f_ecm.c | 873 struct f_ecm_opts *opts; ecm_free_inst() local 875 opts = container_of(f, struct f_ecm_opts, func_inst); ecm_free_inst() 876 if (opts->bound) ecm_free_inst() 877 gether_cleanup(netdev_priv(opts->net)); ecm_free_inst() 879 free_netdev(opts->net); ecm_free_inst() 880 kfree(opts); ecm_free_inst() 885 struct f_ecm_opts *opts; ecm_alloc_inst() local 887 opts = kzalloc(sizeof(*opts), GFP_KERNEL); ecm_alloc_inst() 888 if (!opts) ecm_alloc_inst() 890 mutex_init(&opts->lock); ecm_alloc_inst() 891 opts->func_inst.free_func_inst = ecm_free_inst; ecm_alloc_inst() 892 opts->net = gether_setup_default(); ecm_alloc_inst() 893 if (IS_ERR(opts->net)) { ecm_alloc_inst() 894 struct net_device *net = opts->net; ecm_alloc_inst() 895 kfree(opts); ecm_alloc_inst() 899 config_group_init_type_name(&opts->func_inst.group, "", &ecm_func_type); ecm_alloc_inst() 901 return &opts->func_inst; ecm_alloc_inst() 907 struct f_ecm_opts *opts; ecm_free() local 910 opts = container_of(f->fi, struct f_ecm_opts, func_inst); ecm_free() 912 mutex_lock(&opts->lock); ecm_free() 913 opts->refcnt--; ecm_free() 914 mutex_unlock(&opts->lock); ecm_free() 932 struct f_ecm_opts *opts; ecm_alloc() local 940 opts = container_of(fi, struct f_ecm_opts, func_inst); ecm_alloc() 941 mutex_lock(&opts->lock); ecm_alloc() 942 opts->refcnt++; ecm_alloc() 945 status = gether_get_host_addr_cdc(opts->net, ecm->ethaddr, ecm_alloc() 949 mutex_unlock(&opts->lock); ecm_alloc() 954 ecm->port.ioport = netdev_priv(opts->net); ecm_alloc() 955 mutex_unlock(&opts->lock); ecm_alloc()
|
H A D | f_rndis.c | 847 struct f_rndis_opts *opts; rndis_borrow_net() local 849 opts = container_of(f, struct f_rndis_opts, func_inst); rndis_borrow_net() 850 if (opts->bound) rndis_borrow_net() 851 gether_cleanup(netdev_priv(opts->net)); rndis_borrow_net() 853 free_netdev(opts->net); rndis_borrow_net() 854 opts->borrowed_net = opts->bound = true; rndis_borrow_net() 855 opts->net = net; rndis_borrow_net() 896 struct f_rndis_opts *opts; rndis_free_inst() local 898 opts = container_of(f, struct f_rndis_opts, func_inst); rndis_free_inst() 899 if (!opts->borrowed_net) { rndis_free_inst() 900 if (opts->bound) rndis_free_inst() 901 gether_cleanup(netdev_priv(opts->net)); rndis_free_inst() 903 free_netdev(opts->net); rndis_free_inst() 906 kfree(opts->rndis_os_desc.group.default_groups); /* single VLA chunk */ rndis_free_inst() 907 kfree(opts); rndis_free_inst() 912 struct f_rndis_opts *opts; rndis_alloc_inst() local 916 opts = kzalloc(sizeof(*opts), GFP_KERNEL); rndis_alloc_inst() 917 if (!opts) rndis_alloc_inst() 919 opts->rndis_os_desc.ext_compat_id = opts->rndis_ext_compat_id; rndis_alloc_inst() 921 mutex_init(&opts->lock); rndis_alloc_inst() 922 opts->func_inst.free_func_inst = rndis_free_inst; rndis_alloc_inst() 923 opts->net = gether_setup_default(); rndis_alloc_inst() 924 if (IS_ERR(opts->net)) { rndis_alloc_inst() 925 struct net_device *net = opts->net; rndis_alloc_inst() 926 kfree(opts); rndis_alloc_inst() 929 INIT_LIST_HEAD(&opts->rndis_os_desc.ext_prop); rndis_alloc_inst() 931 descs[0] = &opts->rndis_os_desc; rndis_alloc_inst() 933 usb_os_desc_prepare_interf_dir(&opts->func_inst.group, 1, descs, rndis_alloc_inst() 935 config_group_init_type_name(&opts->func_inst.group, "", rndis_alloc_inst() 938 return &opts->func_inst; rndis_alloc_inst() 944 struct f_rndis_opts *opts; rndis_free() local 948 opts = container_of(f->fi, struct f_rndis_opts, func_inst); rndis_free() 950 mutex_lock(&opts->lock); rndis_free() 951 opts->refcnt--; rndis_free() 952 mutex_unlock(&opts->lock); rndis_free() 970 struct f_rndis_opts *opts; rndis_alloc() local 978 opts = container_of(fi, struct f_rndis_opts, func_inst); rndis_alloc() 979 mutex_lock(&opts->lock); rndis_alloc() 980 opts->refcnt++; rndis_alloc() 982 gether_get_host_addr_u8(opts->net, rndis->ethaddr); rndis_alloc() 983 rndis->vendorID = opts->vendor_id; rndis_alloc() 984 rndis->manufacturer = opts->manufacturer; rndis_alloc() 986 rndis->port.ioport = netdev_priv(opts->net); rndis_alloc() 987 mutex_unlock(&opts->lock); rndis_alloc()
|
H A D | f_mass_storage.c | 3020 struct fsg_opts *opts; fsg_bind() local 3029 opts = fsg_opts_from_func_inst(f->fi); fsg_bind() 3030 if (!opts->no_configfs) { fsg_bind() 3150 static ssize_t fsg_lun_opts_file_show(struct fsg_lun_opts *opts, char *page) fsg_lun_opts_file_show() argument 3154 fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); fsg_lun_opts_file_show() 3156 return fsg_show_file(opts->lun, &fsg_opts->common->filesem, page); fsg_lun_opts_file_show() 3159 static ssize_t fsg_lun_opts_file_store(struct fsg_lun_opts *opts, fsg_lun_opts_file_store() argument 3164 fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); fsg_lun_opts_file_store() 3166 return fsg_store_file(opts->lun, &fsg_opts->common->filesem, page, len); fsg_lun_opts_file_store() 3173 static ssize_t fsg_lun_opts_ro_show(struct fsg_lun_opts *opts, char *page) fsg_lun_opts_ro_show() argument 3175 return fsg_show_ro(opts->lun, page); fsg_lun_opts_ro_show() 3178 static ssize_t fsg_lun_opts_ro_store(struct fsg_lun_opts *opts, fsg_lun_opts_ro_store() argument 3183 fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); fsg_lun_opts_ro_store() 3185 return fsg_store_ro(opts->lun, &fsg_opts->common->filesem, page, len); fsg_lun_opts_ro_store() 3192 static ssize_t fsg_lun_opts_removable_show(struct fsg_lun_opts *opts, fsg_lun_opts_removable_show() argument 3195 return fsg_show_removable(opts->lun, page); fsg_lun_opts_removable_show() 3198 static ssize_t fsg_lun_opts_removable_store(struct fsg_lun_opts *opts, fsg_lun_opts_removable_store() argument 3201 return fsg_store_removable(opts->lun, page, len); fsg_lun_opts_removable_store() 3209 static ssize_t fsg_lun_opts_cdrom_show(struct fsg_lun_opts *opts, char *page) fsg_lun_opts_cdrom_show() argument 3211 return fsg_show_cdrom(opts->lun, page); fsg_lun_opts_cdrom_show() 3214 static ssize_t fsg_lun_opts_cdrom_store(struct fsg_lun_opts *opts, fsg_lun_opts_cdrom_store() argument 3219 fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); fsg_lun_opts_cdrom_store() 3221 return fsg_store_cdrom(opts->lun, &fsg_opts->common->filesem, page, fsg_lun_opts_cdrom_store() 3229 static ssize_t fsg_lun_opts_nofua_show(struct fsg_lun_opts *opts, char *page) fsg_lun_opts_nofua_show() argument 3231 return fsg_show_nofua(opts->lun, page); fsg_lun_opts_nofua_show() 3234 static ssize_t fsg_lun_opts_nofua_store(struct fsg_lun_opts *opts, fsg_lun_opts_nofua_store() argument 3237 return fsg_store_nofua(opts->lun, page, len); fsg_lun_opts_nofua_store() 3262 struct fsg_lun_opts *opts; fsg_lun_make() local 3290 opts = kzalloc(sizeof(*opts), GFP_KERNEL); fsg_lun_make() 3291 if (!opts) { fsg_lun_make() 3302 kfree(opts); fsg_lun_make() 3305 opts->lun = fsg_opts->common->luns[num]; fsg_lun_make() 3306 opts->lun_id = num; fsg_lun_make() 3309 config_group_init_type_name(&opts->group, name, &fsg_lun_type); fsg_lun_make() 3311 return &opts->group; fsg_lun_make() 3346 struct fsg_opts *opts = to_fsg_opts(item); fsg_attr_release() local 3348 usb_put_function_instance(&opts->func_inst); fsg_attr_release() 3357 static ssize_t fsg_opts_stall_show(struct fsg_opts *opts, char *page) fsg_opts_stall_show() argument 3361 mutex_lock(&opts->lock); fsg_opts_stall_show() 3362 result = sprintf(page, "%d", opts->common->can_stall); fsg_opts_stall_show() 3363 mutex_unlock(&opts->lock); fsg_opts_stall_show() 3368 static ssize_t fsg_opts_stall_store(struct fsg_opts *opts, const char *page, fsg_opts_stall_store() argument 3374 mutex_lock(&opts->lock); fsg_opts_stall_store() 3376 if (opts->refcnt) { fsg_opts_stall_store() 3377 mutex_unlock(&opts->lock); fsg_opts_stall_store() 3383 opts->common->can_stall = stall; fsg_opts_stall_store() 3387 mutex_unlock(&opts->lock); fsg_opts_stall_store() 3397 static ssize_t fsg_opts_num_buffers_show(struct fsg_opts *opts, char *page) fsg_opts_num_buffers_show() argument 3401 mutex_lock(&opts->lock); fsg_opts_num_buffers_show() 3402 result = sprintf(page, "%d", opts->common->fsg_num_buffers); fsg_opts_num_buffers_show() 3403 mutex_unlock(&opts->lock); fsg_opts_num_buffers_show() 3408 static ssize_t fsg_opts_num_buffers_store(struct fsg_opts *opts, fsg_opts_num_buffers_store() argument 3414 mutex_lock(&opts->lock); fsg_opts_num_buffers_store() 3415 if (opts->refcnt) { fsg_opts_num_buffers_store() 3427 fsg_common_set_num_buffers(opts->common, num); fsg_opts_num_buffers_store() 3431 mutex_unlock(&opts->lock); fsg_opts_num_buffers_store() 3464 struct fsg_opts *opts; fsg_free_inst() local 3466 opts = fsg_opts_from_func_inst(fi); fsg_free_inst() 3467 fsg_common_put(opts->common); fsg_free_inst() 3468 kfree(opts); fsg_free_inst() 3473 struct fsg_opts *opts; fsg_alloc_inst() local 3477 opts = kzalloc(sizeof(*opts), GFP_KERNEL); fsg_alloc_inst() 3478 if (!opts) fsg_alloc_inst() 3480 mutex_init(&opts->lock); fsg_alloc_inst() 3481 opts->func_inst.free_func_inst = fsg_free_inst; fsg_alloc_inst() 3482 opts->common = fsg_common_setup(opts->common); fsg_alloc_inst() 3483 if (IS_ERR(opts->common)) { fsg_alloc_inst() 3484 rc = PTR_ERR(opts->common); fsg_alloc_inst() 3488 rc = fsg_common_set_num_buffers(opts->common, fsg_alloc_inst() 3497 rc = fsg_common_create_lun(opts->common, &config, 0, "lun.0", fsg_alloc_inst() 3498 (const char **)&opts->func_inst.group.cg_item.ci_name); fsg_alloc_inst() 3502 opts->lun0.lun = opts->common->luns[0]; fsg_alloc_inst() 3503 opts->lun0.lun_id = 0; fsg_alloc_inst() 3504 config_group_init_type_name(&opts->lun0.group, "lun.0", &fsg_lun_type); fsg_alloc_inst() 3505 opts->default_groups[0] = &opts->lun0.group; fsg_alloc_inst() 3506 opts->func_inst.group.default_groups = opts->default_groups; fsg_alloc_inst() 3508 config_group_init_type_name(&opts->func_inst.group, "", &fsg_func_type); fsg_alloc_inst() 3510 return &opts->func_inst; fsg_alloc_inst() 3513 fsg_common_free_buffers(opts->common); fsg_alloc_inst() 3515 kfree(opts); fsg_alloc_inst() 3522 struct fsg_opts *opts; fsg_free() local 3525 opts = container_of(f->fi, struct fsg_opts, func_inst); fsg_free() 3527 mutex_lock(&opts->lock); fsg_free() 3528 opts->refcnt--; fsg_free() 3529 mutex_unlock(&opts->lock); fsg_free() 3536 struct fsg_opts *opts = fsg_opts_from_func_inst(fi); fsg_alloc() local 3537 struct fsg_common *common = opts->common; fsg_alloc() 3544 mutex_lock(&opts->lock); fsg_alloc() 3545 opts->refcnt++; fsg_alloc() 3546 mutex_unlock(&opts->lock); fsg_alloc()
|
H A D | f_acm.c | 745 struct f_serial_opts *opts; acm_alloc_func() local 766 opts = container_of(fi, struct f_serial_opts, func_inst); acm_alloc_func() 767 acm->port_num = opts->port_num; acm_alloc_func() 785 struct f_serial_opts *opts = to_f_serial_opts(item); f_acm_attr_show() local 791 ret = f_serial_opts_attr->show(opts, page); f_acm_attr_show() 797 struct f_serial_opts *opts = to_f_serial_opts(item); acm_attr_release() local 799 usb_put_function_instance(&opts->func_inst); acm_attr_release() 807 static ssize_t f_acm_port_num_show(struct f_serial_opts *opts, char *page) f_acm_port_num_show() argument 809 return sprintf(page, "%u\n", opts->port_num); f_acm_port_num_show() 829 struct f_serial_opts *opts; acm_free_instance() local 831 opts = container_of(fi, struct f_serial_opts, func_inst); acm_free_instance() 832 gserial_free_line(opts->port_num); acm_free_instance() 833 kfree(opts); acm_free_instance() 838 struct f_serial_opts *opts; acm_alloc_instance() local 841 opts = kzalloc(sizeof(*opts), GFP_KERNEL); acm_alloc_instance() 842 if (!opts) acm_alloc_instance() 844 opts->func_inst.free_func_inst = acm_free_instance; acm_alloc_instance() 845 ret = gserial_alloc_line(&opts->port_num); acm_alloc_instance() 847 kfree(opts); acm_alloc_instance() 850 config_group_init_type_name(&opts->func_inst.group, "", acm_alloc_instance() 852 return &opts->func_inst; acm_alloc_instance()
|
H A D | f_fs.c | 1184 static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts) ffs_fs_parse_opts() argument 1188 if (!opts || !*opts) ffs_fs_parse_opts() 1196 comma = strchr(opts, ','); ffs_fs_parse_opts() 1201 eq = strchr(opts, '='); ffs_fs_parse_opts() 1203 pr_err("'=' missing in %s\n", opts); ffs_fs_parse_opts() 1210 pr_err("%s: invalid value: %s\n", opts, eq + 1); ffs_fs_parse_opts() 1215 switch (eq - opts) { ffs_fs_parse_opts() 1217 if (!memcmp(opts, "no_disconnect", 13)) ffs_fs_parse_opts() 1223 if (!memcmp(opts, "rmode", 5)) ffs_fs_parse_opts() 1225 else if (!memcmp(opts, "fmode", 5)) ffs_fs_parse_opts() 1232 if (!memcmp(opts, "mode", 4)) { ffs_fs_parse_opts() 1241 if (!memcmp(opts, "uid", 3)) { ffs_fs_parse_opts() 1244 pr_err("%s: unmapped value: %lu\n", opts, value); ffs_fs_parse_opts() 1247 } else if (!memcmp(opts, "gid", 3)) { ffs_fs_parse_opts() 1250 pr_err("%s: unmapped value: %lu\n", opts, value); ffs_fs_parse_opts() 1260 pr_err("%s: invalid option\n", opts); ffs_fs_parse_opts() 1267 opts = comma + 1; ffs_fs_parse_opts() 1277 const char *dev_name, void *opts) ffs_fs_mount() 1295 ret = ffs_fs_parse_opts(&data, opts); ffs_fs_mount() 3109 struct f_fs_opts *opts = to_ffs_opts(item); ffs_attr_release() local 3111 usb_put_function_instance(&opts->func_inst); ffs_attr_release() 3128 struct f_fs_opts *opts; ffs_free_inst() local 3130 opts = to_f_fs_opts(f); ffs_free_inst() 3132 _ffs_free_dev(opts->dev); ffs_free_inst() 3134 kfree(opts); ffs_free_inst() 3141 struct f_fs_opts *opts; ffs_set_inst_name() local 3154 opts = to_f_fs_opts(fi); ffs_set_inst_name() 3159 tmp = opts->dev->name_allocated ? opts->dev->name : NULL; ffs_set_inst_name() 3160 ret = _ffs_name_dev(opts->dev, ptr); ffs_set_inst_name() 3166 opts->dev->name_allocated = true; ffs_set_inst_name() 3177 struct f_fs_opts *opts; ffs_alloc_inst() local 3180 opts = kzalloc(sizeof(*opts), GFP_KERNEL); ffs_alloc_inst() 3181 if (!opts) ffs_alloc_inst() 3184 opts->func_inst.set_inst_name = ffs_set_inst_name; ffs_alloc_inst() 3185 opts->func_inst.free_func_inst = ffs_free_inst; ffs_alloc_inst() 3190 kfree(opts); ffs_alloc_inst() 3193 opts->dev = dev; ffs_alloc_inst() 3194 dev->opts = opts; ffs_alloc_inst() 3196 config_group_init_type_name(&opts->func_inst.group, "", ffs_alloc_inst() 3198 return &opts->func_inst; ffs_alloc_inst() 3211 struct f_fs_opts *opts = ffs_func_unbind() local 3223 if (!--opts->refcnt) ffs_func_unbind() 3439 struct f_fs_opts *opts; ffs_closed() local 3454 if (ffs_obj->opts) ffs_closed() 3455 opts = ffs_obj->opts; ffs_closed() 3459 if (opts->no_configfs || !opts->func_inst.group.cg_item.ci_parent ffs_closed() 3460 || !atomic_read(&opts->func_inst.group.cg_item.ci_kref.refcount)) ffs_closed() 3463 unregister_gadget_item(ffs_obj->opts-> ffs_closed() 1276 ffs_fs_mount(struct file_system_type *t, int flags, const char *dev_name, void *opts) ffs_fs_mount() argument
|
H A D | u_uac1.c | 208 struct f_uac1_opts *opts; gaudio_open_snd_dev() local 211 opts = container_of(card->func.fi, struct f_uac1_opts, func_inst); gaudio_open_snd_dev() 212 fn_play = opts->fn_play; gaudio_open_snd_dev() 213 fn_cap = opts->fn_cap; gaudio_open_snd_dev() 214 fn_cntl = opts->fn_cntl; gaudio_open_snd_dev()
|
H A D | u_fs.h | 48 struct f_fs_opts *opts; member in struct:ffs_dev
|
/linux-4.1.27/drivers/net/ppp/ |
H A D | ppp_mppe.h | 8 /* unsupported opts */ 32 /* Build a CI from mppe opts (see RFC 3078) */ 33 #define MPPE_OPTS_TO_CI(opts, ci) \ 38 if (opts & MPPE_OPT_STATEFUL) \ 47 if (opts & MPPE_OPT_128) \ 49 if (opts & MPPE_OPT_40) \ 55 #define MPPE_CI_TO_OPTS(ci, opts) \ 59 opts = 0; \ 63 opts |= MPPE_OPT_STATEFUL; \ 67 opts |= MPPE_OPT_128; \ 69 opts |= MPPE_OPT_40; \ 73 opts |= MPPE_OPT_56; \ 75 opts |= MPPE_OPT_D; \ 77 opts |= MPPE_OPT_MPPC; \ 81 opts |= MPPE_OPT_UNKNOWN; \ 83 opts |= MPPE_OPT_UNKNOWN; \ 85 opts |= MPPE_OPT_UNKNOWN; \
|
/linux-4.1.27/fs/ncpfs/ |
H A D | getopt.c | 18 * @opts: an array of &struct option entries controlling parser operations 25 * Returns opts->val if a matching entry in the 'opts' array is found, 28 int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts, ncp_getopt() argument 45 for (; opts->name; opts++) { ncp_getopt() 46 if (!strcmp(opts->name, token)) { ncp_getopt() 48 if (opts->has_arg & OPT_NOPARAM) { ncp_getopt() 49 return opts->val; ncp_getopt() 55 if (opts->has_arg & OPT_INT) { ncp_getopt() 63 return opts->val; ncp_getopt() 65 if (opts->has_arg & OPT_STRING) { ncp_getopt() 66 return opts->val; ncp_getopt()
|
H A D | getopt.h | 13 extern int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts,
|
/linux-4.1.27/net/netfilter/ |
H A D | nf_synproxy_core.c | 29 const struct tcphdr *th, struct synproxy_options *opts) synproxy_parse_options() 38 opts->options = 0; synproxy_parse_options() 59 opts->mss = get_unaligned_be16(ptr); synproxy_parse_options() 60 opts->options |= XT_SYNPROXY_OPT_MSS; synproxy_parse_options() 65 opts->wscale = *ptr; synproxy_parse_options() 66 if (opts->wscale > 14) synproxy_parse_options() 67 opts->wscale = 14; synproxy_parse_options() 68 opts->options |= XT_SYNPROXY_OPT_WSCALE; synproxy_parse_options() 73 opts->tsval = get_unaligned_be32(ptr); synproxy_parse_options() 74 opts->tsecr = get_unaligned_be32(ptr + 4); synproxy_parse_options() 75 opts->options |= XT_SYNPROXY_OPT_TIMESTAMP; synproxy_parse_options() 80 opts->options |= XT_SYNPROXY_OPT_SACK_PERM; synproxy_parse_options() 92 unsigned int synproxy_options_size(const struct synproxy_options *opts) synproxy_options_size() argument 96 if (opts->options & XT_SYNPROXY_OPT_MSS) synproxy_options_size() 98 if (opts->options & XT_SYNPROXY_OPT_TIMESTAMP) synproxy_options_size() 100 else if (opts->options & XT_SYNPROXY_OPT_SACK_PERM) synproxy_options_size() 102 if (opts->options & XT_SYNPROXY_OPT_WSCALE) synproxy_options_size() 110 synproxy_build_options(struct tcphdr *th, const struct synproxy_options *opts) synproxy_build_options() argument 113 u8 options = opts->options; synproxy_build_options() 118 opts->mss); synproxy_build_options() 132 *ptr++ = htonl(opts->tsval); synproxy_build_options() 133 *ptr++ = htonl(opts->tsecr); synproxy_build_options() 144 opts->wscale); synproxy_build_options() 149 struct synproxy_options *opts) synproxy_init_timestamp_cookie() 151 opts->tsecr = opts->tsval; synproxy_init_timestamp_cookie() 152 opts->tsval = tcp_time_stamp & ~0x3f; synproxy_init_timestamp_cookie() 154 if (opts->options & XT_SYNPROXY_OPT_WSCALE) { synproxy_init_timestamp_cookie() 155 opts->tsval |= opts->wscale; synproxy_init_timestamp_cookie() 156 opts->wscale = info->wscale; synproxy_init_timestamp_cookie() 158 opts->tsval |= 0xf; synproxy_init_timestamp_cookie() 160 if (opts->options & XT_SYNPROXY_OPT_SACK_PERM) synproxy_init_timestamp_cookie() 161 opts->tsval |= 1 << 4; synproxy_init_timestamp_cookie() 163 if (opts->options & XT_SYNPROXY_OPT_ECN) synproxy_init_timestamp_cookie() 164 opts->tsval |= 1 << 5; synproxy_init_timestamp_cookie() 168 void synproxy_check_timestamp_cookie(struct synproxy_options *opts) synproxy_check_timestamp_cookie() argument 170 opts->wscale = opts->tsecr & 0xf; synproxy_check_timestamp_cookie() 171 if (opts->wscale != 0xf) synproxy_check_timestamp_cookie() 172 opts->options |= XT_SYNPROXY_OPT_WSCALE; synproxy_check_timestamp_cookie() 174 opts->options |= opts->tsecr & (1 << 4) ? XT_SYNPROXY_OPT_SACK_PERM : 0; synproxy_check_timestamp_cookie() 176 opts->options |= opts->tsecr & (1 << 5) ? XT_SYNPROXY_OPT_ECN : 0; synproxy_check_timestamp_cookie() 28 synproxy_parse_options(const struct sk_buff *skb, unsigned int doff, const struct tcphdr *th, struct synproxy_options *opts) synproxy_parse_options() argument 148 synproxy_init_timestamp_cookie(const struct xt_synproxy_info *info, struct synproxy_options *opts) synproxy_init_timestamp_cookie() argument
|
H A D | xt_osf.c | 200 unsigned char opts[MAX_IPOPTLEN]; xt_osf_match_packet() local 223 sizeof(struct tcphdr), optsize, opts); xt_osf_match_packet()
|
/linux-4.1.27/net/ipv4/netfilter/ |
H A D | ipt_SYNPROXY.c | 72 const struct synproxy_options *opts) synproxy_send_client_synack() 78 u16 mss = opts->mss; synproxy_send_client_synack() 82 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_client_synack() 98 if (opts->options & XT_SYNPROXY_OPT_ECN) synproxy_send_client_synack() 105 synproxy_build_options(nth, opts); synproxy_send_client_synack() 114 const struct synproxy_options *opts, u32 recv_seq) synproxy_send_server_syn() 123 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_server_syn() 142 if (opts->options & XT_SYNPROXY_OPT_ECN) synproxy_send_server_syn() 149 synproxy_build_options(nth, opts); synproxy_send_server_syn() 159 const struct synproxy_options *opts) synproxy_send_server_ack() 168 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_server_ack() 189 synproxy_build_options(nth, opts); synproxy_send_server_ack() 197 const struct synproxy_options *opts) synproxy_send_client_ack() 206 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_client_ack() 223 nth->window = ntohs(htons(th->window) >> opts->wscale); synproxy_send_client_ack() 227 synproxy_build_options(nth, opts); synproxy_send_client_ack() 235 struct synproxy_options *opts, u32 recv_seq) synproxy_recv_client_ack() 246 opts->mss = mss; synproxy_recv_client_ack() 247 opts->options |= XT_SYNPROXY_OPT_MSS; synproxy_recv_client_ack() 249 if (opts->options & XT_SYNPROXY_OPT_TIMESTAMP) synproxy_recv_client_ack() 250 synproxy_check_timestamp_cookie(opts); synproxy_recv_client_ack() 252 synproxy_send_server_syn(snet, skb, th, opts, recv_seq); synproxy_recv_client_ack() 261 struct synproxy_options opts = {}; synproxy_tg4() local 271 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) synproxy_tg4() 279 opts.options |= XT_SYNPROXY_OPT_ECN; synproxy_tg4() 281 opts.options &= info->options; synproxy_tg4() 282 if (opts.options & XT_SYNPROXY_OPT_TIMESTAMP) synproxy_tg4() 283 synproxy_init_timestamp_cookie(info, &opts); synproxy_tg4() 285 opts.options &= ~(XT_SYNPROXY_OPT_WSCALE | synproxy_tg4() 289 synproxy_send_client_synack(skb, th, &opts); synproxy_tg4() 294 synproxy_recv_client_ack(snet, skb, th, &opts, ntohl(th->seq)); synproxy_tg4() 309 struct synproxy_options opts = {}; ipv4_synproxy_hook() local 353 if (!synproxy_parse_options(skb, thoff, th, &opts)) ipv4_synproxy_hook() 362 if (synproxy_recv_client_ack(snet, skb, th, &opts, ipv4_synproxy_hook() 370 if (opts.options & XT_SYNPROXY_OPT_TIMESTAMP) ipv4_synproxy_hook() 371 synproxy->its = opts.tsecr; ipv4_synproxy_hook() 377 if (!synproxy_parse_options(skb, thoff, th, &opts)) ipv4_synproxy_hook() 380 if (opts.options & XT_SYNPROXY_OPT_TIMESTAMP) ipv4_synproxy_hook() 381 synproxy->tsoff = opts.tsval - synproxy->its; ipv4_synproxy_hook() 383 opts.options &= ~(XT_SYNPROXY_OPT_MSS | ipv4_synproxy_hook() 387 swap(opts.tsval, opts.tsecr); ipv4_synproxy_hook() 388 synproxy_send_server_ack(snet, state, skb, th, &opts); ipv4_synproxy_hook() 392 swap(opts.tsval, opts.tsecr); ipv4_synproxy_hook() 393 synproxy_send_client_ack(snet, skb, th, &opts); ipv4_synproxy_hook() 71 synproxy_send_client_synack(const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) synproxy_send_client_synack() argument 112 synproxy_send_server_syn(const struct synproxy_net *snet, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts, u32 recv_seq) synproxy_send_server_syn() argument 156 synproxy_send_server_ack(const struct synproxy_net *snet, const struct ip_ct_tcp *state, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) synproxy_send_server_ack() argument 195 synproxy_send_client_ack(const struct synproxy_net *snet, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) synproxy_send_client_ack() argument 233 synproxy_recv_client_ack(const struct synproxy_net *snet, const struct sk_buff *skb, const struct tcphdr *th, struct synproxy_options *opts, u32 recv_seq) synproxy_recv_client_ack() argument
|
/linux-4.1.27/tools/perf/util/ |
H A D | record.c | 98 void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts) perf_evlist__config() argument 108 if (opts->group) perf_evlist__config() 112 opts->no_inherit = true; perf_evlist__config() 117 perf_evsel__config(evsel, opts); evlist__for_each() 143 static int record_opts__config_freq(struct record_opts *opts) record_opts__config_freq() argument 145 bool user_freq = opts->user_freq != UINT_MAX; record_opts__config_freq() 148 if (opts->user_interval != ULLONG_MAX) record_opts__config_freq() 149 opts->default_interval = opts->user_interval; record_opts__config_freq() 151 opts->freq = opts->user_freq; record_opts__config_freq() 156 if (opts->default_interval) record_opts__config_freq() 157 opts->freq = 0; record_opts__config_freq() 158 else if (opts->freq) { record_opts__config_freq() 159 opts->default_interval = opts->freq; record_opts__config_freq() 171 if (user_freq && (max_rate < opts->freq)) { record_opts__config_freq() 182 if (max_rate < opts->freq) { record_opts__config_freq() 187 opts->freq = max_rate; record_opts__config_freq() 193 int record_opts__config(struct record_opts *opts) record_opts__config() argument 195 return record_opts__config_freq(opts); record_opts__config()
|
H A D | parse-options.c | 451 if (!strcmp(arg, "list-opts")) parse_options_step() 560 static void print_option_help(const struct option *opts, int full) print_option_help() argument 565 if (opts->type == OPTION_GROUP) { print_option_help() 567 if (*opts->help) print_option_help() 568 fprintf(stderr, "%s\n", opts->help); print_option_help() 571 if (!full && (opts->flags & PARSE_OPT_HIDDEN)) print_option_help() 573 if (opts->flags & PARSE_OPT_DISABLED) print_option_help() 577 if (opts->short_name) print_option_help() 578 pos += fprintf(stderr, "-%c", opts->short_name); print_option_help() 582 if (opts->long_name && opts->short_name) print_option_help() 584 if (opts->long_name) print_option_help() 585 pos += fprintf(stderr, "--%s", opts->long_name); print_option_help() 587 switch (opts->type) { print_option_help() 594 if (opts->flags & PARSE_OPT_OPTARG) print_option_help() 595 if (opts->long_name) print_option_help() 603 if (opts->flags & PARSE_OPT_NOARG) print_option_help() 607 if (opts->argh) { print_option_help() 608 if (opts->flags & PARSE_OPT_OPTARG) print_option_help() 609 if (opts->long_name) print_option_help() 610 pos += fprintf(stderr, "[=<%s>]", opts->argh); print_option_help() 612 pos += fprintf(stderr, "[<%s>]", opts->argh); print_option_help() 614 pos += fprintf(stderr, " <%s>", opts->argh); print_option_help() 616 if (opts->flags & PARSE_OPT_OPTARG) print_option_help() 617 if (opts->long_name) print_option_help() 642 fprintf(stderr, "%*s%s\n", pad + USAGE_GAP, "", opts->help); print_option_help() 646 const struct option *opts, int full) usage_with_options_internal() 661 if (opts->type != OPTION_GROUP) usage_with_options_internal() 664 for ( ; opts->type != OPTION_END; opts++) usage_with_options_internal() 665 print_option_help(opts, full); usage_with_options_internal() 673 const struct option *opts) usage_with_options() 676 usage_with_options_internal(usagestr, opts, 0); usage_with_options() 681 const struct option *opts, parse_options_usage() 699 for ( ; opts->type != OPTION_END; opts++) { parse_options_usage() 701 if (opts->short_name == *optstr) parse_options_usage() 706 if (opts->long_name == NULL) parse_options_usage() 709 if (!prefixcmp(optstr, opts->long_name)) parse_options_usage() 712 !prefixcmp(optstr + 3, opts->long_name)) parse_options_usage() 716 if (opts->type != OPTION_END) parse_options_usage() 717 print_option_help(opts, 0); parse_options_usage() 746 void set_option_flag(struct option *opts, int shortopt, const char *longopt, set_option_flag() argument 749 for (; opts->type != OPTION_END; opts++) { set_option_flag() 750 if ((shortopt && opts->short_name == shortopt) || set_option_flag() 751 (opts->long_name && longopt && set_option_flag() 752 !strcmp(opts->long_name, longopt))) { set_option_flag() 753 opts->flags |= flag; set_option_flag() 645 usage_with_options_internal(const char * const *usagestr, const struct option *opts, int full) usage_with_options_internal() argument 672 usage_with_options(const char * const *usagestr, const struct option *opts) usage_with_options() argument 680 parse_options_usage(const char * const *usagestr, const struct option *opts, const char *optstr, bool short_opt) parse_options_usage() argument
|
H A D | top.c | 29 struct record_opts *opts = &top->record_opts; perf_top__header_snprintf() local 30 struct target *target = &opts->target; perf_top__header_snprintf() 77 opts->freq ? "Hz" : ""); perf_top__header_snprintf()
|
H A D | evsel.c | 545 struct record_opts *opts) perf_evsel__config_callgraph() 553 if (!opts->branch_stack) { perf_evsel__config_callgraph() 615 void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts) perf_evsel__config() argument 620 bool per_cpu = opts->target.default_per_cpu && !opts->target.per_thread; perf_evsel__config() 623 attr->inherit = !opts->no_inherit; perf_evsel__config() 651 if (!attr->sample_period || (opts->user_freq != UINT_MAX || perf_evsel__config() 652 opts->user_interval != ULLONG_MAX)) { perf_evsel__config() 653 if (opts->freq) { perf_evsel__config() 656 attr->sample_freq = opts->freq; perf_evsel__config() 658 attr->sample_period = opts->default_interval; perf_evsel__config() 671 if (opts->no_samples) perf_evsel__config() 674 if (opts->inherit_stat) perf_evsel__config() 677 if (opts->sample_address) { perf_evsel__config() 691 perf_evsel__config_callgraph(evsel, opts); perf_evsel__config() 693 if (opts->sample_intr_regs) { perf_evsel__config() 698 if (target__has_cpu(&opts->target)) perf_evsel__config() 701 if (opts->period) perf_evsel__config() 707 if (opts->sample_time && perf_evsel__config() 709 (!opts->no_inherit || target__has_cpu(&opts->target) || per_cpu))) perf_evsel__config() 712 if (opts->raw_samples && !evsel->no_aux_samples) { perf_evsel__config() 718 if (opts->sample_address) perf_evsel__config() 721 if (opts->no_buffering) { perf_evsel__config() 725 if (opts->branch_stack && !evsel->no_aux_samples) { perf_evsel__config() 727 attr->branch_sample_type = opts->branch_stack; perf_evsel__config() 730 if (opts->sample_weight) perf_evsel__config() 738 if (opts->sample_transaction) perf_evsel__config() 741 if (opts->running_time) { perf_evsel__config() 760 if (target__none(&opts->target) && perf_evsel__is_group_leader(evsel) && perf_evsel__config() 761 !opts->initial_delay) perf_evsel__config() 769 clockid = opts->clockid; perf_evsel__config() 770 if (opts->use_clockid) { perf_evsel__config() 772 attr->clockid = opts->clockid; perf_evsel__config() 544 perf_evsel__config_callgraph(struct perf_evsel *evsel, struct record_opts *opts) perf_evsel__config_callgraph() argument
|
H A D | kvm-stat.h | 74 struct record_opts opts; member in struct:perf_kvm_stat
|
H A D | evlist.h | 113 void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts); 114 int record_opts__config(struct record_opts *opts);
|
H A D | parse-options.h | 185 const struct option *opts, 219 void set_option_flag(struct option *opts, int sopt, const char *lopt, int flag);
|
H A D | evsel.h | 148 struct record_opts *opts);
|
/linux-4.1.27/include/uapi/linux/netfilter_ipv6/ |
H A D | ip6t_opts.h | 12 __u16 opts[IP6T_OPTS_OPTSNR]; /* opts */ member in struct:ip6t_opts
|
/linux-4.1.27/net/ipv6/netfilter/ |
H A D | ip6t_SYNPROXY.c | 87 const struct synproxy_options *opts) synproxy_send_client_synack() 93 u16 mss = opts->mss; synproxy_send_client_synack() 97 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_client_synack() 113 if (opts->options & XT_SYNPROXY_OPT_ECN) synproxy_send_client_synack() 120 synproxy_build_options(nth, opts); synproxy_send_client_synack() 129 const struct synproxy_options *opts, u32 recv_seq) synproxy_send_server_syn() 138 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_server_syn() 157 if (opts->options & XT_SYNPROXY_OPT_ECN) synproxy_send_server_syn() 164 synproxy_build_options(nth, opts); synproxy_send_server_syn() 174 const struct synproxy_options *opts) synproxy_send_server_ack() 183 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_server_ack() 204 synproxy_build_options(nth, opts); synproxy_send_server_ack() 212 const struct synproxy_options *opts) synproxy_send_client_ack() 221 tcp_hdr_size = sizeof(*nth) + synproxy_options_size(opts); synproxy_send_client_ack() 238 nth->window = ntohs(htons(th->window) >> opts->wscale); synproxy_send_client_ack() 242 synproxy_build_options(nth, opts); synproxy_send_client_ack() 250 struct synproxy_options *opts, u32 recv_seq) synproxy_recv_client_ack() 261 opts->mss = mss; synproxy_recv_client_ack() 262 opts->options |= XT_SYNPROXY_OPT_MSS; synproxy_recv_client_ack() 264 if (opts->options & XT_SYNPROXY_OPT_TIMESTAMP) synproxy_recv_client_ack() 265 synproxy_check_timestamp_cookie(opts); synproxy_recv_client_ack() 267 synproxy_send_server_syn(snet, skb, th, opts, recv_seq); synproxy_recv_client_ack() 276 struct synproxy_options opts = {}; synproxy_tg6() local 286 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) synproxy_tg6() 294 opts.options |= XT_SYNPROXY_OPT_ECN; synproxy_tg6() 296 opts.options &= info->options; synproxy_tg6() 297 if (opts.options & XT_SYNPROXY_OPT_TIMESTAMP) synproxy_tg6() 298 synproxy_init_timestamp_cookie(info, &opts); synproxy_tg6() 300 opts.options &= ~(XT_SYNPROXY_OPT_WSCALE | synproxy_tg6() 304 synproxy_send_client_synack(skb, th, &opts); synproxy_tg6() 309 synproxy_recv_client_ack(snet, skb, th, &opts, ntohl(th->seq)); synproxy_tg6() 324 struct synproxy_options opts = {}; ipv6_synproxy_hook() local 375 if (!synproxy_parse_options(skb, thoff, th, &opts)) ipv6_synproxy_hook() 384 if (synproxy_recv_client_ack(snet, skb, th, &opts, ipv6_synproxy_hook() 392 if (opts.options & XT_SYNPROXY_OPT_TIMESTAMP) ipv6_synproxy_hook() 393 synproxy->its = opts.tsecr; ipv6_synproxy_hook() 399 if (!synproxy_parse_options(skb, thoff, th, &opts)) ipv6_synproxy_hook() 402 if (opts.options & XT_SYNPROXY_OPT_TIMESTAMP) ipv6_synproxy_hook() 403 synproxy->tsoff = opts.tsval - synproxy->its; ipv6_synproxy_hook() 405 opts.options &= ~(XT_SYNPROXY_OPT_MSS | ipv6_synproxy_hook() 409 swap(opts.tsval, opts.tsecr); ipv6_synproxy_hook() 410 synproxy_send_server_ack(snet, state, skb, th, &opts); ipv6_synproxy_hook() 414 swap(opts.tsval, opts.tsecr); ipv6_synproxy_hook() 415 synproxy_send_client_ack(snet, skb, th, &opts); ipv6_synproxy_hook() 86 synproxy_send_client_synack(const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) synproxy_send_client_synack() argument 127 synproxy_send_server_syn(const struct synproxy_net *snet, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts, u32 recv_seq) synproxy_send_server_syn() argument 171 synproxy_send_server_ack(const struct synproxy_net *snet, const struct ip_ct_tcp *state, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) synproxy_send_server_ack() argument 210 synproxy_send_client_ack(const struct synproxy_net *snet, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) synproxy_send_client_ack() argument 248 synproxy_recv_client_ack(const struct synproxy_net *snet, const struct sk_buff *skb, const struct tcphdr *th, struct synproxy_options *opts, u32 recv_seq) synproxy_recv_client_ack() argument
|
H A D | ip6t_hbh.c | 114 if (*tp != (optinfo->opts[temp] & 0xFF00) >> 8) { hbh_mt6() 116 (optinfo->opts[temp] & 0xFF00) >> 8); hbh_mt6() 133 spec_len = optinfo->opts[temp] & 0x00FF; hbh_mt6()
|
/linux-4.1.27/fs/devpts/ |
H A D | inode.c | 153 * Set @opts to mount options specified in @data. If an option is not 160 static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts) parse_mount_options() argument 166 opts->setuid = 0; parse_mount_options() 167 opts->setgid = 0; parse_mount_options() 168 opts->uid = GLOBAL_ROOT_UID; parse_mount_options() 169 opts->gid = GLOBAL_ROOT_GID; parse_mount_options() 170 opts->mode = DEVPTS_DEFAULT_MODE; parse_mount_options() 171 opts->ptmxmode = DEVPTS_DEFAULT_PTMX_MODE; parse_mount_options() 172 opts->max = NR_UNIX98_PTY_MAX; parse_mount_options() 176 opts->newinstance = 0; parse_mount_options() 194 opts->uid = uid; parse_mount_options() 195 opts->setuid = 1; parse_mount_options() 203 opts->gid = gid; parse_mount_options() 204 opts->setgid = 1; parse_mount_options() 209 opts->mode = option & S_IALLUGO; parse_mount_options() 215 opts->ptmxmode = option & S_IALLUGO; parse_mount_options() 220 opts->newinstance = 1; parse_mount_options() 226 opts->max = option; parse_mount_options() 247 struct pts_mount_opts *opts = &fsi->mount_opts; mknod_ptmx() local 283 mode = S_IFCHR|opts->ptmxmode; mknod_ptmx() 316 struct pts_mount_opts *opts = &fsi->mount_opts; devpts_remount() local 319 err = parse_mount_options(data, PARSE_REMOUNT, opts); devpts_remount() 335 struct pts_mount_opts *opts = &fsi->mount_opts; devpts_show_options() local 337 if (opts->setuid) devpts_show_options() 339 from_kuid_munged(&init_user_ns, opts->uid)); devpts_show_options() 340 if (opts->setgid) devpts_show_options() 342 from_kgid_munged(&init_user_ns, opts->gid)); devpts_show_options() 343 seq_printf(seq, ",mode=%03o", opts->mode); devpts_show_options() 345 seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode); devpts_show_options() 346 if (opts->max < NR_UNIX98_PTY_MAX) devpts_show_options() 347 seq_printf(seq, ",max=%d", opts->max); devpts_show_options() 448 struct pts_mount_opts opts; devpts_mount() local 451 error = parse_mount_options(data, PARSE_MOUNT, &opts); devpts_mount() 458 if ((current_user_ns() != &init_user_ns) && !opts.newinstance) devpts_mount() 461 if (opts.newinstance) devpts_mount() 477 memcpy(&(DEVPTS_SB(s))->mount_opts, &opts, sizeof(opts)); devpts_mount() 609 struct pts_mount_opts *opts = &fsi->mount_opts; devpts_pty_new() local 617 inode->i_uid = opts->setuid ? opts->uid : current_fsuid(); devpts_pty_new() 618 inode->i_gid = opts->setgid ? opts->gid : current_fsgid(); devpts_pty_new() 620 init_special_inode(inode, S_IFCHR|opts->mode, device); devpts_pty_new()
|
/linux-4.1.27/fs/fat/ |
H A D | inode.c | 837 struct fat_mount_options *opts = &sbi->options; fat_show_options() local 838 int isvfat = opts->isvfat; fat_show_options() 840 if (!uid_eq(opts->fs_uid, GLOBAL_ROOT_UID)) fat_show_options() 842 from_kuid_munged(&init_user_ns, opts->fs_uid)); fat_show_options() 843 if (!gid_eq(opts->fs_gid, GLOBAL_ROOT_GID)) fat_show_options() 845 from_kgid_munged(&init_user_ns, opts->fs_gid)); fat_show_options() 846 seq_printf(m, ",fmask=%04o", opts->fs_fmask); fat_show_options() 847 seq_printf(m, ",dmask=%04o", opts->fs_dmask); fat_show_options() 848 if (opts->allow_utime) fat_show_options() 849 seq_printf(m, ",allow_utime=%04o", opts->allow_utime); fat_show_options() 857 switch (opts->shortname) { fat_show_options() 875 if (opts->name_check != 'n') fat_show_options() 876 seq_printf(m, ",check=%c", opts->name_check); fat_show_options() 877 if (opts->usefree) fat_show_options() 879 if (opts->quiet) fat_show_options() 881 if (opts->showexec) fat_show_options() 883 if (opts->sys_immutable) fat_show_options() 886 if (opts->dotsOK) fat_show_options() 888 if (opts->nocase) fat_show_options() 891 if (opts->utf8) fat_show_options() 893 if (opts->unicode_xlate) fat_show_options() 895 if (!opts->numtail) fat_show_options() 897 if (opts->rodir) fat_show_options() 900 if (opts->flush) fat_show_options() 902 if (opts->tz_set) { fat_show_options() 903 if (opts->time_offset) fat_show_options() 904 seq_printf(m, ",time_offset=%d", opts->time_offset); fat_show_options() 908 if (opts->errors == FAT_ERRORS_CONT) fat_show_options() 910 else if (opts->errors == FAT_ERRORS_PANIC) fat_show_options() 914 if (opts->nfs == FAT_NFS_NOSTALE_RO) fat_show_options() 916 else if (opts->nfs) fat_show_options() 918 if (opts->discard) fat_show_options() 920 if (opts->dos1xfloppy) fat_show_options() 1022 int silent, int *debug, struct fat_mount_options *opts) parse_options() 1029 opts->isvfat = is_vfat; parse_options() 1031 opts->fs_uid = current_uid(); parse_options() 1032 opts->fs_gid = current_gid(); parse_options() 1033 opts->fs_fmask = opts->fs_dmask = current_umask(); parse_options() 1034 opts->allow_utime = -1; parse_options() 1035 opts->codepage = fat_default_codepage; parse_options() 1036 opts->iocharset = fat_default_iocharset; parse_options() 1038 opts->shortname = VFAT_SFN_DISPLAY_WINNT|VFAT_SFN_CREATE_WIN95; parse_options() 1039 opts->rodir = 0; parse_options() 1041 opts->shortname = 0; parse_options() 1042 opts->rodir = 1; parse_options() 1044 opts->name_check = 'n'; parse_options() 1045 opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0; parse_options() 1046 opts->utf8 = opts->unicode_xlate = 0; parse_options() 1047 opts->numtail = 1; parse_options() 1048 opts->usefree = opts->nocase = 0; parse_options() 1049 opts->tz_set = 0; parse_options() 1050 opts->nfs = 0; parse_options() 1051 opts->errors = FAT_ERRORS_RO; parse_options() 1071 opts->name_check = 's'; parse_options() 1074 opts->name_check = 'r'; parse_options() 1077 opts->name_check = 'n'; parse_options() 1080 opts->usefree = 1; parse_options() 1084 opts->nocase = 1; parse_options() 1087 opts->shortname = VFAT_SFN_DISPLAY_WIN95 parse_options() 1092 opts->quiet = 1; parse_options() 1095 opts->showexec = 1; parse_options() 1101 opts->sys_immutable = 1; parse_options() 1106 opts->fs_uid = make_kuid(current_user_ns(), option); parse_options() 1107 if (!uid_valid(opts->fs_uid)) parse_options() 1113 opts->fs_gid = make_kgid(current_user_ns(), option); parse_options() 1114 if (!gid_valid(opts->fs_gid)) parse_options() 1120 opts->fs_fmask = opts->fs_dmask = option; parse_options() 1125 opts->fs_dmask = option; parse_options() 1130 opts->fs_fmask = option; parse_options() 1135 opts->allow_utime = option & (S_IWGRP | S_IWOTH); parse_options() 1140 opts->codepage = option; parse_options() 1143 opts->flush = 1; parse_options() 1150 opts->tz_set = 1; parse_options() 1151 opts->time_offset = option; parse_options() 1154 opts->tz_set = 1; parse_options() 1155 opts->time_offset = 0; parse_options() 1158 opts->errors = FAT_ERRORS_CONT; parse_options() 1161 opts->errors = FAT_ERRORS_PANIC; parse_options() 1164 opts->errors = FAT_ERRORS_RO; parse_options() 1167 opts->nfs = FAT_NFS_STALE_RW; parse_options() 1170 opts->nfs = FAT_NFS_NOSTALE_RO; parse_options() 1173 opts->dos1xfloppy = 1; parse_options() 1178 opts->dotsOK = 1; parse_options() 1181 opts->dotsOK = 0; parse_options() 1186 if (opts->iocharset != fat_default_iocharset) parse_options() 1187 kfree(opts->iocharset); parse_options() 1191 opts->iocharset = iocharset; parse_options() 1194 opts->shortname = VFAT_SFN_DISPLAY_LOWER parse_options() 1198 opts->shortname = VFAT_SFN_DISPLAY_WIN95 parse_options() 1202 opts->shortname = VFAT_SFN_DISPLAY_WINNT parse_options() 1206 opts->shortname = VFAT_SFN_DISPLAY_WINNT parse_options() 1210 opts->utf8 = 0; parse_options() 1213 opts->utf8 = 1; parse_options() 1216 opts->unicode_xlate = 0; parse_options() 1219 opts->unicode_xlate = 1; parse_options() 1222 opts->numtail = 1; /* negated option */ parse_options() 1225 opts->numtail = 0; /* negated option */ parse_options() 1228 opts->rodir = 1; parse_options() 1231 opts->discard = 1; parse_options() 1252 if (!strcmp(opts->iocharset, "utf8")) { parse_options() 1259 if (opts->allow_utime == (unsigned short)-1) parse_options() 1260 opts->allow_utime = ~opts->fs_dmask & (S_IWGRP | S_IWOTH); parse_options() 1261 if (opts->unicode_xlate) parse_options() 1262 opts->utf8 = 0; parse_options() 1263 if (opts->nfs == FAT_NFS_NOSTALE_RO) { parse_options() 1021 parse_options(struct super_block *sb, char *options, int is_vfat, int silent, int *debug, struct fat_mount_options *opts) parse_options() argument
|
H A D | namei_msdos.c | 18 unsigned char *res, struct fat_mount_options *opts) msdos_format_name() 21 * the resulting name, opts->name_check is either (r)elaxed, msdos_format_name() 22 * (n)ormal or (s)trict, opts->dotsOK allows dots at the msdos_format_name() 31 if (opts->dotsOK) { msdos_format_name() 46 if (opts->name_check != 'r' && strchr(bad_chars, c)) msdos_format_name() 48 if (opts->name_check == 's' && strchr(bad_if_strict, c)) msdos_format_name() 50 if (c >= 'A' && c <= 'Z' && opts->name_check == 's') msdos_format_name() 67 *walk = (!opts->nocase && c >= 'a' && c <= 'z') ? c - 32 : c; msdos_format_name() 71 if (opts->name_check == 's' && len && c != '.') { msdos_format_name() 85 if (opts->name_check != 'r' && strchr(bad_chars, c)) msdos_format_name() 87 if (opts->name_check == 's' && msdos_format_name() 93 if (opts->name_check == 's') msdos_format_name() 97 if (c >= 'A' && c <= 'Z' && opts->name_check == 's') msdos_format_name() 100 if (!opts->nocase && c >= 'a' && c <= 'z') msdos_format_name() 107 if (opts->name_check == 's' && len) msdos_format_name() 17 msdos_format_name(const unsigned char *name, int len, unsigned char *res, struct fat_mount_options *opts) msdos_format_name() argument
|
H A D | misc.c | 21 struct fat_mount_options *opts = &MSDOS_SB(sb)->options; __fat_fs_error() local 33 if (opts->errors == FAT_ERRORS_PANIC) __fat_fs_error() 35 else if (opts->errors == FAT_ERRORS_RO && !(sb->s_flags & MS_RDONLY)) { __fat_fs_error()
|
H A D | namei_vfat.c | 317 struct fat_mount_options *opts = &MSDOS_SB(dir->i_sb)->options; vfat_create_shortname() local 437 if (opts->shortname & VFAT_SFN_CREATE_WIN95) { vfat_create_shortname() 439 } else if (opts->shortname & VFAT_SFN_CREATE_WINNT) { vfat_create_shortname() 454 if (opts->numtail == 0) vfat_create_shortname() 584 struct fat_mount_options *opts = &sbi->options; vfat_build_slots() local 602 opts->unicode_xlate, opts->utf8, sbi->nls_io); vfat_build_slots()
|
/linux-4.1.27/drivers/usb/gadget/legacy/ |
H A D | mass_storage.c | 135 struct fsg_opts *opts; msg_do_config() local 143 opts = fsg_opts_from_func_inst(fi_msg); msg_do_config() 174 struct fsg_opts *opts; msg_bind() local 183 opts = fsg_opts_from_func_inst(fi_msg); msg_bind() 185 opts->no_configfs = true; msg_bind() 186 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); msg_bind() 190 fsg_common_set_ops(opts->common, &ops); msg_bind() 192 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); msg_bind() 196 fsg_common_set_sysfs(opts->common, true); msg_bind() 197 status = fsg_common_create_luns(opts->common, &config); msg_bind() 201 fsg_common_set_inquiry_string(opts->common, config.vendor_name, msg_bind() 220 fsg_common_remove_luns(opts->common); msg_bind() 222 fsg_common_free_buffers(opts->common); msg_bind()
|
H A D | acm_ms.c | 126 struct fsg_opts *opts; acm_ms_do_config() local 134 opts = fsg_opts_from_func_inst(fi_msg); acm_ms_do_config() 176 struct fsg_opts *opts; acm_ms_bind() local 192 opts = fsg_opts_from_func_inst(fi_msg); acm_ms_bind() 194 opts->no_configfs = true; acm_ms_bind() 195 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); acm_ms_bind() 199 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); acm_ms_bind() 203 fsg_common_set_sysfs(opts->common, true); acm_ms_bind() 204 status = fsg_common_create_luns(opts->common, &config); acm_ms_bind() 208 fsg_common_set_inquiry_string(opts->common, config.vendor_name, acm_ms_bind() 232 fsg_common_remove_luns(opts->common); acm_ms_bind() 234 fsg_common_free_buffers(opts->common); acm_ms_bind()
|
H A D | printer.c | 157 struct f_printer_opts *opts; printer_bind() local 171 opts = container_of(fi_printer, struct f_printer_opts, func_inst); printer_bind() 172 opts->minor = 0; printer_bind() 173 memcpy(opts->pnp_string, pnp_string, PNP_STRING_LEN); printer_bind() 174 opts->q_len = QLEN; printer_bind()
|
H A D | g_ffs.c | 197 struct f_fs_opts *opts; gfs_init() local 232 opts = to_f_fs_opts(fi_ffs[i]); gfs_init() 234 ret = ffs_single_dev(opts->dev); gfs_init() 236 ret = ffs_name_dev(opts->dev, func_names[i]); gfs_init() 239 opts->dev->ffs_ready_callback = functionfs_ready_callback; gfs_init() 240 opts->dev->ffs_closed_callback = functionfs_closed_callback; gfs_init() 241 opts->dev->ffs_acquire_dev_callback = functionfs_acquire_dev; gfs_init() 242 opts->dev->ffs_release_dev_callback = functionfs_release_dev; gfs_init() 243 opts->no_configfs = true; gfs_init()
|
H A D | inode.c | 1961 gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) gadgetfs_fill_super() argument 2019 const char *path, void *opts) gadgetfs_mount() 2021 return mount_single (t, flags, opts, gadgetfs_fill_super); gadgetfs_mount() 2018 gadgetfs_mount(struct file_system_type *t, int flags, const char *path, void *opts) gadgetfs_mount() argument
|
/linux-4.1.27/include/net/netfilter/ |
H A D | nf_conntrack_synproxy.h | 61 struct synproxy_options *opts); 62 unsigned int synproxy_options_size(const struct synproxy_options *opts); 64 const struct synproxy_options *opts); 67 struct synproxy_options *opts); 68 void synproxy_check_timestamp_cookie(struct synproxy_options *opts);
|
/linux-4.1.27/fs/squashfs/ |
H A D | xz_wrapper.c | 55 struct comp_opts *opts; squashfs_xz_comp_opts() local 58 opts = kmalloc(sizeof(*opts), GFP_KERNEL); squashfs_xz_comp_opts() 59 if (opts == NULL) { squashfs_xz_comp_opts() 71 opts->dict_size = le32_to_cpu(comp_opts->dictionary_size); squashfs_xz_comp_opts() 74 n = ffs(opts->dict_size) - 1; squashfs_xz_comp_opts() 75 if (opts->dict_size != (1 << n) && opts->dict_size != (1 << n) + squashfs_xz_comp_opts() 82 opts->dict_size = max_t(int, msblk->block_size, squashfs_xz_comp_opts() 85 return opts; squashfs_xz_comp_opts() 88 kfree(opts); squashfs_xz_comp_opts()
|
/linux-4.1.27/scripts/ |
H A D | checkkconfigsymbols.py | 65 (opts, _) = parser.parse_args() 67 if opts.commit and opts.diff: 70 if opts.diff and not re.match(r"^[\w\-\.]+\.\.[\w\-\.]+$", opts.diff): 74 if opts.commit or opts.diff: 75 if not opts.force and tree_is_dirty(): 83 return opts 88 opts = parse_options() 90 if opts.commit or opts.diff: 96 if opts.commit: 97 commit_a = opts.commit + "~" 98 commit_b = opts.commit 99 elif opts.diff: 100 split = opts.diff.split("..")
|
H A D | sign-file | 15 my %opts; 16 getopts('vs:', \%opts) or die $USAGE; 17 my $verbose = $opts{'v'}; 18 my $signature_file = $opts{'s'};
|
/linux-4.1.27/tools/perf/ |
H A D | builtin-record.c | 38 struct record_opts opts; member in struct:record 142 struct record_opts *opts = &rec->opts; record__open() local 145 perf_evlist__config(evlist, opts); record__open() 157 perf_evsel__open_strerror(pos, &opts->target, evlist__for_each() 172 if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) { 178 "(current value: %u)\n", opts->mmap_pages); 306 if (!rec->opts.branch_stack) record__init_features() 334 struct record_opts *opts = &rec->opts; __cmd_record() local 359 err = perf_evlist__prepare_workload(rec->evlist, &opts->target, __cmd_record() 443 err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->threads, __cmd_record() 444 process_synthesized_event, opts->sample_address); __cmd_record() 464 if (!target__none(&opts->target) && !opts->initial_delay) __cmd_record() 473 if (opts->initial_delay) { __cmd_record() 474 usleep(opts->initial_delay * 1000); __cmd_record() 507 if (done && !disabled && !target__none(&opts->target)) { __cmd_record() 759 struct record_opts *opts = (struct record_opts *)opt->value; parse_clockid() local 764 opts->use_clockid = 0; parse_clockid() 773 if (opts->use_clockid) parse_clockid() 776 opts->use_clockid = true; parse_clockid() 779 if (sscanf(str, "%d", &opts->clockid) == 1) parse_clockid() 788 opts->clockid = cm->clockid; parse_clockid() 793 opts->use_clockid = false; parse_clockid() 816 .opts = { 857 OPT_STRING('p', "pid", &record.opts.target.pid, "pid", 859 OPT_STRING('t', "tid", &record.opts.target.tid, "tid", 863 OPT_BOOLEAN(0, "no-buffering", &record.opts.no_buffering, 865 OPT_BOOLEAN('R', "raw-samples", &record.opts.raw_samples, 867 OPT_BOOLEAN('a', "all-cpus", &record.opts.target.system_wide, 869 OPT_STRING('C', "cpu", &record.opts.target.cpu_list, "cpu", 871 OPT_U64('c', "count", &record.opts.user_interval, "event period to sample"), 874 OPT_BOOLEAN_SET('i', "no-inherit", &record.opts.no_inherit, 875 &record.opts.no_inherit_set, 877 OPT_UINTEGER('F', "freq", &record.opts.user_freq, "profile at this frequency"), 878 OPT_CALLBACK('m', "mmap-pages", &record.opts.mmap_pages, "pages", 881 OPT_BOOLEAN(0, "group", &record.opts.group, 883 OPT_CALLBACK_NOOPT('g', NULL, &record.opts, 886 OPT_CALLBACK(0, "call-graph", &record.opts, 892 OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat, 894 OPT_BOOLEAN('d', "data", &record.opts.sample_address, 896 OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Sample timestamps"), 897 OPT_BOOLEAN('P', "period", &record.opts.period, "Sample period"), 898 OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples, 907 OPT_UINTEGER('D', "delay", &record.opts.initial_delay, 909 OPT_STRING('u', "uid", &record.opts.target.uid_str, "user", 912 OPT_CALLBACK_NOOPT('b', "branch-any", &record.opts.branch_stack, 916 OPT_CALLBACK('j', "branch-filter", &record.opts.branch_stack, 919 OPT_BOOLEAN('W', "weight", &record.opts.sample_weight, 921 OPT_BOOLEAN(0, "transaction", &record.opts.sample_transaction, 923 OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread, 925 OPT_BOOLEAN('I', "intr-regs", &record.opts.sample_intr_regs, 927 OPT_BOOLEAN(0, "running-time", &record.opts.running_time, 929 OPT_CALLBACK('k', "clockid", &record.opts, 951 if (!argc && target__none(&rec->opts.target)) cmd_record() 954 if (nr_cgroups && !rec->opts.target.system_wide) { cmd_record() 981 if (rec->opts.target.tid && !rec->opts.no_inherit_set) cmd_record() 982 rec->opts.no_inherit = true; cmd_record() 984 err = target__validate(&rec->opts.target); cmd_record() 986 target__strerror(&rec->opts.target, err, errbuf, BUFSIZ); cmd_record() 990 err = target__parse_uid(&rec->opts.target); cmd_record() 994 target__strerror(&rec->opts.target, err, errbuf, BUFSIZ); cmd_record() 1002 if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0) cmd_record() 1005 if (record_opts__config(&rec->opts)) { cmd_record()
|
H A D | perf-completion.sh | 156 cmds=$($cmd --list-opts) 178 opts=$($cmd $subcmd --list-opts) 179 __perfcomp "$opts" "$cur"
|
H A D | builtin-kvm.c | 547 if (kvm->opts.target.system_wide) print_vcpu_info() 549 else if (kvm->opts.target.pid) print_vcpu_info() 550 pr_info("pid(s) %s, ", kvm->opts.target.pid); print_vcpu_info() 984 perf_evlist__config(evlist, &kvm->opts); kvm_live_open_events() 1024 if (perf_evlist__mmap(evlist, kvm->opts.mmap_pages, false) < 0) { 1078 if (kvm->opts.target.pid) { parse_target_str() 1079 kvm->pid_list = intlist__new(kvm->opts.target.pid); parse_target_str() 1206 OPT_STRING('p', "pid", &kvm->opts.target.pid, "pid", kvm_events_report() 1226 if (!kvm->opts.target.pid) kvm_events_report() 1227 kvm->opts.target.system_wide = true; kvm_events_report() 1289 OPT_STRING('p', "pid", &kvm->opts.target.pid, "pid", kvm_events_live() 1291 OPT_CALLBACK('m', "mmap-pages", &kvm->opts.mmap_pages, "pages", kvm_events_live() 1296 OPT_BOOLEAN('a', "all-cpus", &kvm->opts.target.system_wide, kvm_events_live() 1334 kvm->opts.user_interval = 1; kvm_events_live() 1335 kvm->opts.mmap_pages = 512; kvm_events_live() 1336 kvm->opts.target.uses_mmap = false; kvm_events_live() 1337 kvm->opts.target.uid_str = NULL; kvm_events_live() 1338 kvm->opts.target.uid = UINT_MAX; kvm_events_live() 1358 err = target__validate(&kvm->opts.target); kvm_events_live() 1360 target__strerror(&kvm->opts.target, err, errbuf, BUFSIZ); kvm_events_live() 1364 if (target__none(&kvm->opts.target)) kvm_events_live() 1365 kvm->opts.target.system_wide = true; kvm_events_live() 1379 if (perf_evlist__create_maps(kvm->evlist, &kvm->opts.target) < 0) kvm_events_live() 1393 machine__synthesize_threads(&kvm->session->machines.host, &kvm->opts.target, kvm_events_live()
|
H A D | builtin-top.c | 880 struct record_opts *opts = &top->record_opts; perf_top__start_counters() local 882 perf_evlist__config(evlist, opts); perf_top__start_counters() 894 perf_evsel__open_strerror(counter, &opts->target, evlist__for_each() 901 if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) { 932 struct record_opts *opts = &top->record_opts; __cmd_top() local 952 machine__synthesize_threads(&top->session->machines.host, &opts->target, __cmd_top() 969 if (!target__none(&opts->target)) __cmd_top() 1067 struct record_opts *opts = &top.record_opts; cmd_top() local 1068 struct target *target = &opts->target; cmd_top() 1073 OPT_U64('c', "count", &opts->user_interval, "event period to sample"), cmd_top() 1088 OPT_CALLBACK('m', "mmap-pages", &opts->mmap_pages, "pages", cmd_top() 1099 OPT_BOOLEAN(0, "group", &opts->group, cmd_top() 1101 OPT_BOOLEAN('i', "no-inherit", &opts->no_inherit, cmd_top() 1106 OPT_UINTEGER('F', "freq", &opts->user_freq, "profile at this frequency"), cmd_top() 1237 if (record_opts__config(opts)) { cmd_top()
|
H A D | builtin-trace.c | 1226 struct record_opts opts; member in struct:trace 1435 err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target, trace__symbols_init() 2013 if (trace->opts.target.pid) { parse_target_str() 2014 trace->pid_list = intlist__new(trace->opts.target.pid); parse_target_str() 2021 if (trace->opts.target.tid) { parse_target_str() 2022 trace->tid_list = intlist__new(trace->opts.target.tid); parse_target_str() 2194 err = perf_evlist__create_maps(evlist, &trace->opts.target); trace__run() 2206 perf_evlist__config(evlist, &trace->opts); trace__run() 2212 err = perf_evlist__prepare_workload(evlist, &trace->opts.target, trace__run() 2240 err = perf_evlist__mmap(evlist, trace->opts.mmap_pages, false); trace__run() 2244 if (!target__none(&trace->opts.target)) trace__run() 2646 .opts = { cmd_trace() 2673 OPT_STRING('p', "pid", &trace.opts.target.pid, "pid", cmd_trace() 2675 OPT_STRING('t', "tid", &trace.opts.target.tid, "tid", cmd_trace() 2679 OPT_BOOLEAN('a', "all-cpus", &trace.opts.target.system_wide, cmd_trace() 2681 OPT_STRING('C', "cpu", &trace.opts.target.cpu_list, "cpu", cmd_trace() 2683 OPT_BOOLEAN(0, "no-inherit", &trace.opts.no_inherit, cmd_trace() 2685 OPT_CALLBACK('m', "mmap-pages", &trace.opts.mmap_pages, "pages", cmd_trace() 2688 OPT_STRING('u', "uid", &trace.opts.target.uid_str, "user", cmd_trace() 2727 trace.opts.sample_address = true; cmd_trace() 2728 trace.opts.sample_time = true; cmd_trace() 2770 err = target__validate(&trace.opts.target); cmd_trace() 2772 target__strerror(&trace.opts.target, err, bf, sizeof(bf)); cmd_trace() 2777 err = target__parse_uid(&trace.opts.target); cmd_trace() 2779 target__strerror(&trace.opts.target, err, bf, sizeof(bf)); cmd_trace() 2784 if (!argc && target__none(&trace.opts.target)) cmd_trace() 2785 trace.opts.target.system_wide = true; cmd_trace()
|
H A D | perf.c | 141 OPT_ARGUMENT("list-opts", "list-opts"), 246 } else if (!strcmp(cmd, "--list-opts")) { handle_options()
|
/linux-4.1.27/drivers/scsi/aic7xxx/ |
H A D | Makefile | 53 aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ 59 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ 70 aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ 76 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
|
/linux-4.1.27/fs/hfsplus/ |
H A D | options.c | 48 void hfsplus_fill_defaults(struct hfsplus_sb_info *opts) hfsplus_fill_defaults() argument 50 if (!opts) hfsplus_fill_defaults() 53 opts->creator = HFSPLUS_DEF_CR_TYPE; hfsplus_fill_defaults() 54 opts->type = HFSPLUS_DEF_CR_TYPE; hfsplus_fill_defaults() 55 opts->umask = current_umask(); hfsplus_fill_defaults() 56 opts->uid = current_uid(); hfsplus_fill_defaults() 57 opts->gid = current_gid(); hfsplus_fill_defaults() 58 opts->part = -1; hfsplus_fill_defaults() 59 opts->session = -1; hfsplus_fill_defaults()
|
H A D | hfsplus_fs.h | 494 void hfsplus_fill_defaults(struct hfsplus_sb_info *opts);
|
/linux-4.1.27/tools/perf/tests/ |
H A D | open-syscall-tp-fields.c | 10 struct record_opts opts = { test__syscall_open_tp_fields() local 40 err = perf_evlist__create_maps(evlist, &opts.target); test__syscall_open_tp_fields() 46 perf_evsel__config(evsel, &opts); test__syscall_open_tp_fields()
|
H A D | keep-tracking.c | 54 struct record_opts opts = { test__keep_tracking() local 84 perf_evlist__config(evlist, &opts); test__keep_tracking()
|
H A D | perf-record.c | 37 struct record_opts opts = { test__PERF_RECORD() local 75 err = perf_evlist__create_maps(evlist, &opts.target); test__PERF_RECORD() 87 err = perf_evlist__prepare_workload(evlist, &opts.target, argv, false, NULL); test__PERF_RECORD() 100 perf_evlist__config(evlist, &opts); test__PERF_RECORD() 136 err = perf_evlist__mmap(evlist, opts.mmap_pages, false); test__PERF_RECORD()
|
H A D | perf-time-to-tsc.c | 38 struct record_opts opts = { test__perf_time_to_tsc() local 73 perf_evlist__config(evlist, &opts); test__perf_time_to_tsc()
|
H A D | code-reading.c | 390 struct record_opts opts = { do_test_code_reading() local 491 perf_evlist__config(evlist, &opts); do_test_code_reading()
|
H A D | switch-tracking.c | 312 struct record_opts opts = { test__switch_tracking() local 420 perf_evlist__config(evlist, &opts); test__switch_tracking()
|
/linux-4.1.27/net/9p/ |
H A D | trans_rdma.c | 168 * @opts: rdma transport-specific structure to parse options into 172 static int parse_opts(char *params, struct p9_rdma_opts *opts) parse_opts() argument 179 opts->port = P9_PORT; parse_opts() 180 opts->sq_depth = P9_RDMA_SQ_DEPTH; parse_opts() 181 opts->rq_depth = P9_RDMA_RQ_DEPTH; parse_opts() 182 opts->timeout = P9_RDMA_TIMEOUT; parse_opts() 183 opts->privport = 0; parse_opts() 212 opts->port = option; parse_opts() 215 opts->sq_depth = option; parse_opts() 218 opts->rq_depth = option; parse_opts() 221 opts->timeout = option; parse_opts() 224 opts->privport = 1; parse_opts() 231 opts->rq_depth = max(opts->rq_depth, opts->sq_depth); parse_opts() 579 * @opts: Mount options structure 581 static struct p9_trans_rdma *alloc_rdma(struct p9_rdma_opts *opts) alloc_rdma() argument 589 rdma->sq_depth = opts->sq_depth; alloc_rdma() 590 rdma->rq_depth = opts->rq_depth; alloc_rdma() 591 rdma->timeout = opts->timeout; alloc_rdma() 646 struct p9_rdma_opts opts; rdma_create_trans() local 653 err = parse_opts(args, &opts); rdma_create_trans() 658 rdma = alloc_rdma(&opts); rdma_create_trans() 672 if (opts.privport) { rdma_create_trans() 684 rdma->addr.sin_port = htons(opts.port); rdma_create_trans() 710 opts.sq_depth + opts.rq_depth + 1, 0); rdma_create_trans() 735 qp_attr.cap.max_send_wr = opts.sq_depth; rdma_create_trans() 736 qp_attr.cap.max_recv_wr = opts.rq_depth; rdma_create_trans()
|
H A D | trans_fd.c | 722 * @opts: fd transport-specific structure to parse options into 727 static int parse_opts(char *params, struct p9_fd_opts *opts) parse_opts() argument 734 opts->port = P9_PORT; parse_opts() 735 opts->rfd = ~0; parse_opts() 736 opts->wfd = ~0; parse_opts() 737 opts->privport = 0; parse_opts() 766 opts->port = option; parse_opts() 769 opts->rfd = option; parse_opts() 772 opts->wfd = option; parse_opts() 775 opts->privport = 1; parse_opts() 930 struct p9_fd_opts opts; p9_fd_create_tcp() local 932 err = parse_opts(args, &opts); p9_fd_create_tcp() 943 sin_server.sin_port = htons(opts.port); p9_fd_create_tcp() 952 if (opts.privport) { p9_fd_create_tcp() 1016 struct p9_fd_opts opts; p9_fd_create() local 1018 parse_opts(args, &opts); p9_fd_create() 1020 if (opts.rfd == ~0 || opts.wfd == ~0) { p9_fd_create() 1025 err = p9_fd_open(client, opts.rfd, opts.wfd); p9_fd_create()
|
H A D | client.c | 116 * @opts: options string passed from mount 122 static int parse_opts(char *opts, struct p9_client *clnt) parse_opts() argument 134 if (!opts) parse_opts() 137 tmp_options = kstrdup(opts, GFP_KERNEL); parse_opts()
|
/linux-4.1.27/arch/arm/mach-davinci/ |
H A D | time.c | 94 unsigned long opts; member in struct:timer_s 104 /* values for 'opts' field of struct timer_s */ 111 #define USING_COMPARE(t) ((t)->opts & TIMER_OPTS_USE_COMPARE) 150 if (t->opts & TIMER_OPTS_ONESHOT) timer32_config() 152 else if (t->opts & TIMER_OPTS_PERIODIC) timer32_config() 182 .opts = TIMER_OPTS_DISABLED, 191 .opts = TIMER_OPTS_PERIODIC, 314 t->opts &= ~TIMER_OPTS_STATE_MASK; davinci_set_mode() 315 t->opts |= TIMER_OPTS_PERIODIC; davinci_set_mode() 319 t->opts &= ~TIMER_OPTS_STATE_MASK; davinci_set_mode() 320 t->opts |= TIMER_OPTS_ONESHOT; davinci_set_mode() 324 t->opts &= ~TIMER_OPTS_STATE_MASK; davinci_set_mode() 325 t->opts |= TIMER_OPTS_DISABLED; davinci_set_mode() 372 timers[TID_CLOCKEVENT].opts |= TIMER_OPTS_USE_COMPARE; davinci_timer_init()
|
/linux-4.1.27/arch/um/drivers/ |
H A D | null.c | 15 static void *null_init(char *str, int device, const struct chan_opts *opts) null_init() argument
|
H A D | fd.c | 22 static void *fd_init(char *str, int device, const struct chan_opts *opts) fd_init() argument 46 .raw = opts->raw }); fd_init()
|
H A D | tty.c | 19 static void *tty_chan_init(char *str, int device, const struct chan_opts *opts) tty_chan_init() argument 34 .raw = opts->raw }); tty_chan_init()
|
H A D | ssl.c | 32 static struct chan_opts opts = { variable in typeref:struct:chan_opts 74 return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts, ssl_config() 164 new_title = add_xterm_umid(opts.xterm_title); ssl_init() 166 opts.xterm_title = new_title; ssl_init() 173 if (setup_one_line(serial_lines, i, s, &opts, &error)) ssl_init()
|
H A D | stdio_console.c | 37 static struct chan_opts opts = { variable in typeref:struct:chan_opts 79 return line_config(vts, ARRAY_SIZE(vts), str, &opts, error_out); con_config() 163 new_title = add_xterm_umid(opts.xterm_title); stdio_init() 165 opts.xterm_title = new_title; stdio_init() 174 if (setup_one_line(vts, i, s, &opts, &error)) stdio_init()
|
H A D | pty.c | 26 static void *pty_chan_init(char *str, int device, const struct chan_opts *opts) pty_chan_init() argument 34 *data = ((struct pty_chan) { .announce = opts->announce, pty_chan_init() 36 .raw = opts->raw }); pty_chan_init()
|
H A D | xterm.c | 27 static void *xterm_init(char *str, int device, const struct chan_opts *opts) xterm_init() argument 37 .title = opts->xterm_title, xterm_init() 38 .raw = opts->raw } ); xterm_init()
|
H A D | line.h | 86 const struct chan_opts *opts, char **error_out); 90 char *str, const struct chan_opts *opts,
|
H A D | port_user.c | 24 static void *port_init(char *str, int device, const struct chan_opts *opts) port_init() argument 52 *data = ((struct port_chan) { .raw = opts->raw, port_init()
|
H A D | chan.h | 32 const struct chan_opts *opts, char **error_out);
|
H A D | chan_kern.c | 15 const struct chan_opts *opts) not_configged_init() 448 const struct chan_opts *opts, char **error_out) parse_chan() 471 data = (*ops->init)(str, device, opts); parse_chan() 498 const struct chan_opts *opts, char **error_out) parse_chan_pair() 518 new = parse_chan(line, in, device, opts, error_out); parse_chan_pair() 526 new = parse_chan(line, out, device, opts, error_out); parse_chan_pair() 535 new = parse_chan(line, str, device, opts, error_out); parse_chan_pair() 14 not_configged_init(char *str, int device, const struct chan_opts *opts) not_configged_init() argument 447 parse_chan(struct line *line, char *str, int device, const struct chan_opts *opts, char **error_out) parse_chan() argument 497 parse_chan_pair(char *str, struct line *line, int device, const struct chan_opts *opts, char **error_out) parse_chan_pair() argument
|
H A D | line.c | 374 const struct chan_opts *opts, char **error_out) setup_one_line() 390 parse_chan_pair(NULL, line, n, opts, error_out); setup_one_line() 405 err = parse_chan_pair(new, line, n, opts, error_out); setup_one_line() 412 parse_chan_pair(NULL, line, n, opts, error_out); setup_one_line() 466 const struct chan_opts *opts, char **error_out) line_config() 486 return setup_one_line(lines, n, end, opts, error_out); line_config() 373 setup_one_line(struct line *lines, int n, char *init, const struct chan_opts *opts, char **error_out) setup_one_line() argument 465 line_config(struct line *lines, unsigned int num, char *str, const struct chan_opts *opts, char **error_out) line_config() argument
|
/linux-4.1.27/net/bluetooth/ |
H A D | l2cap_sock.c | 396 struct l2cap_options opts; l2cap_sock_getsockopt_old() local 420 memset(&opts, 0, sizeof(opts)); l2cap_sock_getsockopt_old() 421 opts.imtu = chan->imtu; l2cap_sock_getsockopt_old() 422 opts.omtu = chan->omtu; l2cap_sock_getsockopt_old() 423 opts.flush_to = chan->flush_to; l2cap_sock_getsockopt_old() 424 opts.mode = chan->mode; l2cap_sock_getsockopt_old() 425 opts.fcs = chan->fcs; l2cap_sock_getsockopt_old() 426 opts.max_tx = chan->max_tx; l2cap_sock_getsockopt_old() 427 opts.txwin_size = chan->tx_win; l2cap_sock_getsockopt_old() 429 len = min_t(unsigned int, len, sizeof(opts)); l2cap_sock_getsockopt_old() 430 if (copy_to_user(optval, (char *) &opts, len)) l2cap_sock_getsockopt_old() 635 struct l2cap_options opts; l2cap_sock_setsockopt_old() local 655 opts.imtu = chan->imtu; l2cap_sock_setsockopt_old() 656 opts.omtu = chan->omtu; l2cap_sock_setsockopt_old() 657 opts.flush_to = chan->flush_to; l2cap_sock_setsockopt_old() 658 opts.mode = chan->mode; l2cap_sock_setsockopt_old() 659 opts.fcs = chan->fcs; l2cap_sock_setsockopt_old() 660 opts.max_tx = chan->max_tx; l2cap_sock_setsockopt_old() 661 opts.txwin_size = chan->tx_win; l2cap_sock_setsockopt_old() 663 len = min_t(unsigned int, sizeof(opts), optlen); l2cap_sock_setsockopt_old() 664 if (copy_from_user((char *) &opts, optval, len)) { l2cap_sock_setsockopt_old() 669 if (opts.txwin_size > L2CAP_DEFAULT_EXT_WINDOW) { l2cap_sock_setsockopt_old() 674 if (!l2cap_valid_mtu(chan, opts.imtu)) { l2cap_sock_setsockopt_old() 679 chan->mode = opts.mode; l2cap_sock_setsockopt_old() 696 chan->imtu = opts.imtu; l2cap_sock_setsockopt_old() 697 chan->omtu = opts.omtu; l2cap_sock_setsockopt_old() 698 chan->fcs = opts.fcs; l2cap_sock_setsockopt_old() 699 chan->max_tx = opts.max_tx; l2cap_sock_setsockopt_old() 700 chan->tx_win = opts.txwin_size; l2cap_sock_setsockopt_old() 701 chan->flush_to = opts.flush_to; l2cap_sock_setsockopt_old()
|
H A D | sco.c | 853 struct sco_options opts; sco_sock_getsockopt_old() local 873 opts.mtu = sco_pi(sk)->conn->mtu; sco_sock_getsockopt_old() 875 BT_DBG("mtu %d", opts.mtu); sco_sock_getsockopt_old() 877 len = min_t(unsigned int, len, sizeof(opts)); sco_sock_getsockopt_old() 878 if (copy_to_user(optval, (char *)&opts, len)) sco_sock_getsockopt_old()
|
/linux-4.1.27/net/sched/ |
H A D | sch_dsmark.c | 420 struct nlattr *opts = NULL; dsmark_dump_class() local 430 opts = nla_nest_start(skb, TCA_OPTIONS); dsmark_dump_class() 431 if (opts == NULL) dsmark_dump_class() 437 return nla_nest_end(skb, opts); dsmark_dump_class() 440 nla_nest_cancel(skb, opts); dsmark_dump_class() 447 struct nlattr *opts = NULL; dsmark_dump() local 449 opts = nla_nest_start(skb, TCA_OPTIONS); dsmark_dump() 450 if (opts == NULL) dsmark_dump() 463 return nla_nest_end(skb, opts); dsmark_dump() 466 nla_nest_cancel(skb, opts); dsmark_dump()
|
H A D | sch_codel.c | 189 struct nlattr *opts; codel_dump() local 191 opts = nla_nest_start(skb, TCA_OPTIONS); codel_dump() 192 if (opts == NULL) codel_dump() 205 return nla_nest_end(skb, opts); codel_dump() 208 nla_nest_cancel(skb, opts); codel_dump()
|
H A D | sch_red.c | 260 struct nlattr *opts = NULL; red_dump() local 272 opts = nla_nest_start(skb, TCA_OPTIONS); red_dump() 273 if (opts == NULL) red_dump() 278 return nla_nest_end(skb, opts); red_dump() 281 nla_nest_cancel(skb, opts); red_dump()
|
H A D | sch_choke.c | 502 struct nlattr *opts = NULL; choke_dump() local 513 opts = nla_nest_start(skb, TCA_OPTIONS); choke_dump() 514 if (opts == NULL) choke_dump() 520 return nla_nest_end(skb, opts); choke_dump() 523 nla_nest_cancel(skb, opts); choke_dump()
|
H A D | sch_gred.c | 510 struct nlattr *parms, *opts = NULL; gred_dump() local 520 opts = nla_nest_start(skb, TCA_OPTIONS); gred_dump() 521 if (opts == NULL) gred_dump() 584 return nla_nest_end(skb, opts); gred_dump() 587 nla_nest_cancel(skb, opts); gred_dump()
|
H A D | sch_pie.c | 463 struct nlattr *opts; pie_dump() local 465 opts = nla_nest_start(skb, TCA_OPTIONS); pie_dump() 466 if (opts == NULL) pie_dump() 481 return nla_nest_end(skb, opts); pie_dump() 484 nla_nest_cancel(skb, opts); pie_dump()
|
H A D | sch_sfb.c | 560 struct nlattr *opts; sfb_dump() local 574 opts = nla_nest_start(skb, TCA_OPTIONS); sfb_dump() 575 if (opts == NULL) sfb_dump() 579 return nla_nest_end(skb, opts); sfb_dump() 582 nla_nest_cancel(skb, opts); sfb_dump()
|
H A D | sch_fq_codel.c | 431 struct nlattr *opts; fq_codel_dump() local 433 opts = nla_nest_start(skb, TCA_OPTIONS); fq_codel_dump() 434 if (opts == NULL) fq_codel_dump() 451 return nla_nest_end(skb, opts); fq_codel_dump()
|
H A D | sch_fq.c | 785 struct nlattr *opts; fq_dump() local 787 opts = nla_nest_start(skb, TCA_OPTIONS); fq_dump() 788 if (opts == NULL) fq_dump() 805 return nla_nest_end(skb, opts); fq_dump()
|
H A D | sch_hhf.c | 673 struct nlattr *opts; hhf_dump() local 675 opts = nla_nest_start(skb, TCA_OPTIONS); hhf_dump() 676 if (opts == NULL) hhf_dump() 690 return nla_nest_end(skb, opts); hhf_dump()
|
/linux-4.1.27/net/openvswitch/ |
H A D | vport-vxlan.c | 71 struct ovs_vxlan_opts opts = { vxlan_rcv() local 87 key, flags, &opts, sizeof(opts)); vxlan_rcv() 209 const struct ovs_vxlan_opts *opts; vxlan_ext_gbp() local 212 opts = tun_info->options; vxlan_ext_gbp() 215 tun_info->options_len >= sizeof(*opts)) vxlan_ext_gbp() 216 return opts->gbp; vxlan_ext_gbp()
|
H A D | flow.h | 76 const void *opts, __ovs_flow_tun_info_init() 98 tun_info->options = opts; __ovs_flow_tun_info_init() 108 const void *opts, ovs_flow_tun_info_init() 115 opts, opts_len); ovs_flow_tun_info_init() 69 __ovs_flow_tun_info_init(struct ovs_tunnel_info *tun_info, __be32 saddr, __be32 daddr, u8 tos, u8 ttl, __be16 tp_src, __be16 tp_dst, __be64 tun_id, __be16 tun_flags, const void *opts, u8 opts_len) __ovs_flow_tun_info_init() argument 102 ovs_flow_tun_info_init(struct ovs_tunnel_info *tun_info, const struct iphdr *iph, __be16 tp_src, __be16 tp_dst, __be64 tun_id, __be16 tun_flags, const void *opts, u8 opts_len) ovs_flow_tun_info_init() argument
|
H A D | vport-geneve.c | 181 u8 vni[3], opts_len, *opts; geneve_tnl_send() local 204 opts = (u8 *)tun_info->options; geneve_tnl_send() 207 opts = NULL; geneve_tnl_send() 214 tun_key->tun_flags, vni, opts_len, opts, geneve_tnl_send()
|
H A D | flow_netlink.c | 478 struct ovs_vxlan_opts opts; vxlan_tun_opt_from_nlattr() local 481 BUILD_BUG_ON(sizeof(opts) > sizeof(match->key->tun_opts)); vxlan_tun_opt_from_nlattr() 487 memset(&opts, 0, sizeof(opts)); vxlan_tun_opt_from_nlattr() 490 opts.gbp = nla_get_u32(tb[OVS_VXLAN_EXT_GBP]); vxlan_tun_opt_from_nlattr() 493 SW_FLOW_KEY_PUT(match, tun_opts_len, sizeof(opts), false); vxlan_tun_opt_from_nlattr() 497 opt_key_offset = TUN_METADATA_OFFSET(sizeof(opts)); vxlan_tun_opt_from_nlattr() 498 SW_FLOW_KEY_MEMCPY_OFFSET(match, opt_key_offset, &opts, sizeof(opts), vxlan_tun_opt_from_nlattr() 629 const struct ovs_vxlan_opts *opts = tun_opts; vxlan_opt_to_nlattr() local 636 if (nla_put_u32(skb, OVS_VXLAN_EXT_GBP, opts->gbp) < 0) vxlan_opt_to_nlattr() 1291 const void *opts = NULL; __ovs_nla_put_key() local 1294 opts = TUN_METADATA_OPTS(output, swkey->tun_opts_len); __ovs_nla_put_key() 1296 if (ipv4_tun_to_nlattr(skb, &output->tun_key, opts, __ovs_nla_put_key()
|
/linux-4.1.27/fs/exofs/ |
H A D | super.c | 81 static int parse_options(char *options, struct exofs_mountopt *opts) parse_options() argument 90 memset(opts, 0, sizeof(*opts)); parse_options() 91 opts->timeout = BLK_DEFAULT_SG_TIMEOUT; parse_options() 103 opts->dev_name = match_strdup(&args[0]); parse_options() 104 if (unlikely(!opts->dev_name)) { parse_options() 108 opts->is_osdname = true; parse_options() 113 opts->pid = simple_strtoull(str, NULL, 0); parse_options() 114 if (opts->pid < EXOFS_MIN_PID) { parse_options() 128 opts->timeout = option * HZ; parse_options() 708 struct exofs_mountopt *opts = data; exofs_fill_super() local 721 if (opts->is_osdname) { exofs_fill_super() 724 odi.osdname_len = strlen(opts->dev_name); exofs_fill_super() 725 odi.osdname = (u8 *)opts->dev_name; exofs_fill_super() 727 kfree(opts->dev_name); exofs_fill_super() 728 opts->dev_name = NULL; exofs_fill_super() 730 od = osduld_path_lookup(opts->dev_name); exofs_fill_super() 743 sbi->s_timeout = opts->timeout; exofs_fill_super() 745 sbi->one_comp.obj.partition = opts->pid; exofs_fill_super() 848 _exofs_print_device("Mounting", opts->dev_name, exofs_fill_super() 855 opts->dev_name, sbi->one_comp.obj.partition, ret); exofs_fill_super() 867 struct exofs_mountopt opts; exofs_mount() local 870 ret = parse_options(data, &opts); exofs_mount() 874 if (!opts.dev_name) exofs_mount() 875 opts.dev_name = dev_name; exofs_mount() 876 return mount_nodev(type, flags, &opts, exofs_fill_super); exofs_mount()
|
/linux-4.1.27/fs/tracefs/ |
H A D | inode.c | 165 static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts) tracefs_parse_options() argument 174 opts->mode = TRACEFS_DEFAULT_MODE; tracefs_parse_options() 188 opts->uid = uid; tracefs_parse_options() 196 opts->gid = gid; tracefs_parse_options() 201 opts->mode = option & S_IALLUGO; tracefs_parse_options() 217 struct tracefs_mount_opts *opts = &fsi->mount_opts; tracefs_apply_options() local 220 inode->i_mode |= opts->mode; tracefs_apply_options() 222 inode->i_uid = opts->uid; tracefs_apply_options() 223 inode->i_gid = opts->gid; tracefs_apply_options() 247 struct tracefs_mount_opts *opts = &fsi->mount_opts; tracefs_show_options() local 249 if (!uid_eq(opts->uid, GLOBAL_ROOT_UID)) tracefs_show_options() 251 from_kuid_munged(&init_user_ns, opts->uid)); tracefs_show_options() 252 if (!gid_eq(opts->gid, GLOBAL_ROOT_GID)) tracefs_show_options() 254 from_kgid_munged(&init_user_ns, opts->gid)); tracefs_show_options() 255 if (opts->mode != TRACEFS_DEFAULT_MODE) tracefs_show_options() 256 seq_printf(m, ",mode=%o", opts->mode); tracefs_show_options()
|
/linux-4.1.27/fs/debugfs/ |
H A D | inode.c | 76 static int debugfs_parse_options(char *data, struct debugfs_mount_opts *opts) debugfs_parse_options() argument 85 opts->mode = DEBUGFS_DEFAULT_MODE; debugfs_parse_options() 99 opts->uid = uid; debugfs_parse_options() 107 opts->gid = gid; debugfs_parse_options() 112 opts->mode = option & S_IALLUGO; debugfs_parse_options() 128 struct debugfs_mount_opts *opts = &fsi->mount_opts; debugfs_apply_options() local 131 inode->i_mode |= opts->mode; debugfs_apply_options() 133 inode->i_uid = opts->uid; debugfs_apply_options() 134 inode->i_gid = opts->gid; debugfs_apply_options() 158 struct debugfs_mount_opts *opts = &fsi->mount_opts; debugfs_show_options() local 160 if (!uid_eq(opts->uid, GLOBAL_ROOT_UID)) debugfs_show_options() 162 from_kuid_munged(&init_user_ns, opts->uid)); debugfs_show_options() 163 if (!gid_eq(opts->gid, GLOBAL_ROOT_GID)) debugfs_show_options() 165 from_kgid_munged(&init_user_ns, opts->gid)); debugfs_show_options() 166 if (opts->mode != DEBUGFS_DEFAULT_MODE) debugfs_show_options() 167 seq_printf(m, ",mode=%o", opts->mode); debugfs_show_options()
|
/linux-4.1.27/arch/xtensa/variants/fsf/include/variant/ |
H A D | tie-asm.h | 21 #define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */ 22 #define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */
|
/linux-4.1.27/tools/usb/usbip/src/ |
H A D | usbip_detach.c | 84 static const struct option opts[] = { usbip_detach() local 92 opt = getopt_long(argc, argv, "p:", opts, NULL); usbip_detach()
|
H A D | usbip_unbind.c | 114 static const struct option opts[] = { usbip_unbind() local 123 opt = getopt_long(argc, argv, "b:", opts, NULL); usbip_unbind()
|
H A D | usbip.c | 147 static const struct option opts[] = { main() local 161 opt = getopt_long(argc, argv, "+dlt:", opts, NULL); main()
|
H A D | usbip_attach.c | 203 static const struct option opts[] = { usbip_attach() local 214 opt = getopt_long(argc, argv, "r:b:", opts, NULL); usbip_attach()
|
H A D | usbip_bind.c | 187 static const struct option opts[] = { usbip_bind() local 196 opt = getopt_long(argc, argv, "b:", opts, NULL); usbip_bind()
|
H A D | usbip_list.c | 242 static const struct option opts[] = { usbip_list() local 257 opt = getopt_long(argc, argv, "pr:l", opts, NULL); usbip_list()
|
/linux-4.1.27/arch/arm/mach-ixp4xx/ |
H A D | common.c | 517 unsigned long opts = *IXP4XX_OSRT1 & IXP4XX_OST_RELOAD_MASK; ixp4xx_set_next_event() local 519 *IXP4XX_OSRT1 = (evt & ~IXP4XX_OST_RELOAD_MASK) | opts; ixp4xx_set_next_event() 527 unsigned long opts = *IXP4XX_OSRT1 & IXP4XX_OST_RELOAD_MASK; ixp4xx_set_mode() local 533 opts = IXP4XX_OST_ENABLE; ixp4xx_set_mode() 538 opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT; ixp4xx_set_mode() 541 opts &= ~IXP4XX_OST_ENABLE; ixp4xx_set_mode() 544 opts |= IXP4XX_OST_ENABLE; ixp4xx_set_mode() 548 osrt = opts = 0; ixp4xx_set_mode() 552 *IXP4XX_OSRT1 = osrt | opts; ixp4xx_set_mode()
|
/linux-4.1.27/fs/jffs2/ |
H A D | super.c | 89 struct jffs2_mount_opts *opts = &c->mount_opts; jffs2_show_options() local 91 if (opts->override_compr) jffs2_show_options() 92 seq_printf(s, ",compr=%s", jffs2_compr_name(opts->compr)); jffs2_show_options() 93 if (opts->rp_size) jffs2_show_options() 94 seq_printf(s, ",rp_size=%u", opts->rp_size / 1024); jffs2_show_options()
|
H A D | nodemgmt.c | 27 struct jffs2_mount_opts *opts = &c->mount_opts; jffs2_rp_can_write() local 33 if (avail < 2 * opts->rp_size) jffs2_rp_can_write() 37 opts->rp_size, c->dirty_size, c->free_size, jffs2_rp_can_write() 41 if (avail > opts->rp_size) jffs2_rp_can_write()
|
/linux-4.1.27/tools/power/acpi/common/ |
H A D | getopt.c | 112 * opts - options info list 120 int acpi_getopt(int argc, char **argv, char *opts) acpi_getopt() argument 143 (opts_ptr = ACPI_STRCHR(opts, current_char)) == NULL) { acpi_getopt()
|
/linux-4.1.27/drivers/sbus/char/ |
H A D | display7seg.c | 173 struct device_node *opts; d7s_probe() local 203 opts = of_find_node_by_path("/options"); d7s_probe() 204 if (opts && d7s_probe() 205 of_get_property(opts, "d7s-flipped?", NULL)) d7s_probe()
|
/linux-4.1.27/kernel/trace/ |
H A D | trace_nop.c | 31 .opts = nop_opts
|
H A D | trace.c | 79 .opts = dummy_tracer_opt 1246 if (!type->flags->opts) register_tracer() 1247 type->flags->opts = dummy_tracer_opt; register_tracer() 3476 trace_opts = tr->current_trace->flags->opts; tracing_trace_options_show() 3498 struct tracer_opt *opts, int neg) __set_tracer_option() 3503 ret = trace->set_flag(tr, tracer_flags->val, opts->bit, !neg); __set_tracer_option() 3508 tracer_flags->val &= ~opts->bit; __set_tracer_option() 3510 tracer_flags->val |= opts->bit; __set_tracer_option() 3519 struct tracer_opt *opts = NULL; set_tracer_option() local 3522 for (i = 0; tracer_flags->opts[i].name; i++) { set_tracer_option() 3523 opts = &tracer_flags->opts[i]; set_tracer_option() 3525 if (strcmp(cmp, opts->name) == 0) set_tracer_option() 3526 return __set_tracer_option(tr, trace->flags, opts, neg); set_tracer_option() 6308 struct tracer_opt *opts; create_trace_option_files() local 6316 if (!flags || !flags->opts) create_trace_option_files() 6319 opts = flags->opts; create_trace_option_files() 6321 for (cnt = 0; opts[cnt].name; cnt++) create_trace_option_files() 6328 for (cnt = 0; opts[cnt].name; cnt++) create_trace_option_files() 6330 &opts[cnt]); create_trace_option_files() 3496 __set_tracer_option(struct trace_array *tr, struct tracer_flags *tracer_flags, struct tracer_opt *opts, int neg) __set_tracer_option() argument
|
H A D | trace_functions.c | 206 .opts = func_opts
|
H A D | trace_irqsoff.c | 72 .opts = trace_opts,
|
H A D | trace_sched_wakeup.c | 55 .opts = trace_opts,
|
H A D | trace_functions_graph.c | 93 .opts = trace_opts
|
H A D | blktrace.c | 56 .opts = blk_tracer_opts,
|
H A D | trace.h | 329 struct tracer_opt *opts; member in struct:tracer_flags
|
/linux-4.1.27/fs/befs/ |
H A D | linuxvfs.c | 672 parse_options(char *options, struct befs_mount_options *opts) parse_options() argument 681 opts->uid = GLOBAL_ROOT_UID; parse_options() 682 opts->gid = GLOBAL_ROOT_GID; parse_options() 683 opts->use_uid = 0; parse_options() 684 opts->use_gid = 0; parse_options() 685 opts->iocharset = NULL; parse_options() 686 opts->debug = 0; parse_options() 709 opts->uid = uid; parse_options() 710 opts->use_uid = 1; parse_options() 723 opts->gid = gid; parse_options() 724 opts->use_gid = 1; parse_options() 727 kfree(opts->iocharset); parse_options() 728 opts->iocharset = match_strdup(&args[0]); parse_options() 729 if (!opts->iocharset) { parse_options() 736 opts->debug = 1; parse_options()
|
/linux-4.1.27/net/ipv4/ |
H A D | tcp_output.c | 450 struct tcp_out_options *opts) tcp_options_write() 452 u16 options = opts->options; /* mungable copy */ tcp_options_write() 458 opts->hash_location = (__u8 *)ptr; tcp_options_write() 462 if (unlikely(opts->mss)) { tcp_options_write() 465 opts->mss); tcp_options_write() 481 *ptr++ = htonl(opts->tsval); tcp_options_write() 482 *ptr++ = htonl(opts->tsecr); tcp_options_write() 496 opts->ws); tcp_options_write() 499 if (unlikely(opts->num_sack_blocks)) { tcp_options_write() 507 (TCPOLEN_SACK_BASE + (opts->num_sack_blocks * tcp_options_write() 510 for (this_sack = 0; this_sack < opts->num_sack_blocks; tcp_options_write() 520 struct tcp_fastopen_cookie *foc = opts->fastopen_cookie; tcp_options_write() 548 struct tcp_out_options *opts, tcp_syn_options() 558 opts->options |= OPTION_MD5; tcp_syn_options() 574 opts->mss = tcp_advertise_mss(sk); tcp_syn_options() 578 opts->options |= OPTION_TS; tcp_syn_options() 579 opts->tsval = tcp_skb_timestamp(skb) + tp->tsoffset; tcp_syn_options() 580 opts->tsecr = tp->rx_opt.ts_recent; tcp_syn_options() 584 opts->ws = tp->rx_opt.rcv_wscale; tcp_syn_options() 585 opts->options |= OPTION_WSCALE; tcp_syn_options() 589 opts->options |= OPTION_SACK_ADVERTISE; tcp_syn_options() 590 if (unlikely(!(OPTION_TS & opts->options))) tcp_syn_options() 601 opts->options |= OPTION_FAST_OPEN_COOKIE; tcp_syn_options() 602 opts->fastopen_cookie = &fastopen->cookie; tcp_syn_options() 616 struct tcp_out_options *opts, tcp_synack_options() 625 opts->options |= OPTION_MD5; tcp_synack_options() 638 opts->mss = mss; tcp_synack_options() 642 opts->ws = ireq->rcv_wscale; tcp_synack_options() 643 opts->options |= OPTION_WSCALE; tcp_synack_options() 647 opts->options |= OPTION_TS; tcp_synack_options() 648 opts->tsval = tcp_skb_timestamp(skb); tcp_synack_options() 649 opts->tsecr = req->ts_recent; tcp_synack_options() 653 opts->options |= OPTION_SACK_ADVERTISE; tcp_synack_options() 664 opts->options |= OPTION_FAST_OPEN_COOKIE; tcp_synack_options() 665 opts->fastopen_cookie = foc; tcp_synack_options() 677 struct tcp_out_options *opts, tcp_established_options() 684 opts->options = 0; tcp_established_options() 689 opts->options |= OPTION_MD5; tcp_established_options() 697 opts->options |= OPTION_TS; tcp_established_options() 698 opts->tsval = skb ? tcp_skb_timestamp(skb) + tp->tsoffset : 0; tcp_established_options() 699 opts->tsecr = tp->rx_opt.ts_recent; tcp_established_options() 706 opts->num_sack_blocks = tcp_established_options() 711 opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK; tcp_established_options() 913 struct tcp_out_options opts; tcp_transmit_skb() local 935 memset(&opts, 0, sizeof(opts)); tcp_transmit_skb() 938 tcp_options_size = tcp_syn_options(sk, skb, &opts, &md5); tcp_transmit_skb() 940 tcp_options_size = tcp_established_options(sk, skb, &opts, tcp_transmit_skb() 996 tcp_options_write((__be32 *)(th + 1), tp, &opts); tcp_transmit_skb() 1004 tp->af_specific->calc_md5_hash(opts.hash_location, tcp_transmit_skb() 1428 struct tcp_out_options opts; tcp_current_mss() local 1439 header_len = tcp_established_options(sk, NULL, &opts, &md5) + tcp_current_mss() 2952 struct tcp_out_options opts; tcp_make_synack() local 2975 memset(&opts, 0, sizeof(opts)); tcp_make_synack() 2987 tcp_header_size = tcp_synack_options(sk, req, mss, skb, &opts, md5, tcp_make_synack() 3012 tcp_options_write((__be32 *)(th + 1), tp, &opts); tcp_make_synack() 3019 tcp_rsk(req)->af_specific->calc_md5_hash(opts.hash_location, tcp_make_synack() 449 tcp_options_write(__be32 *ptr, struct tcp_sock *tp, struct tcp_out_options *opts) tcp_options_write() argument 547 tcp_syn_options(struct sock *sk, struct sk_buff *skb, struct tcp_out_options *opts, struct tcp_md5sig_key **md5) tcp_syn_options() argument 613 tcp_synack_options(struct sock *sk, struct request_sock *req, unsigned int mss, struct sk_buff *skb, struct tcp_out_options *opts, const struct tcp_md5sig_key *md5, struct tcp_fastopen_cookie *foc) tcp_synack_options() argument 676 tcp_established_options(struct sock *sk, struct sk_buff *skb, struct tcp_out_options *opts, struct tcp_md5sig_key **md5) tcp_established_options() argument
|
/linux-4.1.27/net/tipc/ |
H A D | udp_media.c | 280 struct nlattr *opts[TIPC_NLA_UDP_MAX + 1]; parse_options() local 285 if (nla_parse_nested(opts, TIPC_NLA_UDP_MAX, parse_options() 289 if (opts[TIPC_NLA_UDP_LOCAL] && opts[TIPC_NLA_UDP_REMOTE]) { parse_options() 290 sa_local = nla_data(opts[TIPC_NLA_UDP_LOCAL]); parse_options() 291 sa_remote = nla_data(opts[TIPC_NLA_UDP_REMOTE]); parse_options()
|
/linux-4.1.27/fs/reiserfs/ |
H A D | super.c | 680 long opts = REISERFS_SB(s)->s_mount_opt; reiserfs_show_options() local 682 if (opts & (1 << REISERFS_LARGETAIL)) reiserfs_show_options() 684 else if (!(opts & (1 << REISERFS_SMALLTAIL))) reiserfs_show_options() 688 if (!(opts & (1 << REISERFS_BARRIER_FLUSH))) reiserfs_show_options() 692 if (opts & (1 << REISERFS_ERROR_CONTINUE)) reiserfs_show_options() 694 else if (opts & (1 << REISERFS_ERROR_PANIC)) reiserfs_show_options() 698 if (opts & (1 << REISERFS_DATA_LOG)) reiserfs_show_options() 700 else if (opts & (1 << REISERFS_DATA_WRITEBACK)) reiserfs_show_options() 704 if (opts & (1 << REISERFS_ATTRS)) reiserfs_show_options() 707 if (opts & (1 << REISERFS_XATTRS_USER)) reiserfs_show_options() 710 if (opts & (1 << REISERFS_EXPOSE_PRIVROOT)) reiserfs_show_options() 713 if (opts & (1 << REISERFS_POSIXACL)) reiserfs_show_options() 726 else if (opts & (1 << REISERFS_USRQUOTA)) reiserfs_show_options() 731 else if (opts & (1 << REISERFS_GRPQUOTA)) reiserfs_show_options() 742 if (opts & (1 << REISERFS_NO_BORDER)) reiserfs_show_options() 744 if (opts & (1 << REISERFS_NO_UNHASHED_RELOCATION)) reiserfs_show_options() 746 if (opts & (1 << REISERFS_HASHED_RELOCATION)) reiserfs_show_options() 748 if (opts & (1 << REISERFS_TEST4)) reiserfs_show_options() 927 * opts - array of options which are accepted 933 static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts, reiserfs_getopt() argument 971 for (opt = opts; opt->option_name; opt++) { reiserfs_getopt() 1087 opt_desc_t opts[] = { reiserfs_parse_options() local 1143 c = reiserfs_getopt(s, &pos, opts, &arg, mount_options); reiserfs_parse_options()
|
/linux-4.1.27/arch/xtensa/variants/dc232b/include/variant/ |
H A D | tie-asm.h | 21 #define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */ 22 #define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */
|
/linux-4.1.27/drivers/usb/host/whci/ |
H A D | debug.c | 57 seq_printf(s, " TD: sts: %08x opts: %08x\n", qset_print() 61 seq_printf(s, " %c%c TD[%d]: sts: %08x opts: %08x ptr: %08x\n", qset_print()
|
/linux-4.1.27/kernel/ |
H A D | cgroup.c | 1351 static int parse_cgroupfs_options(char *data, struct cgroup_sb_opts *opts) parse_cgroupfs_options() argument 1364 memset(opts, 0, sizeof(*opts)); parse_cgroupfs_options() 1373 opts->none = true; parse_cgroupfs_options() 1384 opts->flags |= CGRP_ROOT_SANE_BEHAVIOR; parse_cgroupfs_options() 1388 opts->flags |= CGRP_ROOT_NOPREFIX; parse_cgroupfs_options() 1392 opts->cpuset_clone_children = true; parse_cgroupfs_options() 1396 opts->flags |= CGRP_ROOT_XATTR; parse_cgroupfs_options() 1401 if (opts->release_agent) parse_cgroupfs_options() 1403 opts->release_agent = parse_cgroupfs_options() 1405 if (!opts->release_agent) parse_cgroupfs_options() 1424 if (opts->name) parse_cgroupfs_options() 1426 opts->name = kstrndup(name, parse_cgroupfs_options() 1429 if (!opts->name) parse_cgroupfs_options() 1444 opts->subsys_mask |= (1 << i); for_each_subsys() 1453 if (opts->flags & CGRP_ROOT_SANE_BEHAVIOR) { 1467 if (all_ss || (!one_ss && !opts->none && !opts->name)) 1470 opts->subsys_mask |= (1 << i); 1476 if (!opts->subsys_mask && !opts->name) 1484 if ((opts->flags & CGRP_ROOT_NOPREFIX) && (opts->subsys_mask & mask)) 1488 if (opts->subsys_mask && opts->none) 1498 struct cgroup_sb_opts opts; cgroup_remount() local 1509 ret = parse_cgroupfs_options(data, &opts); cgroup_remount() 1513 if (opts.subsys_mask != root->subsys_mask || opts.release_agent) cgroup_remount() 1517 added_mask = opts.subsys_mask & ~root->subsys_mask; cgroup_remount() 1518 removed_mask = root->subsys_mask & ~opts.subsys_mask; cgroup_remount() 1521 if ((opts.flags ^ root->flags) || cgroup_remount() 1522 (opts.name && strcmp(opts.name, root->name))) { cgroup_remount() 1524 opts.flags, opts.name ?: "", root->flags, root->name); cgroup_remount() 1541 if (opts.release_agent) { cgroup_remount() 1543 strcpy(root->release_agent_path, opts.release_agent); cgroup_remount() 1547 kfree(opts.release_agent); cgroup_remount() 1548 kfree(opts.name); cgroup_remount() 1626 struct cgroup_sb_opts *opts) init_cgroup_root() 1636 root->flags = opts->flags; init_cgroup_root() 1637 if (opts->release_agent) init_cgroup_root() 1638 strcpy(root->release_agent_path, opts->release_agent); init_cgroup_root() 1639 if (opts->name) init_cgroup_root() 1640 strcpy(root->name, opts->name); init_cgroup_root() 1641 if (opts->cpuset_clone_children) init_cgroup_root() 1744 struct cgroup_sb_opts opts; cgroup_mount() local 1760 ret = parse_cgroupfs_options(data, &opts); cgroup_mount() 1765 if (opts.flags & CGRP_ROOT_SANE_BEHAVIOR) { cgroup_mount() 1781 if (!(opts.subsys_mask & (1 << i)) || for_each_subsys() 1805 if (opts.name) { for_each_root() 1806 if (strcmp(opts.name, root->name)) for_each_root() 1815 if ((opts.subsys_mask || opts.none) && for_each_root() 1816 (opts.subsys_mask != root->subsys_mask)) { for_each_root() 1823 if (root->flags ^ opts.flags) for_each_root() 1858 if (!opts.subsys_mask && !opts.none) { 1869 init_cgroup_root(root, &opts); 1871 ret = cgroup_setup_root(root, opts.subsys_mask); 1878 kfree(opts.release_agent); 1879 kfree(opts.name); 4965 static struct cgroup_sb_opts __initdata opts; cgroup_init_early() local 4969 init_cgroup_root(&cgrp_dfl_root, &opts); cgroup_init_early() 1625 init_cgroup_root(struct cgroup_root *root, struct cgroup_sb_opts *opts) init_cgroup_root() argument
|
H A D | ptrace.c | 582 /* Avoid intermediate state when all opts are cleared */ ptrace_setoptions()
|
/linux-4.1.27/security/selinux/ |
H A D | hooks.c | 491 struct security_mnt_opts *opts) selinux_get_mnt_opts() 499 security_init_mnt_opts(opts); selinux_get_mnt_opts() 514 opts->num_mnt_opts++; selinux_get_mnt_opts() 519 opts->num_mnt_opts++; selinux_get_mnt_opts() 521 opts->mnt_opts = kcalloc(opts->num_mnt_opts, sizeof(char *), GFP_ATOMIC); selinux_get_mnt_opts() 522 if (!opts->mnt_opts) { selinux_get_mnt_opts() 527 opts->mnt_opts_flags = kcalloc(opts->num_mnt_opts, sizeof(int), GFP_ATOMIC); selinux_get_mnt_opts() 528 if (!opts->mnt_opts_flags) { selinux_get_mnt_opts() 538 opts->mnt_opts[i] = context; selinux_get_mnt_opts() 539 opts->mnt_opts_flags[i++] = FSCONTEXT_MNT; selinux_get_mnt_opts() 545 opts->mnt_opts[i] = context; selinux_get_mnt_opts() 546 opts->mnt_opts_flags[i++] = CONTEXT_MNT; selinux_get_mnt_opts() 552 opts->mnt_opts[i] = context; selinux_get_mnt_opts() 553 opts->mnt_opts_flags[i++] = DEFCONTEXT_MNT; selinux_get_mnt_opts() 562 opts->mnt_opts[i] = context; selinux_get_mnt_opts() 563 opts->mnt_opts_flags[i++] = ROOTCONTEXT_MNT; selinux_get_mnt_opts() 566 opts->mnt_opts[i] = NULL; selinux_get_mnt_opts() 567 opts->mnt_opts_flags[i++] = SBLABEL_MNT; selinux_get_mnt_opts() 570 BUG_ON(i != opts->num_mnt_opts); selinux_get_mnt_opts() 575 security_free_mnt_opts(opts); selinux_get_mnt_opts() 604 struct security_mnt_opts *opts, selinux_set_mnt_opts() 616 char **mount_options = opts->mnt_opts; selinux_set_mnt_opts() 617 int *flags = opts->mnt_opts_flags; selinux_set_mnt_opts() 618 int num_opts = opts->num_mnt_opts; selinux_set_mnt_opts() 911 struct security_mnt_opts *opts) selinux_parse_opts_str() 918 opts->num_mnt_opts = 0; selinux_parse_opts_str() 993 opts->mnt_opts = kcalloc(NUM_SEL_MNT_OPTS, sizeof(char *), GFP_ATOMIC); selinux_parse_opts_str() 994 if (!opts->mnt_opts) selinux_parse_opts_str() 997 opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), GFP_ATOMIC); selinux_parse_opts_str() 998 if (!opts->mnt_opts_flags) { selinux_parse_opts_str() 999 kfree(opts->mnt_opts); selinux_parse_opts_str() 1004 opts->mnt_opts[num_mnt_opts] = fscontext; selinux_parse_opts_str() 1005 opts->mnt_opts_flags[num_mnt_opts++] = FSCONTEXT_MNT; selinux_parse_opts_str() 1008 opts->mnt_opts[num_mnt_opts] = context; selinux_parse_opts_str() 1009 opts->mnt_opts_flags[num_mnt_opts++] = CONTEXT_MNT; selinux_parse_opts_str() 1012 opts->mnt_opts[num_mnt_opts] = rootcontext; selinux_parse_opts_str() 1013 opts->mnt_opts_flags[num_mnt_opts++] = ROOTCONTEXT_MNT; selinux_parse_opts_str() 1016 opts->mnt_opts[num_mnt_opts] = defcontext; selinux_parse_opts_str() 1017 opts->mnt_opts_flags[num_mnt_opts++] = DEFCONTEXT_MNT; selinux_parse_opts_str() 1020 opts->num_mnt_opts = num_mnt_opts; selinux_parse_opts_str() 1037 struct security_mnt_opts opts; superblock_doinit() local 1039 security_init_mnt_opts(&opts); superblock_doinit() 1046 rc = selinux_parse_opts_str(options, &opts); superblock_doinit() 1051 rc = selinux_set_mnt_opts(sb, &opts, 0, NULL); superblock_doinit() 1054 security_free_mnt_opts(&opts); superblock_doinit() 1059 struct security_mnt_opts *opts) selinux_write_opts() 1064 for (i = 0; i < opts->num_mnt_opts; i++) { selinux_write_opts() 1067 if (opts->mnt_opts[i]) selinux_write_opts() 1068 has_comma = strchr(opts->mnt_opts[i], ','); selinux_write_opts() 1072 switch (opts->mnt_opts_flags[i]) { selinux_write_opts() 1098 seq_escape(m, opts->mnt_opts[i], "\"\n\\"); selinux_write_opts() 1106 struct security_mnt_opts opts; selinux_sb_show_options() local 1109 rc = selinux_get_mnt_opts(sb, &opts); selinux_sb_show_options() 1117 selinux_write_opts(m, &opts); selinux_sb_show_options() 1119 security_free_mnt_opts(&opts); selinux_sb_show_options() 2576 struct security_mnt_opts opts; selinux_sb_remount() local 2589 security_init_mnt_opts(&opts); selinux_sb_remount() 2597 rc = selinux_parse_opts_str(secdata, &opts); selinux_sb_remount() 2601 mount_options = opts.mnt_opts; selinux_sb_remount() 2602 flags = opts.mnt_opts_flags; selinux_sb_remount() 2604 for (i = 0; i < opts.num_mnt_opts; i++) { selinux_sb_remount() 2648 security_free_mnt_opts(&opts); selinux_sb_remount() 490 selinux_get_mnt_opts(const struct super_block *sb, struct security_mnt_opts *opts) selinux_get_mnt_opts() argument 603 selinux_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts, unsigned long kern_flags, unsigned long *set_kern_flags) selinux_set_mnt_opts() argument 910 selinux_parse_opts_str(char *options, struct security_mnt_opts *opts) selinux_parse_opts_str() argument 1058 selinux_write_opts(struct seq_file *m, struct security_mnt_opts *opts) selinux_write_opts() argument
|
/linux-4.1.27/fs/ramfs/ |
H A D | inode.c | 175 static int ramfs_parse_options(char *data, struct ramfs_mount_opts *opts) ramfs_parse_options() argument 182 opts->mode = RAMFS_DEFAULT_MODE; ramfs_parse_options() 193 opts->mode = option & S_IALLUGO; ramfs_parse_options()
|
/linux-4.1.27/drivers/target/ |
H A D | target_core_rd.c | 606 char *orig, *ptr, *opts; rd_set_configfs_dev_params() local 610 opts = kstrdup(page, GFP_KERNEL); rd_set_configfs_dev_params() 611 if (!opts) rd_set_configfs_dev_params() 614 orig = opts; rd_set_configfs_dev_params() 616 while ((ptr = strsep(&opts, ",\n")) != NULL) { rd_set_configfs_dev_params()
|
H A D | target_core_iblock.c | 540 char *orig, *ptr, *arg_p, *opts; iblock_set_configfs_dev_params() local 545 opts = kstrdup(page, GFP_KERNEL); iblock_set_configfs_dev_params() 546 if (!opts) iblock_set_configfs_dev_params() 549 orig = opts; iblock_set_configfs_dev_params() 551 while ((ptr = strsep(&opts, ",\n")) != NULL) { iblock_set_configfs_dev_params()
|
H A D | target_core_file.c | 730 char *orig, *ptr, *arg_p, *opts; fd_set_configfs_dev_params() local 734 opts = kstrdup(page, GFP_KERNEL); fd_set_configfs_dev_params() 735 if (!opts) fd_set_configfs_dev_params() 738 orig = opts; fd_set_configfs_dev_params() 740 while ((ptr = strsep(&opts, ",\n")) != NULL) { fd_set_configfs_dev_params()
|
H A D | target_core_pscsi.c | 731 char *orig, *ptr, *opts; pscsi_set_configfs_dev_params() local 735 opts = kstrdup(page, GFP_KERNEL); pscsi_set_configfs_dev_params() 736 if (!opts) pscsi_set_configfs_dev_params() 739 orig = opts; pscsi_set_configfs_dev_params() 741 while ((ptr = strsep(&opts, ",\n")) != NULL) { pscsi_set_configfs_dev_params()
|
H A D | target_core_user.c | 955 char *orig, *ptr, *opts, *arg_p; tcmu_set_configfs_dev_params() local 960 opts = kstrdup(page, GFP_KERNEL); tcmu_set_configfs_dev_params() 961 if (!opts) tcmu_set_configfs_dev_params() 964 orig = opts; tcmu_set_configfs_dev_params() 966 while ((ptr = strsep(&opts, ",\n")) != NULL) { tcmu_set_configfs_dev_params()
|
H A D | target_core_configfs.c | 1031 char *orig, *ptr, *opts; target_core_dev_pr_store_attr_res_aptpl_metadata() local 1051 opts = kstrdup(page, GFP_KERNEL); target_core_dev_pr_store_attr_res_aptpl_metadata() 1052 if (!opts) target_core_dev_pr_store_attr_res_aptpl_metadata() 1055 orig = opts; target_core_dev_pr_store_attr_res_aptpl_metadata() 1056 while ((ptr = strsep(&opts, ",\n")) != NULL) { target_core_dev_pr_store_attr_res_aptpl_metadata()
|
/linux-4.1.27/drivers/ata/ |
H A D | acard-ahci.c | 266 u32 opts; acard_ahci_qc_prep() local 291 opts = cmd_fis_len | (qc->dev->link->pmp << 12); acard_ahci_qc_prep() 293 opts |= AHCI_CMD_WRITE; acard_ahci_qc_prep() 295 opts |= AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH; acard_ahci_qc_prep() 297 ahci_fill_cmd_slot(pp, qc->tag, opts); acard_ahci_qc_prep()
|
H A D | ahci.h | 273 __le32 opts; member in struct:ahci_cmd_hdr 375 u32 opts);
|
H A D | libahci.c | 1198 u32 opts) ahci_fill_cmd_slot() 1204 pp->cmd_slot[tag].opts = cpu_to_le32(opts); ahci_fill_cmd_slot() 1530 u32 opts; ahci_qc_prep() local 1553 opts = cmd_fis_len | n_elem << 16 | (qc->dev->link->pmp << 12); ahci_qc_prep() 1555 opts |= AHCI_CMD_WRITE; ahci_qc_prep() 1557 opts |= AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH; ahci_qc_prep() 1559 ahci_fill_cmd_slot(pp, qc->tag, opts); ahci_qc_prep() 1197 ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, u32 opts) ahci_fill_cmd_slot() argument
|
/linux-4.1.27/fs/ocfs2/ |
H A D | super.c | 1508 unsigned long opts = osb->s_mount_opt; ocfs2_show_options() local 1511 if (opts & (OCFS2_MOUNT_HB_LOCAL | OCFS2_MOUNT_HB_GLOBAL)) { ocfs2_show_options() 1513 if (opts & OCFS2_MOUNT_HB_LOCAL) ocfs2_show_options() 1520 if (opts & OCFS2_MOUNT_NOINTR) ocfs2_show_options() 1523 if (opts & OCFS2_MOUNT_DATA_WRITEBACK) ocfs2_show_options() 1528 if (opts & OCFS2_MOUNT_BARRIER) ocfs2_show_options() 1531 if (opts & OCFS2_MOUNT_ERRORS_PANIC) ocfs2_show_options() 1549 if (opts & OCFS2_MOUNT_LOCALFLOCKS) ocfs2_show_options() 1555 if (opts & OCFS2_MOUNT_USRQUOTA) ocfs2_show_options() 1557 if (opts & OCFS2_MOUNT_GRPQUOTA) ocfs2_show_options() 1560 if (opts & OCFS2_MOUNT_COHERENCY_BUFFERED) ocfs2_show_options() 1565 if (opts & OCFS2_MOUNT_NOUSERXATTR) ocfs2_show_options() 1570 if (opts & OCFS2_MOUNT_INODE64) ocfs2_show_options() 1573 if (opts & OCFS2_MOUNT_POSIX_ACL) ocfs2_show_options() 1584 if (opts & OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT) ocfs2_show_options()
|
/linux-4.1.27/arch/xtensa/variants/dc233c/include/variant/ |
H A D | tie-asm.h | 41 #define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */ 42 #define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */
|
/linux-4.1.27/tools/thermal/tmon/ |
H A D | tmon.c | 219 static struct option opts[] = { variable in typeref:struct:option 244 while ((c = getopt_long(argc, argv, "c:dlht:T:vgz:", opts, &id2)) != -1) { main()
|
/linux-4.1.27/fs/hpfs/ |
H A D | super.c | 293 static int parse_opts(char *opts, kuid_t *uid, kgid_t *gid, umode_t *umask, parse_opts() argument 300 if (!opts) parse_opts() 303 /*pr_info("Parsing opts: '%s'\n",opts);*/ parse_opts() 305 while ((p = strsep(&opts, ",")) != NULL) { parse_opts()
|
/linux-4.1.27/drivers/scsi/ |
H A D | scsi_debug.c | 4096 module_param_named(opts, scsi_debug_opts, int, S_IRUGO | S_IWUSR); 4143 MODULE_PARM_DESC(opts, "1->noise, 2->medium_err, 4->timeout, 8->recovered_err... (def=0)"); 4163 "dev_size_mb=%d, opts=0x%x", SCSI_DEBUG_VERSION, scsi_debug_info() 4169 /* 'echo <val> > /proc/scsi/scsi_debug/<host_id>' writes to opts */ scsi_debug_write_info() 4173 int opts; scsi_debug_write_info() local 4180 if (1 != sscanf(arr, "%d", &opts)) scsi_debug_write_info() 4182 scsi_debug_opts = opts; scsi_debug_write_info() 4205 "num_tgts=%d, shared (ram) size=%d MB, opts=0x%x, " scsi_debug_show_info() 4305 int opts; opts_store() local 4310 if (1 == sscanf(&work[2], "%x", &opts)) opts_store() 4313 if (1 == sscanf(work, "%d", &opts)) opts_store() 4319 scsi_debug_opts = opts; opts_store() 4320 if (SCSI_DEBUG_OPT_RECOVERED_ERR & opts) opts_store() 4322 else if (SCSI_DEBUG_OPT_TRANSPORT_ERR & opts) opts_store() 4324 else if (SCSI_DEBUG_OPT_DIF_ERR & opts) opts_store() 4326 else if (SCSI_DEBUG_OPT_DIX_ERR & opts) opts_store() 4328 else if (SCSI_DEBUG_OPT_SHORT_TRANSFER & opts) opts_store() 4334 static DRIVER_ATTR_RW(opts); 5133 int opts = scsi_debug_opts; check_inject() local 5135 if (SCSI_DEBUG_OPT_RECOVERED_ERR & opts) check_inject() 5137 else if (SCSI_DEBUG_OPT_TRANSPORT_ERR & opts) check_inject() 5139 else if (SCSI_DEBUG_OPT_DIF_ERR & opts) check_inject() 5141 else if (SCSI_DEBUG_OPT_DIX_ERR & opts) check_inject() 5143 else if (SCSI_DEBUG_OPT_SHORT_TRANSFER & opts) check_inject() 5333 int opts; sdebug_driver_probe() local 5402 opts = scsi_debug_opts; sdebug_driver_probe() 5403 if (SCSI_DEBUG_OPT_RECOVERED_ERR & opts) sdebug_driver_probe() 5405 else if (SCSI_DEBUG_OPT_TRANSPORT_ERR & opts) sdebug_driver_probe() 5407 else if (SCSI_DEBUG_OPT_DIF_ERR & opts) sdebug_driver_probe() 5409 else if (SCSI_DEBUG_OPT_DIX_ERR & opts) sdebug_driver_probe() 5411 else if (SCSI_DEBUG_OPT_SHORT_TRANSFER & opts) sdebug_driver_probe()
|
/linux-4.1.27/fs/9p/ |
H A D | v9fs.c | 113 static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) v9fs_parse_options() argument 130 if (!opts) v9fs_parse_options() 133 tmp_options = kstrdup(opts, GFP_KERNEL); v9fs_parse_options()
|
/linux-4.1.27/drivers/acpi/acpica/ |
H A D | acapps.h | 96 int acpi_getopt(int argc, char **argv, char *opts);
|
/linux-4.1.27/tools/testing/selftests/ftrace/ |
H A D | ftracetest | 44 parse_opts() { # opts
|
/linux-4.1.27/include/linux/ |
H A D | security.h | 171 static inline void security_init_mnt_opts(struct security_mnt_opts *opts) security_init_mnt_opts() argument 173 opts->mnt_opts = NULL; security_init_mnt_opts() 174 opts->mnt_opts_flags = NULL; security_init_mnt_opts() 175 opts->num_mnt_opts = 0; security_init_mnt_opts() 178 static inline void security_free_mnt_opts(struct security_mnt_opts *opts) security_free_mnt_opts() argument 181 if (opts->mnt_opts) security_free_mnt_opts() 182 for (i = 0; i < opts->num_mnt_opts; i++) security_free_mnt_opts() 183 kfree(opts->mnt_opts[i]); security_free_mnt_opts() 184 kfree(opts->mnt_opts); security_free_mnt_opts() 185 opts->mnt_opts = NULL; security_free_mnt_opts() 186 kfree(opts->mnt_opts_flags); security_free_mnt_opts() 187 opts->mnt_opts_flags = NULL; security_free_mnt_opts() 188 opts->num_mnt_opts = 0; security_free_mnt_opts() 304 * @opts binary data structure containing all lsm mount data 310 * Parse a string of security data filling in the opts structure 312 * @opts binary data structure usable by the LSM 1508 struct security_mnt_opts *opts, 1513 int (*sb_parse_opts_str) (char *options, struct security_mnt_opts *opts); 1811 struct security_mnt_opts *opts, 1816 int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts); 1945 static inline void security_init_mnt_opts(struct security_mnt_opts *opts) security_init_mnt_opts() argument 1949 static inline void security_free_mnt_opts(struct security_mnt_opts *opts) security_free_mnt_opts() argument 2129 struct security_mnt_opts *opts, security_sb_set_mnt_opts() 2142 static inline int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) security_sb_parse_opts_str() argument 2128 security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts, unsigned long kern_flags, unsigned long *set_kern_flags) security_sb_set_mnt_opts() argument
|
H A D | of.h | 253 const char **opts); of_find_node_by_path() 426 const char **opts) of_find_node_opts_by_path() 425 of_find_node_opts_by_path(const char *path, const char **opts) of_find_node_opts_by_path() argument
|
/linux-4.1.27/drivers/net/ethernet/realtek/ |
H A D | r8169.c | 6807 u32 *opts) rtl8169_xmit_frags() 6835 status = opts[0] | len | rtl8169_xmit_frags() 6839 txd->opts2 = cpu_to_le32(opts[1]); rtl8169_xmit_frags() 6939 struct sk_buff *skb, u32 *opts) rtl8169_tso_csum_v1() 6944 opts[0] |= TD_LSO; rtl8169_tso_csum_v1() 6945 opts[0] |= min(mss, TD_MSS_MAX) << TD0_MSS_SHIFT; rtl8169_tso_csum_v1() 6950 opts[0] |= TD0_IP_CS | TD0_TCP_CS; rtl8169_tso_csum_v1() 6952 opts[0] |= TD0_IP_CS | TD0_UDP_CS; rtl8169_tso_csum_v1() 6961 struct sk_buff *skb, u32 *opts) rtl8169_tso_csum_v2() 6976 opts[0] |= TD1_GTSENV4; rtl8169_tso_csum_v2() 6983 opts[0] |= TD1_GTSENV6; rtl8169_tso_csum_v2() 6991 opts[0] |= transport_offset << GTTCPHO_SHIFT; rtl8169_tso_csum_v2() 6992 opts[1] |= min(mss, TD_MSS_MAX) << TD1_MSS_SHIFT; rtl8169_tso_csum_v2() 7008 opts[1] |= TD1_IPv4_CS; rtl8169_tso_csum_v2() 7013 opts[1] |= TD1_IPv6_CS; rtl8169_tso_csum_v2() 7023 opts[1] |= TD1_TCP_CS; rtl8169_tso_csum_v2() 7025 opts[1] |= TD1_UDP_CS; rtl8169_tso_csum_v2() 7029 opts[1] |= transport_offset << TCPHO_SHIFT; rtl8169_tso_csum_v2() 7048 u32 opts[2]; rtl8169_start_xmit() local 7059 opts[1] = cpu_to_le32(rtl8169_tx_vlan_tag(skb)); rtl8169_start_xmit() 7060 opts[0] = DescOwn; rtl8169_start_xmit() 7062 if (!tp->tso_csum(tp, skb, opts)) { rtl8169_start_xmit() 7078 frags = rtl8169_xmit_frags(tp, skb, opts); rtl8169_start_xmit() 7082 opts[0] |= FirstFrag; rtl8169_start_xmit() 7084 opts[0] |= FirstFrag | LastFrag; rtl8169_start_xmit() 7088 txd->opts2 = cpu_to_le32(opts[1]); rtl8169_start_xmit() 7096 status = opts[0] | len | (RingEnd * !((entry + 1) % NUM_TX_DESC)); rtl8169_start_xmit() 6806 rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb, u32 *opts) rtl8169_xmit_frags() argument 6938 rtl8169_tso_csum_v1(struct rtl8169_private *tp, struct sk_buff *skb, u32 *opts) rtl8169_tso_csum_v1() argument 6960 rtl8169_tso_csum_v2(struct rtl8169_private *tp, struct sk_buff *skb, u32 *opts) rtl8169_tso_csum_v2() argument
|
/linux-4.1.27/drivers/net/ethernet/via/ |
H A D | via-velocity.c | 479 * @opts: option structure for the device 486 static void velocity_get_options(struct velocity_opt *opts, int index, velocity_get_options() argument 490 velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname); velocity_get_options() 491 velocity_set_int_opt(&opts->DMA_length, DMA_length[index], DMA_LENGTH_MIN, DMA_LENGTH_MAX, DMA_LENGTH_DEF, "DMA_length", devname); velocity_get_options() 492 velocity_set_int_opt(&opts->numrx, RxDescriptors[index], RX_DESC_MIN, RX_DESC_MAX, RX_DESC_DEF, "RxDescriptors", devname); velocity_get_options() 493 velocity_set_int_opt(&opts->numtx, TxDescriptors[index], TX_DESC_MIN, TX_DESC_MAX, TX_DESC_DEF, "TxDescriptors", devname); velocity_get_options() 495 velocity_set_int_opt(&opts->flow_cntl, flow_control[index], FLOW_CNTL_MIN, FLOW_CNTL_MAX, FLOW_CNTL_DEF, "flow_control", devname); velocity_get_options() 496 velocity_set_bool_opt(&opts->flags, IP_byte_align[index], IP_ALIG_DEF, VELOCITY_FLAGS_IP_ALIGN, "IP_byte_align", devname); velocity_get_options() 497 velocity_set_bool_opt(&opts->flags, ValPktLen[index], VAL_PKT_LEN_DEF, VELOCITY_FLAGS_VAL_PKT_LEN, "ValPktLen", devname); velocity_get_options() 498 velocity_set_int_opt((int *) &opts->spd_dpx, speed_duplex[index], MED_LNK_MIN, MED_LNK_MAX, MED_LNK_DEF, "Media link mode", devname); velocity_get_options() 499 velocity_set_int_opt(&opts->wol_opts, wol_opts[index], WOL_OPT_MIN, WOL_OPT_MAX, WOL_OPT_DEF, "Wake On Lan options", devname); velocity_get_options() 500 opts->numrx = (opts->numrx & ~3); velocity_get_options()
|
/linux-4.1.27/security/ |
H A D | capability.c | 117 struct security_mnt_opts *opts, cap_sb_set_mnt_opts() 122 if (unlikely(opts->num_mnt_opts)) cap_sb_set_mnt_opts() 133 static int cap_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) cap_sb_parse_opts_str() argument 116 cap_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts, unsigned long kern_flags, unsigned long *set_kern_flags) cap_sb_set_mnt_opts() argument
|
H A D | security.c | 320 struct security_mnt_opts *opts, security_sb_set_mnt_opts() 324 return security_ops->sb_set_mnt_opts(sb, opts, kern_flags, security_sb_set_mnt_opts() 336 int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) security_sb_parse_opts_str() argument 338 return security_ops->sb_parse_opts_str(options, opts); security_sb_parse_opts_str() 319 security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts, unsigned long kern_flags, unsigned long *set_kern_flags) security_sb_set_mnt_opts() argument
|
/linux-4.1.27/drivers/net/ethernet/davicom/ |
H A D | dm9000.c | 710 u32 opts = w->wolopts; dm9000_set_wol() local 716 if (opts & ~WAKE_MAGIC) dm9000_set_wol() 719 if (opts & WAKE_MAGIC) dm9000_set_wol() 730 if (dm->wake_state != opts) { dm9000_set_wol() 735 else if (dm->wake_state && !opts) dm9000_set_wol() 739 dm->wake_state = opts; dm9000_set_wol()
|
/linux-4.1.27/drivers/block/mtip32xx/ |
H A D | mtip32xx.h | 220 unsigned char opts; member in struct:host_to_dev_fis 274 unsigned int opts; member in struct:mtip_cmd_hdr
|
H A D | mtip32xx.c | 1083 * @opts Command header options, excluding the FIS length 1098 u32 opts, mtip_exec_internal_command() 1151 int_cmd->command_header->opts = mtip_exec_internal_command() 1152 __force_bit2int cpu_to_le32(opts | fis_len); mtip_exec_internal_command() 1163 int_cmd->command_header->opts |= mtip_exec_internal_command() 1352 fis.opts = 1 << 7; mtip_get_identify() 1442 fis.opts = 1 << 7; mtip_standby_immediate() 1484 fis.opts = 1 << 7; mtip_read_log_page() 1521 fis.opts = 1 << 7; mtip_get_smart_data() 1651 fis.opts = 1 << 7; mtip_send_trim() 1799 fis.opts = 1 << 7; exec_drive_task() 1890 fis.opts = 1 << 7; exec_drive_command() 2103 fis.opts = 1 << 7; exec_drive_taskfile() 2404 fis->opts = 1 << 7; mtip_hw_submit_io() 2429 command->command_header->opts = mtip_hw_submit_io() 1093 mtip_exec_internal_command(struct mtip_port *port, struct host_to_dev_fis *fis, int fis_len, dma_addr_t buffer, int buf_len, u32 opts, gfp_t atomic, unsigned long timeout) mtip_exec_internal_command() argument
|
/linux-4.1.27/drivers/net/ethernet/3com/ |
H A D | 3c589_cs.c | 887 u16 opts = SetRxFilter | RxStation | RxBroadcast; set_rx_mode() local 890 opts |= RxMulticast | RxProm; set_rx_mode() 892 opts |= RxMulticast; set_rx_mode() 893 outw(opts, ioaddr + EL3_CMD); set_rx_mode()
|
/linux-4.1.27/include/linux/mtd/ |
H A D | nand.h | 749 #define LEGACY_ID_NAND(nm, devid, chipsz, erasesz, opts) \ 751 .chipsize = (chipsz), .erasesize = (erasesz), .options = (opts) } 763 #define EXTENDED_ID_NAND(nm, devid, chipsz, opts) \ 765 .options = (opts) }
|
/linux-4.1.27/arch/sh/kernel/cpu/ |
H A D | init.c | 48 static int x##_setup(char *opts) \
|
/linux-4.1.27/Documentation/target/ |
H A D | tcm_mod_builder.py | 957 (opts, args) = parser.parse_args() 961 if not opts.__dict__[m]: 968 main(str(opts.modname), opts.protoident)
|
/linux-4.1.27/drivers/md/ |
H A D | dm-crypt.c | 78 const char *opts); 359 const char *opts) crypt_iv_essiv_ctr() 366 if (!opts) { crypt_iv_essiv_ctr() 372 hash_tfm = crypto_alloc_hash(opts, 0, CRYPTO_ALG_ASYNC); crypt_iv_essiv_ctr() 419 const char *opts) crypt_iv_benbi_ctr() 480 const char *opts) crypt_iv_lmk_ctr() 629 const char *opts) crypt_iv_tcw_ctr() 358 crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, const char *opts) crypt_iv_essiv_ctr() argument 418 crypt_iv_benbi_ctr(struct crypt_config *cc, struct dm_target *ti, const char *opts) crypt_iv_benbi_ctr() argument 479 crypt_iv_lmk_ctr(struct crypt_config *cc, struct dm_target *ti, const char *opts) crypt_iv_lmk_ctr() argument 628 crypt_iv_tcw_ctr(struct crypt_config *cc, struct dm_target *ti, const char *opts) crypt_iv_tcw_ctr() argument
|
/linux-4.1.27/drivers/net/wireless/b43legacy/ |
H A D | b43legacy.h | 125 #define B43legacy_SHM_SH_HOSTFLO 0x005E /* Hostflags ucode opts (low) */ 126 #define B43legacy_SHM_SH_HOSTFHI 0x0060 /* Hostflags ucode opts (high) */
|
/linux-4.1.27/tools/vm/ |
H A D | page-types.c | 1083 static const struct option opts[] = { variable in typeref:struct:option 1106 "rp:f:a:b:d:lLNXxh", opts, NULL)) != -1) { main()
|
H A D | slabinfo.c | 1270 struct option opts[] = { variable in typeref:struct:option 1300 opts, NULL)) != -1) main()
|
/linux-4.1.27/fs/btrfs/ |
H A D | super.c | 772 char *device_name, *opts, *orig, *p; btrfs_parse_early_options() local 783 opts = kstrdup(options, GFP_KERNEL); btrfs_parse_early_options() 784 if (!opts) btrfs_parse_early_options() 786 orig = opts; btrfs_parse_early_options() 788 while ((p = strsep(&opts, ",")) != NULL) { btrfs_parse_early_options()
|
/linux-4.1.27/drivers/scsi/sym53c8xx_2/ |
H A D | sym_hipd.c | 1944 static void sym_settrans(struct sym_hcb *np, int target, u_char opts, u_char ofs, sym_settrans() argument 1995 if (opts) { sym_settrans() 2137 sym_setpprot(struct sym_hcb *np, int target, u_char opts, u_char ofs, sym_setpprot() argument 2143 sym_settrans(np, target, opts, ofs, per, wide, div, fak); sym_setpprot() 2152 spi_iu(starget) = tp->tgoal.iu = !!(opts & PPR_OPT_IU); sym_setpprot() 2153 spi_dt(starget) = tp->tgoal.dt = !!(opts & PPR_OPT_DT); sym_setpprot() 2154 spi_qas(starget) = tp->tgoal.qas = !!(opts & PPR_OPT_QAS); sym_setpprot() 4082 unsigned char opts = np->msgin[7] & PPR_OPT_MASK; sym_ppr_nego_check() local 4096 opts = 0; sym_ppr_nego_check() 4098 if (opts != (np->msgin[7] & PPR_OPT_MASK)) sym_ppr_nego_check() 4101 dt = opts & PPR_OPT_DT; sym_ppr_nego_check() 4136 sym_setpprot(np, target, opts, ofs, per, wide, div, fak); sym_ppr_nego_check() 4147 spi_populate_ppr_msg(np->msgout, per, ofs, wide, opts); sym_ppr_nego_check() 4163 if (!req && !opts) { sym_ppr_nego_check()
|
/linux-4.1.27/drivers/staging/slicoss/ |
H A D | slicoss.c | 733 u32 opts = adapter->macopts; slic_mac_filter() local 735 if (opts & MAC_PROMISC) slic_mac_filter() 739 if (opts & MAC_BCAST) { slic_mac_filter() 748 if (opts & MAC_ALLMCAST) { slic_mac_filter() 753 if (opts & MAC_MCAST) { slic_mac_filter() 771 if (opts & MAC_DIRECTED) { slic_mac_filter()
|
/linux-4.1.27/drivers/net/ethernet/dec/tulip/ |
H A D | de2104x.c | 263 u8 opts; member in struct:de_srom_media_block 1860 switch(ib->opts & MediaBlockMask) { de21041_get_srom_info() 1892 bufp += sizeof (ib->opts); de21041_get_srom_info() 1894 if (ib->opts & MediaCustomCSRs) { de21041_get_srom_info()
|
/linux-4.1.27/fs/affs/ |
H A D | super.c | 532 pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data); affs_remount()
|
/linux-4.1.27/drivers/misc/ |
H A D | pti.c | 710 * @opts: Not used. 715 static int pti_console_setup(struct console *c, char *opts) pti_console_setup() argument
|
/linux-4.1.27/drivers/pcmcia/ |
H A D | i82365.c | 456 printk(KERN_INFO " host opts [%d]: already alive!\n", i); set_bridge_opts() 466 printk(KERN_INFO " host opts [%d]:%s\n", i, set_bridge_opts()
|
/linux-4.1.27/drivers/scsi/qla2xxx/ |
H A D | qla_iocb.c | 1921 uint16_t opts; qla2x00_login_iocb() local 1926 opts = lio->u.logio.flags & SRB_LOGIN_COND_PLOGI ? BIT_0 : 0; qla2x00_login_iocb() 1927 opts |= lio->u.logio.flags & SRB_LOGIN_SKIP_PRLI ? BIT_1 : 0; qla2x00_login_iocb() 1930 mbx->mb10 = cpu_to_le16(opts); qla2x00_login_iocb() 1932 mbx->mb1 = cpu_to_le16((sp->fcport->loop_id << 8) | opts); qla2x00_login_iocb()
|
H A D | qla_os.c | 4042 uint8_t opts; qla2x00_relogin() local 4044 opts = 0; qla2x00_relogin() 4047 opts |= BIT_1; qla2x00_relogin() 4050 vha, fcport, opts); qla2x00_relogin()
|
H A D | qla_init.c | 3954 uint8_t opts; qla2x00_fabric_dev_login() local 3973 opts = 0; qla2x00_fabric_dev_login() 3975 opts |= BIT_1; qla2x00_fabric_dev_login() 3976 rval = qla2x00_get_port_database(vha, fcport, opts); qla2x00_fabric_dev_login()
|
/linux-4.1.27/drivers/net/ethernet/sun/ |
H A D | sunvnet.c | 135 "ackfreq[%u] plnk_updt[0x%02x] opts[0x%02x] mtu[%llu] " vnet_send_attr() 154 "ackfreq[%u] plnk_updt[0x%02x] opts[0x%02x] mtu[%llu] " handle_attr_info() 224 "addr[%llx] ackfreq[%u] plnk_updt[0x%02x] opts[0x%02x] " handle_attr_info()
|
/linux-4.1.27/drivers/net/ethernet/intel/i40e/ |
H A D | i40e.h | 528 struct ethtool_rxnfc rxnfc; /* current rss hash opts */
|
/linux-4.1.27/drivers/staging/lustre/lustre/include/ |
H A D | lustre_disk.h | 175 /*4096*/char ldd_mount_opts[4096]; /* target fs mount opts */
|
/linux-4.1.27/drivers/of/ |
H A D | base.c | 762 * @opts: Address of a pointer into which to store the start of 774 struct device_node *of_find_node_opts_by_path(const char *path, const char **opts) of_find_node_opts_by_path() argument 781 if (opts) of_find_node_opts_by_path() 782 *opts = separator ? separator + 1 : NULL; of_find_node_opts_by_path()
|
/linux-4.1.27/drivers/net/irda/ |
H A D | donauboe.c | 332 toshoboe_start_DMA (struct toshoboe_cb *self, int opts) toshoboe_start_DMA() argument 335 OUTB (CONFIG0H_DMA_ON | opts, OBOE_CONFIG0H); toshoboe_start_DMA()
|
/linux-4.1.27/fs/cifs/ |
H A D | cifsglob.h | 451 enum securityEnum sectype; /* sectype requested via mnt opts */ 452 bool sign; /* was signing requested via mnt opts? */
|
/linux-4.1.27/drivers/net/bonding/ |
H A D | bond_options.c | 559 /* sometimes RAWVAL opts may have new lines */ bond_opt_error_interpret()
|
/linux-4.1.27/drivers/staging/lustre/lustre/llite/ |
H A D | llite_lib.c | 733 CDEBUG(D_CONFIG, "Parsing opts %s\n", options); ll_options()
|
/linux-4.1.27/fs/nfs/ |
H A D | super.c | 1205 dfprintk(MOUNT, "NFS: nfs mount opts='%s'\n", raw); nfs_parse_mount_options()
|
/linux-4.1.27/drivers/block/ |
H A D | rbd.c | 4876 struct rbd_options **opts, rbd_add_parse_args() 4965 *opts = rbd_opts; rbd_add_parse_args() 4874 rbd_add_parse_args(const char *buf, struct ceph_options **ceph_opts, struct rbd_options **opts, struct rbd_spec **rbd_spec) rbd_add_parse_args() argument
|
/linux-4.1.27/tools/lguest/ |
H A D | lguest.c | 3194 static struct option opts[] = { variable in typeref:struct:option 3269 while ((c = getopt_long(argc, argv, "v", opts, NULL)) != EOF) { main()
|
/linux-4.1.27/net/core/ |
H A D | sock.c | 68 * Alan Cox : Allow NULL arguments on some SO_ opts
|
/linux-4.1.27/tools/testing/ktest/ |
H A D | ktest.pl | 23 #default opts
|
/linux-4.1.27/include/net/ |
H A D | mac80211.h | 44 * NOTE: If the driver opts to use the _irqsafe() functions, it may not also
|