| /linux/ipc/ |
| H A D | msgutil.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 44 #define DATALEN_MSG ((size_t)PAGE_SIZE-sizeof(struct msg_msg)) 45 #define DATALEN_SEG ((size_t)PAGE_SIZE-sizeof(struct msg_msgseg)) 59 static struct msg_msg *alloc_msg(size_t len) in alloc_msg() argument 65 alen = min(len, DATALEN_MSG); in alloc_msg() 70 msg->next = NULL; in alloc_msg() 71 msg->security = NULL; in alloc_msg() 73 len -= alen; in alloc_msg() 74 pseg = &msg->next; in alloc_msg() 75 while (len > 0) { in alloc_msg() [all …]
|
| /linux/lib/zlib_inflate/ |
| H A D | inftrees.c | 1 /* inftrees.c -- generate Huffman trees for efficient decoding 2 * Copyright (C) 1995-2005 Mark Adler 13 The code lengths are lens[0..codes-1]. The result starts at *table, 14 whose indices are 0..2^bits-1. work is a writable array of at least 17 -1 is an invalid code, and +1 means that ENOUGH isn't enough. table 26 unsigned len; /* a code's length in bits */ in zlib_inflate_table() local 28 unsigned min, max; /* minimum and maximum code lengths */ in zlib_inflate_table() local 31 unsigned drop; /* code bits to drop for sub-table */ in zlib_inflate_table() 63 code lengths are lens[0..codes-1]. Each length corresponds to the in zlib_inflate_table() 64 symbols 0..codes-1. The Huffman code is generated by first sorting the in zlib_inflate_table() [all …]
|
| /linux/lib/ |
| H A D | nlattr.c | 1 // SPDX-License-Identifier: GPL-2.0 60 static int __nla_validate_parse(const struct nlattr *head, int len, int maxtype, 72 return -EINVAL; in validate_nla_bitfield32() 75 if (bf->selector & ~valid_flags_mask) in validate_nla_bitfield32() 76 return -EINVAL; in validate_nla_bitfield32() 79 if (bf->value & ~valid_flags_mask) in validate_nla_bitfield32() 80 return -EINVAL; in validate_nla_bitfield32() 83 if (bf->value & ~bf->selector) in validate_nla_bitfield32() 84 return -EINVAL; in validate_nla_bitfield32() 89 static int nla_validate_array(const struct nlattr *head, int len, int maxtype, in nla_validate_array() argument [all …]
|
| H A D | iov_iter.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 #include <linux/fault-inject-usercopy.h> 18 size_t len, void *from, void *priv2) in copy_to_user_iter() argument 21 return len; in copy_to_user_iter() 22 if (access_ok(iter_to, len)) { in copy_to_user_iter() 24 instrument_copy_to_user(iter_to, from, len); in copy_to_user_iter() 32 copy_to_user_iter_nofault(void __user * iter_to,size_t progress,size_t len,void * from,void * priv2) copy_to_user_iter_nofault() argument 46 copy_from_user_iter(void __user * iter_from,size_t progress,size_t len,void * to,void * priv2) copy_from_user_iter() argument 63 memcpy_to_iter(void * iter_to,size_t progress,size_t len,void * from,void * priv2) memcpy_to_iter() argument 71 memcpy_from_iter(void * iter_from,size_t progress,size_t len,void * to,void * priv2) memcpy_from_iter() argument 103 size_t len = min(count, p->iov_len - skip); fault_in_iov_iter_readable() local 146 size_t len = min(count, p->iov_len - skip); fault_in_iov_iter_writeable() local 193 copy_to_user_iter_mc(void __user * iter_to,size_t progress,size_t len,void * from,void * priv2) copy_to_user_iter_mc() argument 205 memcpy_to_iter_mc(void * iter_to,size_t progress,size_t len,void * from,void * priv2) memcpy_to_iter_mc() argument 266 copy_from_user_iter_nocache(void __user * iter_from,size_t progress,size_t len,void * to,void * priv2) copy_from_user_iter_nocache() argument 285 copy_from_user_iter_flushcache(void __user * iter_from,size_t progress,size_t len,void * to,void * priv2) copy_from_user_iter_flushcache() argument 292 memcpy_from_iter_flushcache(void * iter_from,size_t progress,size_t len,void * to,void * priv2) memcpy_from_iter_flushcache() argument 440 zero_to_user_iter(void __user * iter_to,size_t progress,size_t len,void * priv,void * priv2) zero_to_user_iter() argument 447 zero_to_iter(void * iter_to,size_t progress,size_t len,void * priv,void * priv2) zero_to_iter() argument 795 size_t len = iov->iov_len - skip; iov_iter_aligned_iovec() local 820 size_t len = bvec->bv_len - skip; iov_iter_aligned_bvec() local 890 size_t len = iov->iov_len - skip; iov_iter_alignment_iovec() local 912 size_t len = bvec->bv_len - skip; iov_iter_alignment_bvec() local 1119 size_t len = iov->iov_len - skip; first_iovec_segment() local 1135 size_t skip = i->iov_offset, len; first_bvec_segment() local 1227 ssize_t len; iov_iter_get_pages_alloc2() local 1248 size_t len = min(p->iov_len - skip, size); iov_npages() local 1268 size_t len = min(p->bv_len - skip, size); bvec_npages() local 1335 compat_ssize_t len; copy_compat_iovec_from_user() local 1365 ssize_t len; copy_iovec_from_user() local 1473 ssize_t len = (ssize_t)iov[seg].iov_len; __import_iovec() local 1528 import_ubuf(int rw,void __user * buf,size_t len,struct iov_iter * i) import_ubuf() argument 1765 size_t skip = i->iov_offset, offset, len, size; iov_iter_extract_kvec_pages() local [all...] |
| H A D | kfifo.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/dma-mapping.h> 22 return (fifo->mask + 1) - (fifo->in - fif in kfifo_unused() 90 kfifo_copy_in(struct __kfifo * fifo,const void * src,unsigned int len,unsigned int off) kfifo_copy_in() argument 114 __kfifo_in(struct __kfifo * fifo,const void * buf,unsigned int len) __kfifo_in() argument 129 kfifo_copy_out(struct __kfifo * fifo,void * dst,unsigned int len,unsigned int off) kfifo_copy_out() argument 153 __kfifo_out_peek(struct __kfifo * fifo,void * buf,unsigned int len) __kfifo_out_peek() argument 167 __kfifo_out(struct __kfifo * fifo,void * buf,unsigned int len) __kfifo_out() argument 176 kfifo_copy_from_user(struct __kfifo * fifo,const void __user * from,unsigned int len,unsigned int off,unsigned int * copied) kfifo_copy_from_user() argument 211 __kfifo_from_user(struct __kfifo * fifo,const void __user * from,unsigned long len,unsigned int * copied) __kfifo_from_user() argument 237 kfifo_copy_to_user(struct __kfifo * fifo,void __user * to,unsigned int len,unsigned int off,unsigned int * copied) kfifo_copy_to_user() argument 271 __kfifo_to_user(struct __kfifo * fifo,void __user * to,unsigned long len,unsigned int * copied) __kfifo_to_user() argument 296 setup_sgl_buf(struct scatterlist * sgl,void * buf,int nents,unsigned int len) setup_sgl_buf() argument 335 setup_sgl(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len,unsigned int off) setup_sgl() argument 357 __kfifo_dma_in_prepare(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len) __kfifo_dma_in_prepare() argument 370 __kfifo_dma_out_prepare(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len) __kfifo_dma_out_prepare() argument 382 __kfifo_max_r(unsigned int len,size_t recsize) __kfifo_max_r() argument 439 __kfifo_in_r(struct __kfifo * fifo,const void * buf,unsigned int len,size_t recsize) __kfifo_in_r() argument 453 kfifo_out_copy_r(struct __kfifo * fifo,void * buf,unsigned int len,size_t recsize,unsigned int * n) kfifo_out_copy_r() argument 465 __kfifo_out_peek_r(struct __kfifo * fifo,void * buf,unsigned int len,size_t recsize) __kfifo_out_peek_r() argument 477 __kfifo_out_r(struct __kfifo * fifo,void * buf,unsigned int len,size_t recsize) __kfifo_out_r() argument 500 __kfifo_from_user_r(struct __kfifo * fifo,const void __user * from,unsigned long len,unsigned int * copied,size_t recsize) __kfifo_from_user_r() argument 524 __kfifo_to_user_r(struct __kfifo * fifo,void __user * to,unsigned long len,unsigned int * copied,size_t recsize) __kfifo_to_user_r() argument 549 __kfifo_dma_in_prepare_r(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len,size_t recsize) __kfifo_dma_in_prepare_r() argument 563 __kfifo_dma_in_finish_r(struct __kfifo * fifo,unsigned int len,size_t recsize) __kfifo_dma_in_finish_r() argument 572 __kfifo_dma_out_prepare_r(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len,size_t recsize) __kfifo_dma_out_prepare_r() argument 587 unsigned int len; __kfifo_dma_out_finish_r() local [all...] |
| /linux/kernel/ |
| H A D | sysctl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 27 const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 }; 42 * enum sysctl_writes_mode - supported sysctl write modes 61 SYSCTL_WRITES_LEGACY = -1, 79 size_t len; in _proc_do_string() local 90 len = strlen(data); in _proc_do_string() 91 if (len > maxlen - 1) in _proc_do_string() 92 len = maxlen - 1; in _proc_do_string() 94 if (*ppos > len) in _proc_do_string() 96 len = *ppos; in _proc_do_string() [all …]
|
| /linux/net/core/ |
| H A D | pktgen.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 23 * MAC address typo fixed. 010417 --ro 24 * Integrated. 020301 --DaveM 25 * Added multiskb option 020301 - 847 ssize_t len; get_imix_entries() local 909 ssize_t len; get_labels() local 983 ssize_t len; pktgen_if_write() local 1918 ssize_t len, ret; pktgen_thread_write() local 2817 int i, len; pktgen_finalize_skb() local 3759 size_t len = strlen(ifname); pktgen_find_dev() local [all...] |
| /linux/drivers/pnp/ |
| H A D | support.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * support.c - standard functions for the use of pnp protocol drivers 6 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 16 * pnp_is_active - Determines if a device is active based on its current 24 * only clears out auto-assigned resources. in pnp_is_active() 28 pnp_irq(dev, 0) == -1 && pnp_dma(dev, 0) == -1) in pnp_is_active() 44 * According to the specs, the first three characters are five-bit in pnp_eisa_id_to_string() 45 * compressed ASCII, and the left-over high order bit should be zero. in pnp_eisa_id_to_string() 51 str[0] = 'A' + ((id >> 26) & 0x3f) - 1; in pnp_eisa_id_to_string() 52 str[1] = 'A' + ((id >> 21) & 0x1f) - 1; in pnp_eisa_id_to_string() [all …]
|
| /linux/arch/um/drivers/ |
| H A D | mconsole_user.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 17 * With uts namespaces, uts information becomes process-specific, so 48 msg.msg_name = &(req->origin); in mconsole_reply_v0() 49 msg.msg_namelen = req->originlen; in mconsole_reply_v0() 56 return sendmsg(req->originating_fd, &msg, 0); in mconsole_reply_v0() 66 if (!strncmp(req->request.data, cmd->command, in mconsole_parse() 67 strlen(cmd->command))) { in mconsole_parse() 74 #ifndef MIN 75 #define MIN(a,b) ((a)<(b) ? (a):(b)) macro [all …]
|
| /linux/drivers/pnp/pnpbios/ |
| H A D | rsparser.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * rsparser.c - parses and encodes pnpbios resource data streams 45 * end tag -> 47 * end tag -> 49 * final end tag -> 57 int start, int len) in pnpbios_parse_allocated_ioresource() argument 60 int end = start + len - 1; in pnpbios_parse_allocated_ioresource() 62 if (len <= 0 || end >= 0x10003) in pnpbios_parse_allocated_ioresource() 69 int start, int len) in pnpbios_parse_allocated_memresource() argument 72 int end = start + len - 1; in pnpbios_parse_allocated_memresource() [all …]
|
| /linux/virt/kvm/ |
| H A D | binary_stats.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 * kvm_stats_read() - Common function to read from the binary statistics 28 * +-------------+ 30 * +-------------+ 32 * +-------------+ 34 * +-------------+ 36 * +-------------+ 41 * and some other necessary information. This is a one-time work for the 43 * 2. Read id string from its offset. This is a one-time work for the lifecycle 46 * descriptors. This is a one-time work for the lifecycle of the [all …]
|
| /linux/usr/ |
| H A D | gen_init_cpio.c | 1 // SPDX-License-Identifier: GPL-2.0 26 #define MIN(a, b) ((a) < (b) ? (a) : (b)) macro 29 #define padlen(_off, _align) (((_align) - ((_off) & ((_align) - 1))) % (_align)) 31 /* zero-padding the filename field for data alignment is limited by PATH_MAX */ 48 ssize_t len; in push_buf() local 50 len = write(outfd, name, name_len); in push_buf() 51 if (len != name_len) in push_buf() 52 return -1; in push_buf() 60 ssize_t len = 0; in push_pad() local 66 len = write(outfd, padding, padlen); in push_pad() [all …]
|
| /linux/drivers/infiniband/ulp/rtrs/ |
| H A D | rtrs-clt-sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved. 6 * Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved. 7 * Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved. 12 #include "rtrs-pri.h" 13 #include "rtrs-clt.h" 14 #include "rtrs-log.h" 16 #define MIN_MAX_RECONN_ATT -1 39 free_percpu(stats->pcpu_stats); in rtrs_clt_path_stats_release() 73 attr->attr.name, buf); in max_reconnect_attempts_store() [all …]
|
| /linux/fs/netfs/ |
| H A D | iterator.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 17 * netfs_extract_user_iter - Extract the pages from a user iterator into a bvec 27 * @extraction_flags can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA be 47 size_t count = orig_len, offset, len; in netfs_extract_user_iter() local 51 return -EIO; in netfs_extract_user_iter() 57 return -ENOMEM; in netfs_extract_user_iter() 61 * 0->last, we should be fine. in netfs_extract_user_iter() 64 pages = (void *)bv + bv_size - pg_size; in netfs_extract_user_iter() 68 max_pages - npages, extraction_flags, in netfs_extract_user_iter() 80 count -= ret; in netfs_extract_user_iter() [all …]
|
| /linux/scripts/kconfig/ |
| H A D | nconf.gui.c | 1 // SPDX-License-Identifier: GPL-2.0 36 #define COLOR_DEFAULT -1 107 for (; p->attr; p++) { in set_colors() 108 int attr = p->highlight; in set_colors() 110 if (p->has_color) { in set_colors() 112 init_pair(pair, p->color_fg, p->color_bg); in set_colors() 116 *p->att in set_colors() 178 int len = get_line_length(line); fill_window() local 224 int len = get_line_length(line); btn_dialog() local 345 int len = get_line_length(line); dialog_inputbox() local 396 int len = strlen(result); dialog_inputbox() local 548 int len = get_line_length(line); show_scroll_win_ext() local [all...] |
| /linux/drivers/net/ethernet/intel/libeth/ |
| H A D | rx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (C) 2024-2025 Intel Corporation */ 13 * libeth_rx_hw_len_mtu - get the actual buffer size to be passed to HW 17 * Return: HW-writeable length per one buffer to pass it to the HW accounting: 23 u32 len; in libeth_rx_hw_len_mtu() local 25 len = READ_ONCE(pp->netdev->mtu) + LIBETH_RX_LL_LEN; in libeth_rx_hw_len_mtu() 26 len = ALIGN(len, LIBETH_RX_BUF_STRIDE); in libeth_rx_hw_len_mtu() 27 len = min3(len, ALIGN_DOWN(max_len ? : U32_MAX, LIBETH_RX_BUF_STRIDE), in libeth_rx_hw_len_mtu() 28 pp->max_len); in libeth_rx_hw_len_mtu() 30 return len; in libeth_rx_hw_len_mtu() [all …]
|
| /linux/drivers/staging/greybus/ |
| H A D | loopback.c | 1 // SPDX-License-Identifier: GPL-2.0 34 u32 min; member 107 /* Min/max values in jiffies */ 128 return sprintf(buf, "%u\n", gb->field); \ 138 /* Report 0 for min and max if no transfer succeeded */ \ 139 if (!gb->requests_completed) \ 141 return sprintf(buf, "%" #type "\n", gb->name.field); \ 155 stats = &gb->name; \ 156 count = stats->count ? stats->count : 1; \ 157 avg = stats->sum + count / 2000000; /* round closest */ \ [all …]
|
| /linux/Documentation/netlink/ |
| H A D | genetlink.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml# 5 $schema: https://json-schema.org/draft-07/schema 11 pattern: ^[0-9a-z-]+$ 15 len-or-define: 17 pattern: ^[0-9A-Za-z_-]+( - 1)?$ 19 len-or-limit: 20 # literal int, const name, or limit based on fixed-width type 21 # e.g. u8-min, u16-max, etc. [all …]
|
| /linux/Documentation/devicetree/bindings/display/panel/ |
| H A D | panel-timing.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/display/panel/panel-timing.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Thierry Reding <thierry.reding@gmail.com> 11 - Sam Ravnborg <sam@ravnborg.org> 20 +-------+----------+-------------------------------------+----------+ 24 +-------+----------+-------------------------------------+----------+ 28 +-------+----------#######################################----------+ 32 | len | porch # | hactive # porch | [all …]
|
| /linux/drivers/infiniband/sw/rdmavt/ |
| H A D | rc.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 47 * rvt_compute_aeth - compute the AETH (syndrome + MSN) 54 u32 aeth = qp->r_msn & IB_MSN_MASK; in rvt_compute_aeth() 56 if (qp->ibqp.srq) { in rvt_compute_aeth() 63 u32 min, max, x; in rvt_compute_aeth() local 68 credits = READ_ONCE(qp->r_rq.kwq->count); in rvt_compute_aeth() 71 if (qp->ip) { in rvt_compute_aeth() 72 head = RDMA_READ_UAPI_ATOMIC(qp->r_rq.wq->head); in rvt_compute_aeth() 73 tail = RDMA_READ_UAPI_ATOMIC(qp->r_rq.wq->tail); in rvt_compute_aeth() 75 head = READ_ONCE(qp->r_rq.kwq->head); in rvt_compute_aeth() [all …]
|
| /linux/sound/usb/ |
| H A D | mixer.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 17 * - support for UAC2 effect units 18 * - support for graphical equalizers 19 * - RANGE and MEM set commands (UAC2) 20 * - RANGE and MEM interrupt dispatchers (UAC2) 21 * - audio channel clustering (UAC2) 22 * - audio sample rate converter units (UAC2) 23 * - proper handling of clock multipliers (UAC2) 24 * - dispatch clock change notifications (UAC2) 25 * - stop PCM streams which use a clock that became invalid [all …]
|
| /linux/fs/ntfs3/ |
| H A D | upcase.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved. 19 return chr - ('a' - 'A'); in upcase_unicode_char() 30 * - Case insensitive 31 * - If name equals and 'bothcases' then 32 * - Case sensitive 41 size_t len = min(l1, l2); in ntfs_cmp_names() local 46 for (; len; s1++, s2++, len--) { in ntfs_cmp_names() 47 diff1 = le16_to_cpu(*s1) - le16_to_cpu(*s2); in ntfs_cmp_names() 55 return l1 - l2; in ntfs_cmp_names() [all …]
|
| /linux/tools/perf/scripts/python/ |
| H A D | task-analyzer.py | 1 # task-analyzer.py - comprehensive perf tasks analysis 2 # SPDX-License-Identifier: GPL-2.0 8 # perf record -e sched:sched_switch -a -- sleep 10 9 # perf script report task-analyzer 21 os.environ["PERF_EXEC_PATH"] + "/scripts/python/Perf-Trace-Util/lib/Perf/Trace" 39 LEN_SWITCHED_IN = len("9999999.999999999") # 17 40 LEN_SWITCHED_OUT = len("9999999.999999999") # 17 41 LEN_CPU = len("000") 42 LEN_PID = len("maxvalue") # 8 43 LEN_TID = len("maxvalue") # 8 [all …]
|
| /linux/drivers/media/rc/img-ir/ |
| H A D | img-ir-hw.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2010-2014 Imagination Technologies Ltd. 7 * This ties into the input subsystem using the RC-core. Protocol support is 18 #include <media/rc-core.h> 19 #include "img-ir.h" 68 if (range->max < range->min) in img_ir_timing_preprocess() 69 range->max = range->min; in img_ir_timing_preprocess() 72 range->min = (range->min*unit)/1000; in img_ir_timing_preprocess() 73 range->max = (range->max*unit + 999)/1000; /* round up */ in img_ir_timing_preprocess() 80 img_ir_timing_preprocess(&timing->pulse, unit); in img_ir_symbol_timing_preprocess() [all …]
|
| /linux/drivers/net/wireless/marvell/libertas/ |
| H A D | debugfs.c | 1 // SPDX-License-Identifier: GPL-2.0 28 return -EINVAL; in write_file_dummy() 31 static const size_t len = PAGE_SIZE; variable 36 struct lbs_private *priv = file->private_data; in lbs_dev_info() 42 return -ENOMEM; in lbs_dev_info() 44 pos += snprintf(buf+pos, len-pos, "state = %s\n", in lbs_dev_info() 45 szStates[priv->connect_status]); in lbs_dev_info() 46 pos += snprintf(buf+pos, len-pos, "region_code = %02x\n", in lbs_dev_info() 47 (u32) priv->regioncode); in lbs_dev_info() 59 struct lbs_private *priv = file->private_data; in lbs_sleepparams_write() [all …]
|