Home
last modified time | relevance | path

Searched +full:min +full:- +full:len (Results 1 – 25 of 1071) sorted by relevance

12345678910>>...43

/linux-6.12.1/ipc/
Dmsgutil.c1 // SPDX-License-Identifier: GPL-2.0-or-later
42 #define DATALEN_MSG ((size_t)PAGE_SIZE-sizeof(struct msg_msg))
43 #define DATALEN_SEG ((size_t)PAGE_SIZE-sizeof(struct msg_msgseg))
57 static struct msg_msg *alloc_msg(size_t len) in alloc_msg() argument
63 alen = min(len, DATALEN_MSG); in alloc_msg()
68 msg->next = NULL; in alloc_msg()
69 msg->security = NULL; in alloc_msg()
71 len -= alen; in alloc_msg()
72 pseg = &msg->next; in alloc_msg()
73 while (len > 0) { in alloc_msg()
[all …]
/linux-6.12.1/include/linux/
Dminmax.h1 /* SPDX-License-Identifier: GPL-2.0 */
11 * min()/max()/clamp() macros must accomplish three things:
13 * - Avoid multiple evaluations of the arguments (so side-effects like
14 * "x++" happen only once) when non-constant.
15 * - Retain result as a constant expressions when called with only
18 * - Perform signed v unsigned type-checking (to generate compile
20 * - Unsigned char/short are always promoted to signed int and can be
22 * - Unsigned arguments can be compared against non-negative signed constants.
23 * - Comparison of a signed argument against an unsigned constant fails
34 * In particular, statically non-negative signed integer
[all …]
/linux-6.12.1/lib/zlib_inflate/
Dinftrees.c1 /* 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-6.12.1/tools/power/cpupower/lib/
Dcpufreq.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * (C) 2004-2009 Dominik Brodowski <linux@dominikbrodowski.de>
37 const char *value, size_t len) in sysfs_cpufreq_write_file() argument
47 if (fd == -1) in sysfs_cpufreq_write_file()
50 numwrite = write(fd, value, len); in sysfs_cpufreq_write_file()
92 unsigned int len; in cpufreq_get_sysfs_value_from_table() local
99 len = sysfs_cpufreq_read_file(cpu, table[index], linebuf, in cpufreq_get_sysfs_value_from_table()
102 if (len == 0) in cpufreq_get_sysfs_value_from_table()
140 unsigned int len; in sysfs_cpufreq_get_one_string() local
145 len = sysfs_cpufreq_read_file(cpu, cpufreq_string_files[which], in sysfs_cpufreq_get_one_string()
[all …]
/linux-6.12.1/lib/
Dnlattr.c1 // 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 …]
Dkfifo.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #include <linux/dma-mapping.h>
22 return (fifo->mask + 1) - (fifo->in - fifo->out); in kfifo_unused()
34 fifo->in = 0; in __kfifo_alloc()
35 fifo->out = 0; in __kfifo_alloc()
36 fifo->esize = esize; in __kfifo_alloc()
39 fifo->data = NULL; in __kfifo_alloc()
40 fifo->mask = 0; in __kfifo_alloc()
41 return -EINVAL; in __kfifo_alloc()
44 fifo->data = kmalloc_array(esize, size, gfp_mask); in __kfifo_alloc()
[all …]
Diov_iter.c1 // 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()
25 len = raw_copy_to_user(iter_to, from, len); in copy_to_user_iter()
27 return len; in copy_to_user_iter()
32 size_t len, void *from, void *priv2) in copy_to_user_iter_nofault() argument
37 return len; in copy_to_user_iter_nofault()
[all …]
/linux-6.12.1/fs/xfs/libxfs/
Dxfs_types.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
48 if (agno >= mp->m_sb.sb_agcount) in xfs_verify_fsbno()
61 xfs_fsblock_t len) in xfs_verify_fsbext() argument
63 if (fsbno + len <= fsbno) in xfs_verify_fsbext()
69 if (!xfs_verify_fsbno(mp, fsbno + len - 1)) in xfs_verify_fsbext()
73 XFS_FSB_TO_AGNO(mp, fsbno + len - 1); in xfs_verify_fsbext()
105 if (agno >= mp->m_sb.sb_agcount) in xfs_verify_ino()
118 return ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino || in xfs_internal_inum()
120 xfs_is_quota_inode(&mp->m_sb, ino)); in xfs_internal_inum()
[all …]
/linux-6.12.1/drivers/pnp/
Dsupport.c1 // 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-6.12.1/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
Dbase.c36 if (volt->func->volt_get) in nvkm_volt_get()
37 return volt->func->volt_get(volt); in nvkm_volt_get()
39 ret = volt->func->vid_get(volt); in nvkm_volt_get()
41 for (i = 0; i < volt->vid_nr; i++) { in nvkm_volt_get()
42 if (volt->vid[i].vid == ret) in nvkm_volt_get()
43 return volt->vid[i].uv; in nvkm_volt_get()
45 ret = -EINVAL; in nvkm_volt_get()
53 struct nvkm_subdev *subdev = &volt->subdev; in nvkm_volt_set()
54 int i, ret = -EINVAL, best_err = volt->max_uv, best = -1; in nvkm_volt_set()
56 if (volt->func->volt_set) in nvkm_volt_set()
[all …]
/linux-6.12.1/arch/um/drivers/
Dmconsole_user.c1 // 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-6.12.1/drivers/pnp/pnpbios/
Drsparser.c1 // 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-6.12.1/virt/kvm/
Dbinary_stats.c1 // 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-6.12.1/kernel/
Dsysctl.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Added bdflush entry and intvec min/max checking, 2/23/96, Tom Dyas.
9 * Added kernel/java-{interpreter,appletviewer}, 96/5/10, Mike Shaver.
11 * Added kswapd-interval, ctrl-alt-del, printk stuff, 1/8/97, Chris Horn.
85 const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 };
106 * enum sysctl_writes_mode - supported sysctl write modes
125 SYSCTL_WRITES_LEGACY = -1,
149 size_t len; in _proc_do_string() local
160 len = strlen(data); in _proc_do_string()
161 if (len > maxlen - 1) in _proc_do_string()
[all …]
/linux-6.12.1/drivers/infiniband/ulp/rtrs/
Drtrs-clt-sysfs.c1 // 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-6.12.1/Documentation/netlink/
Dgenetlink.yaml1 # 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
12 len-or-define:
14 pattern: ^[0-9A-Za-z_-]+( - 1)?$
16 len-or-limit:
17 # literal int or limit based on fixed-width type e.g. u8-min, u16-max, etc.
19 pattern: ^[su](8|16|32|64)-(min|max)$
26 required: [ name, doc, attribute-sets, operations ]
[all …]
/linux-6.12.1/scripts/kconfig/
Dnconf.gui.c1 // 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->attr = attr; in set_colors()
124 mvwprintw(win, y, (width - strlen(str)) / 2, "%s", str); in print_in_middle()
174 total_lines = min(total_lines, y); in fill_window()
178 int len = get_line_length(line); in fill_window() local
[all …]
/linux-6.12.1/fs/netfs/
Diterator.c1 // 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-6.12.1/drivers/spi/
Dspi-mxs.c1 // SPDX-License-Identifier: GPL-2.0+
15 // Based on code from U-Boot bootloader by:
18 // Based on spi-stmp.c, which is:
28 #include <linux/dma-mapping.h>
40 #include <linux/spi/mxs-spi.h>
42 #include <linux/dma/mxs-dma.h>
44 #define DRIVER_NAME "mxs-spi"
56 #define TXRX_DEASSERT_CS (1<<1) /* De-assert CS at end of txrx */
67 struct mxs_spi *spi = spi_controller_get_devdata(dev->controller); in mxs_spi_setup_transfer()
68 struct mxs_ssp *ssp = &spi->ssp; in mxs_spi_setup_transfer()
[all …]
/linux-6.12.1/drivers/net/ethernet/intel/libeth/
Drx.c1 // SPDX-License-Identifier: GPL-2.0-only
9 * libeth_rx_hw_len_mtu - get the actual buffer size to be passed to HW
13 * Return: HW-writeable length per one buffer to pass it to the HW accounting:
19 u32 len; in libeth_rx_hw_len_mtu() local
21 len = READ_ONCE(pp->netdev->mtu) + LIBETH_RX_LL_LEN; in libeth_rx_hw_len_mtu()
22 len = ALIGN(len, LIBETH_RX_BUF_STRIDE); in libeth_rx_hw_len_mtu()
23 len = min3(len, ALIGN_DOWN(max_len ? : U32_MAX, LIBETH_RX_BUF_STRIDE), in libeth_rx_hw_len_mtu()
24 pp->max_len); in libeth_rx_hw_len_mtu()
26 return len; in libeth_rx_hw_len_mtu()
30 * libeth_rx_hw_len_truesize - get the short buffer size to be passed to HW
[all …]
/linux-6.12.1/fs/bcachefs/
Dprintbuf.c1 // SPDX-License-Identifier: LGPL-2.1+
15 return pos - buf->last_newline; in __printbuf_linelen()
20 return __printbuf_linelen(buf, buf->pos); in printbuf_linelen()
28 return buf->cur_tabstop < buf->nr_tabstops in cur_tabstop()
29 ? buf->_tabstops[buf->cur_tabstop] in cur_tabstop()
38 if (out->pos + extra <= out->size) in bch2_printbuf_make_room()
41 if (!out->heap_allocated) { in bch2_printbuf_make_room()
42 out->overflow = true; in bch2_printbuf_make_room()
46 unsigned new_size = roundup_pow_of_two(out->size + extra); in bch2_printbuf_make_room()
50 out->allocation_failure = true; in bch2_printbuf_make_room()
[all …]
/linux-6.12.1/drivers/staging/greybus/
Dloopback.c1 // 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-6.12.1/Documentation/devicetree/bindings/display/panel/
Dpanel-timing.yaml1 # 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-6.12.1/drivers/infiniband/sw/rdmavt/
Drc.c1 // 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-6.12.1/fs/ntfs3/
Dupcase.c1 // 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 …]

12345678910>>...43