| /linux/drivers/xen/xenbus/ |
| H A D | xenbus_xs.c | 110 xs_suspend_active--; in xs_suspend_exit() 125 req->type = req->msg.type; in xs_request_enter() 135 if (req->type == XS_TRANSACTION_START && !req->user_req) in xs_request_enter() 148 xs_state_users--; in xs_request_exit() 149 if ((req->type == XS_TRANSACTION_START && req->msg.type == XS_ERROR) || in xs_request_exit() 150 (req->type == XS_TRANSACTION_END && !req->user_req && in xs_request_exit() 151 !WARN_ON_ONCE(req->msg.type == XS_ERROR && in xs_request_exit() 152 !strcmp(req->body, "ENOENT")))) in xs_request_exit() 153 xs_state_users--; in xs_request_exit() 165 if (i == ARRAY_SIZE(xsd_errors) - 1) { in get_error() [all …]
|
| /linux/sound/core/ |
| H A D | info_oss.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 static DEFINE_MUTEX(strings); 24 int snd_oss_info_register(int dev, int num, char *string) in snd_oss_info_register() argument 29 return -ENXIO; in snd_oss_info_register() 30 if (snd_BUG_ON(num < 0 || num >= SNDRV_CARDS)) in snd_oss_info_register() 31 return -ENXIO; in snd_oss_info_register() 32 guard(mutex)(&strings); in snd_oss_info_register() 34 x = snd_sndstat_strings[num][dev]; in snd_oss_info_register() 40 return -ENOMEM; in snd_oss_info_register() 42 snd_sndstat_strings[num][dev] = x; in snd_oss_info_register() [all …]
|
| /linux/lib/ |
| H A D | string_helpers.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Helpers for formatting and printing strings 23 #include <kunit/test-bug.h> 26 * string_get_size - get the size in the specified units 120 remainder -= 1000; in string_get_size() 148 return -ENOENT; in parse_int_array() 152 return -ENOMEM; in parse_int_array() 162 * parse_int_array_user - Split string into a sequence of integers 220 u8 num; in unescape_octal() local 225 num = (*q++) & 7; in unescape_octal() [all …]
|
| /linux/tools/testing/selftests/mm/ |
| H A D | thp_settings.c | 1 // SPDX-License-Identifier: GPL-2.0 53 if (fd == -1) in read_file() 56 numread = read(fd, buf, buflen - 1); in read_file() 80 void write_num(const char *path, unsigned long num) in write_file() 84 sprintf(buf, "%ld", num); in write_file() 88 int thp_read_string(const char *name, const char * const strings[]) in write_file() 113 memmove(buf, c, sizeof(buf) - (c - bu argument 102 write_num(const char * path,unsigned long num) write_num() argument 188 thp_write_num(const char * name,unsigned long num) thp_write_num() argument [all...] |
| H A D | thp_settings.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 67 void write_num(const char *path, unsigned long num); 69 int thp_read_string(const char *name, const char * const strings[]); 72 void thp_write_num(const char *name, unsigned long num);
|
| /linux/drivers/usb/gadget/function/ |
| H A D | f_loopback.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * f_loopback.c - USB peripheral loopback configuration driver 5 * Copyright (C) 2003-2008 David Brownell 43 /*-------------------------------------------------------------------------*/ 147 /* function-specific strings: */ 155 .language = 0x0409, /* en-us */ 156 .strings = strings_loopback, 164 /*-------------------------------------------------------------------------*/ 168 struct usb_composite_dev *cdev = c->cdev; in loopback_bind() 187 loop->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_loop_source_desc); in loopback_bind() [all …]
|
| H A D | uvc_configfs.c | 1 // SPDX-License-Identifier: GPL-2.0 20 /* ----------------------------------------------------------------------------- 49 return li < ri ? -1 : li == ri ? 0 : 1; in uvcg_config_compare_u32() 60 unsigned int num; in __uvcg_fill_item_entries() local 64 ret = kstrtouint(buf, 0, &num); in __uvcg_fill_item_entries() 68 if (num != (num & GENMASK((size * 8) - 1, 0))) in __uvcg_fill_item_entries() 69 return -ERANGE; in __uvcg_fill_item_entries() 72 memcpy(*values, &num, size); in __uvcg_fill_item_entries() 89 return -EINVAL; in __uvcg_iter_item_entries() 93 return -ENOMEM; in __uvcg_iter_item_entries() [all …]
|
| H A D | f_sourcesink.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * f_sourcesink.c - USB peripheral source/sink configuration driver 5 * Copyright (C) 2003-2008 David Brownell 30 * plus two that support control-OUT tests. If the optional "autoresume" 32 * test harness from USB-IF. 59 /*-------------------------------------------------------------------------*/ 272 /* function-specific strings: */ 280 .language = 0x0409, /* en-us */ 281 .strings = strings_sourcesink, 289 /*-------------------------------------------------------------------------*/ [all …]
|
| H A D | f_fs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * f_fs.c -- user mode file system API for USB composite function controllers 9 * Copyright (C) 2003-2004 David Brownell 18 #include <linux/dma-buf.h> 19 #include <linux/dma-fence.h> 20 #include <linux/dma-resv.h> 64 /* Called with ffs->mutex held; take over ownership of data. */ 99 cmpxchg(&ffs->setup_state, FFS_SETUP_CANCELLED, FFS_NO_SETUP); in ffs_setup_state_clear_cancelled() 120 static int ffs_func_revmap_ep(struct ffs_function *func, u8 num); 127 struct usb_ep *ep; /* P: ffs->eps_lock */ [all …]
|
| /linux/drivers/usb/gadget/legacy/ |
| H A D | g_ffs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * g_ffs.c -- user mode file system API for USB composite function controllers 108 .language = 0x0409, /* en-us */ 109 .strings = gfs_strings, 117 int num; member 151 .strings = gfs_dev_strings, 193 ret = -ENOMEM; in gfs_init() 201 ret = -ENOMEM; in gfs_init() 209 --i; in gfs_init() 214 ret = ffs_single_dev(opts->dev); in gfs_init() [all …]
|
| /linux/drivers/usb/gadget/ |
| H A D | configfs.c | 1 // SPDX-License-Identifier: GPL-2.0 18 u16 num; in check_user_usb_string() local 21 ret = kstrtou16(name, 0, &num); in check_user_usb_string() 25 if (!usb_validate_langid(num)) in check_user_usb_string() 26 return -EINVAL; in check_user_usb_string() 28 stringtab_dev->language = num; in check_user_usb_string() 86 return container_of(cfg->c.cdev, struct gadget_info, cdev); in cfg_to_gadget_info() 91 struct usb_string strings[USB_GADGET_FIRST_AVAIL_IDX]; member 104 struct usb_string strings; member 121 return -EOVERFLOW; in usb_string_copy() [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_global_data.c | 1 // SPDX-License-Identifier: GPL-2.0 46 /* Relocation tests for strings. */ 65 #define test_reloc(map, num, var) \ argument 67 __u32 key = num; \
|
| /linux/drivers/gpio/ |
| H A D | gpio-reg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio-reg: single register individually fixed-direction GPIOs 19 #include <linux/gpio/gpio-reg.h> 37 return r->direction & BIT(offset) ? GPIO_LINE_DIRECTION_IN : in gpio_reg_get_direction() 46 if (r->direction & BIT(offset)) in gpio_reg_direction_output() 47 return -ENOTSUPP; in gpio_reg_direction_output() 49 gc->set(gc, offset, value); in gpio_reg_direction_output() 57 return r->direction & BIT(offset) ? 0 : -ENOTSUPP; in gpio_reg_direction_input() 66 spin_lock_irqsave(&r->lock, flags); in gpio_reg_set() 67 val = r->out; in gpio_reg_set() [all …]
|
| /linux/tools/perf/pmu-events/ |
| H A D | jevents.py | 2 # SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) 68 def removesuffix(s: str, suffix: str) -> str: 74 return s[0:-len(suffix)] if s.endswith(suffix) else s 78 dirname: str) -> str: 84 return tblname.replace('-', '_') 87 def c_len(s: str) -> int: 99 utf = s.encode(encoding='utf-8',errors='strict') 103 return len(utf) - utf.count(b'\\') + utf.count(b'\\\\') - (utf.count(b'\\000') * 2) 106 """A class to hold many strings concatenated together. 108 Generating a large number of stand-alone C strings creates a large [all …]
|
| /linux/rust/quote/ |
| H A D | format.rs | 1 // SPDX-License-Identifier: Apache-2.0 OR MIT 31 /// unsigned integers and strings. 79 /// Composing raw and non-raw identifiers: 95 /// let num: u32 = 10; 97 /// let decimal = format_ident!("Id_{}", num); 100 /// let octal = format_ident!("Id_{:o}", num); 103 /// let binary = format_ident!("Id_{:b}", num); 106 /// let lower_hex = format_ident!("Id_{:x}", num); 109 /// let upper_hex = format_ident!("Id_{:X}", num);
|
| /linux/Documentation/devicetree/bindings/pci/ |
| H A D | hisilicon-histb-pcie.txt | 6 Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml. 11 - compatible: Should be one of the following strings: 12 "hisilicon,hi3798cv200-pcie" 13 - reg: Should contain sysctl, rc_dbi, config registers location and length. 14 - reg-names: Must include the following entries: 16 "rc-dbi": configuration space of PCIe controller; 18 - bus-range: PCI bus numbers covered. 19 - interrupts: MSI interrupt. 20 - interrupt-names: Must include "msi" entries. 21 - clocks: List of phandle and clock specifier pairs as listed in clock-names [all …]
|
| /linux/Documentation/kbuild/ |
| H A D | gendwarfksyms.rst | 18 ------------ 26 sudo pacman --needed -S libelf zlib 30 sudo apt install libelf-dev libdw-dev zlib1g-dev 34 sudo dnf install elfutils-libelf-devel elfutils-devel zlib-devel 38 sudo zypper install libelf-devel libdw-devel zlib-devel 41 ----- 46 Usage: gendwarfksyms [options] elf-object-file ... < symbol-list 49 -d, --debug Print debugging information 50 --dump-dies Dump DWARF DIE contents 51 --dump-die-map Print debugging information about die_map changes [all …]
|
| /linux/Documentation/devicetree/bindings/spi/ |
| H A D | omap-spi.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/spi/omap-spi.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Aswath Govindraju <a-govindraju@ti.com> 13 - $ref: spi-controller.yaml# 18 - items: 19 - enum: 20 - ti,am654-mcspi 21 - ti,am4372-mcspi [all …]
|
| /linux/kernel/trace/ |
| H A D | trace_events_inject.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * trace_events_inject - trace event injection 53 len = i - s; in parse_field() 55 return -EINVAL; in parse_field() 59 return -ENOMEM; in parse_field() 63 return -ENOENT; in parse_field() 69 return -EINVAL; in parse_field() 74 if (isdigit(str[i]) || str[i] == '-') { in parse_field() 75 char *num, c; in parse_field() local 80 return -EINVAL; in parse_field() [all …]
|
| /linux/tools/perf/util/ |
| H A D | hwmon_pmu.c | 1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) 25 /** Strings that correspond to enum hwmon_type. */ 41 /** Strings that correspond to enum hwmon_item. */ 111 * struct hwmon_pmu_event_value: Value in hwmon_pmu->events. 129 return pmu && pmu->type >= PERF_PMU_TYPE_HWMON_START && in perf_pmu__is_hwmon() 130 pmu->type <= PERF_PMU_TYPE_HWMON_END; in perf_pmu__is_hwmon() 135 return perf_pmu__is_hwmon(evsel->pmu); in evsel__is_hwmon() 180 *number = -1; in parse_hwmon_filename() 189 elem = bsearch(&fn_type, hwmon_type_strs + 1, ARRAY_SIZE(hwmon_type_strs) - 1, in parse_hwmon_filename() 197 *type = elem - &hwmon_type_strs[0]; in parse_hwmon_filename() [all …]
|
| /linux/security/apparmor/include/ |
| H A D | policy.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 7 * Copyright (C) 1998-2008 Novell/SUSE 8 * Copyright 2009-2010 Canonical Ltd. 44 ((_profile)->mode == (_mode))) 52 #define PROFILE_IS_HAT(_profile) ((_profile)->label.flags & FLAG_HAT) 54 #define CHECK_DEBUG1(_profile) ((_profile)->label.flags & FLAG_DEBUG1) 56 #define CHECK_DEBUG2(_profile) ((_profile)->label.flags & FLAG_DEBUG2) 58 #define profile_is_stale(_profile) (label_is_stale(&(_profile)->label)) 60 #define on_list_rcu(X) (!list_empty(X) && (X)->prev != LIST_POISON2) 84 u32 count; /* number of strings per entry */ [all …]
|
| /linux/sound/soc/ |
| H A D | soc-core.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // soc-core.c -- ALSA SoC Audio Layer 11 // with code, comments and ideas from :- 40 #include <sound/soc-dpcm.h> 41 #include <sound/soc-topology.h> 42 #include <sound/soc-link.h> 76 return sysfs_emit(buf, "%ld\n", rtd->pmdown_time); in pmdown_time_show() 86 ret = kstrtol(buf, 10, &rtd->pmdown_time); in pmdown_time_store() 110 return attr->mode; /* always visible */ in soc_dev_attr_is_visible() 111 return rtd->dai_link->num_codecs ? attr->mode : 0; /* enabled only with codec */ in soc_dev_attr_is_visible() [all …]
|
| /linux/net/9p/ |
| H A D | trans_usbg.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * trans_usbg.c - USB peripheral usb9pfs configuration driver and transport. 12 /* +--------------------------+ | +--------------------------+ 15 * | (this:trans_usbg) | | |(e.g. diod or nfs-ganesha)| 16 * +-------------^------------+ | +-------------^------------+ 18 * ------------------|------------------------------------|------------- 20 * +-------------v------------+ | +-------------v------------+ 22 * HW | USB Device Controller <---------> USB Host Controller | 24 * +--------------------------+ | +--------------------------+ 95 struct usb_composite_dev *cdev = usb9pfs->function.config->cdev; in usb9pfs_queue_tx() [all …]
|
| /linux/Documentation/devicetree/bindings/sound/ |
| H A D | amlogic,axg-sound-card.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/amlogic,axg-sound-card.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jerome Brunet <jbrunet@baylibre.com> 13 - $ref: sound-card-common.yaml# 17 const: amlogic,axg-sound-card 19 audio-aux-devs: 20 $ref: /schemas/types.yaml#/definitions/phandle-array 23 audio-widgets: [all …]
|
| /linux/tools/lib/bpf/ |
| H A D | btf_relocate.c | 1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) 25 #define qsort(base, num, sz, cmp) sort(base, num, sz, cmp, NULL) argument 55 #define BTF_IS_EMBEDDED ((__u32)-1) 68 struct btf_type *t = btf_type_by_id(r->btf, i); in btf_relocate_rewrite_type_id() 78 *id = r->id_map[*id]; in btf_relocate_rewrite_type_id() 83 * types are named. If strings match, and size is non-zero for both elements 90 int name_diff = strcmp(ni1->name, ni2->name); in cmp_btf_name_size() 92 if (!name_diff && ni1->needs_size && ni2->needs_size) in cmp_btf_name_size() 93 return ni2->size - ni1->size; in cmp_btf_name_size() 107 int high = nelems - 1; in search_btf_name_size() [all …]
|