Home
last modified time | relevance | path

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

12345678910>>...44

/linux-6.12.1/fs/ext4/
Dmballoc-test.c1 // SPDX-License-Identifier: GPL-2.0
29 #define MBT_SB(_sb) (container_of((_sb)->s_fs_info, struct mbt_ext4_super_block, sbi))
30 #define MBT_CTX(_sb) (&MBT_SB(_sb)->mbt_ctx)
31 #define MBT_GRP_CTX(_sb, _group) (&MBT_CTX(_sb)->grp_ctx[_group])
41 INIT_LIST_HEAD(&ei->i_orphan); in mbt_alloc_inode()
42 init_rwsem(&ei->xattr_sem); in mbt_alloc_inode()
43 init_rwsem(&ei->i_data_sem); in mbt_alloc_inode()
44 inode_init_once(&ei->vfs_inode); in mbt_alloc_inode()
45 ext4_fc_init_inode(&ei->vfs_inode); in mbt_alloc_inode()
47 return &ei->vfs_inode; in mbt_alloc_inode()
[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/drivers/scsi/ibmvscsi_tgt/
Dlibsrp.c1 // SPDX-License-Identifier: GPL-2.0-or-later
17 #include <linux/dma-mapping.h>
24 static int srp_iu_pool_alloc(struct srp_queue *q, size_t max, in srp_iu_pool_alloc() argument
30 q->pool = kcalloc(max, sizeof(struct iu_entry *), GFP_KERNEL); in srp_iu_pool_alloc()
31 if (!q->pool) in srp_iu_pool_alloc()
32 return -ENOMEM; in srp_iu_pool_alloc()
33 q->items = kcalloc(max, sizeof(struct iu_entry), GFP_KERNEL); in srp_iu_pool_alloc()
34 if (!q->items) in srp_iu_pool_alloc()
37 spin_lock_init(&q->lock); in srp_iu_pool_alloc()
38 kfifo_init(&q->queue, (void *)q->pool, max * sizeof(void *)); in srp_iu_pool_alloc()
[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 …]
/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 …]
Dhighmem.h1 /* SPDX-License-Identifier: GPL-2.0 */
14 #include "highmem-internal.h"
17 * kmap - Map a page for long term usage
40 * kunmap - Unmap the virtual address mapped by kmap()
49 * kmap_to_page - Get the page for a kmap'ed address
57 * kmap_flush_unused - Flush all unused kmap mappings in order to
63 * kmap_local_page - Map a page for temporary usage
99 * kmap_local_folio - Map a page in this folio for temporary usage
135 * kmap_atomic - Atomically map a page for temporary usage - Deprecated!
212 * vma_alloc_zeroed_movable_folio - Allocate a zeroed page for a VMA.
[all …]
/linux-6.12.1/fs/smb/client/
Dcompress.c1 // SPDX-License-Identifier: GPL-2.0-only
11 * MS-SMB2 "3.1.4.4 Compressing the Message"
12 * MS-SMB2 "3.1.5.3 Decompressing the Chained Message"
13 * MS-XCA - for details of the supported algorithms
39 * Parsing the sample goes from "low-hanging fruits" (fastest algorithms, likely compressible)
48 * has_low_entropy() - Compute Shannon entropy of the sampled data.
66 size_t i, p, p2, len, sum = 0; in has_low_entropy() local
69 len = ilog2(pow4(slen)); in has_low_entropy()
74 sum += p * (len - p2); in has_low_entropy()
86 * calc_byte_distribution() - Compute byte distribution on the sampled data.
[all …]
/linux-6.12.1/net/netfilter/
Dnf_log_syslog.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* (C) 1999-2001 Paul `Rusty' Russell
3 * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
57 nf_log_buf_add(m, "VPROTO=%04x VID=%u ", ntohs(skb->vlan_proto), vid); in nf_log_dump_vlan()
76 if (info->type == NF_LOG_TYPE_LOG) in dump_arp_packet()
77 logflags = info->u.log.logflags; in dump_arp_packet()
83 eth_hdr(skb)->h_source, eth_hdr(skb)->h_dest); in dump_arp_packet()
86 ntohs(eth_hdr(skb)->h_proto)); in dump_arp_packet()
90 ntohs(ah->ar_hrd), ntohs(ah->ar_pro), ntohs(ah->ar_op)); in dump_arp_packet()
94 if (ah->ar_hrd != htons(ARPHRD_ETHER) || in dump_arp_packet()
[all …]
/linux-6.12.1/net/xdp/
Dxsk_queue.h1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* XDP user-space ring structure
58 * Documentation/core-api/circular-buffers.rst. For the Rx and
65 * if (LOAD ->consumer) { (A) LOAD.acq ->producer (C)
67 * STORE.rel ->producer (B) STORE.rel ->consumer (D)
82 * between ->producer and data.
84 * (A) is a control dependency that separates the load of ->consumer
85 * from the stores of $data. In case ->consumer indicates there is no
122 struct xdp_umem_ring *ring = (struct xdp_umem_ring *)q->ring; in __xskq_cons_read_addr_unchecked()
123 u32 idx = cached_cons & q->ring_mask; in __xskq_cons_read_addr_unchecked()
[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/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/tools/perf/scripts/python/
Dtask-analyzer.py1 # 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-6.12.1/Documentation/netlink/
Dgenetlink-legacy.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 …]
Dgenetlink-c.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/genetlink-c.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 …]
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/fs/hfsplus/
Dbitmap.c1 // SPDX-License-Identifier: GPL-2.0
20 u32 offset, u32 *max) in hfsplus_block_allocate() argument
26 u32 mask, start, len, n; in hfsplus_block_allocate() local
30 len = *max; in hfsplus_block_allocate()
31 if (!len) in hfsplus_block_allocate()
34 hfs_dbg(BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len); in hfsplus_block_allocate()
35 mutex_lock(&sbi->alloc_mutex); in hfsplus_block_allocate()
36 mapping = sbi->alloc_file->i_mapping; in hfsplus_block_allocate()
43 curr = pptr + (offset & (PAGE_CACHE_BITS - 1)) / 32; in hfsplus_block_allocate()
45 offset &= ~(PAGE_CACHE_BITS - 1); in hfsplus_block_allocate()
[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/Documentation/core-api/
Dnetlink.rst1 .. SPDX-License-Identifier: BSD-3-Clause
13 ---------------
21 -------------
31 ---------------
44 ----------
51 ------------------------
54 them - make sure to report dump inconsistency with ``NLM_F_DUMP_INTR``.
65 -------
67 kernel-policy
71 operations of the family, defined for each operation individually - ``per-op``,
[all …]
/linux-6.12.1/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
Dvolt.c29 nvbios_volt_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_volt_table() argument
47 *len = nvbios_rd08(bios, volt + 1); in nvbios_volt_table()
52 *len = nvbios_rd08(bios, volt + 3); in nvbios_volt_table()
59 *len = nvbios_rd08(bios, volt + 2); in nvbios_volt_table()
69 nvbios_volt_parse(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, in nvbios_volt_parse() argument
72 u32 volt = nvbios_volt_table(bios, ver, hdr, cnt, len); in nvbios_volt_parse()
76 info->type = NVBIOS_VOLT_GPIO; in nvbios_volt_parse()
77 info->vidmask = nvbios_rd08(bios, volt + 0x04); in nvbios_volt_parse()
78 info->ranged = false; in nvbios_volt_parse()
81 info->type = NVBIOS_VOLT_GPIO; in nvbios_volt_parse()
[all …]
/linux-6.12.1/drivers/net/wireless/broadcom/brcm80211/include/
Dbrcmu_utils.h1 // SPDX-License-Identifier: ISC
20 countdown -= 10; \
24 /* osl multi-precedence packet queue */
25 #define PKTQ_LEN_DEFAULT 128 /* Max 128 packets */
28 #define BCME_STRLEN 64 /* Max string length for BCM errors */
45 #define MAXBITVAL(nbits) ((1 << (nbits)) - 1)
53 /* 18-bytes of Ethernet address buffer length */
58 u16 max; /* maximum number of queued packets */ member
61 /* multi-priority pkt queue */
64 u16 hi_prec; /* rapid dequeue hint (>= highest non-empty prec) */
[all …]
/linux-6.12.1/fs/nfsd/
Dnfscache.c1 // SPDX-License-Identifier: GPL-2.0
4 * change in the future and be a per-client cache.
26 * We use this value to determine the number of hash buckets from the max
61 * ~1k, so the above numbers should give a rough max of the amount of memory
64 * XXX: these limits are per-container, so memory used will increase
71 unsigned long low_pages = totalram_pages() - totalhigh_pages(); in nfsd_cache_size_limit()
73 limit = (16 * int_sqrt(low_pages)) << (PAGE_SHIFT-10); in nfsd_cache_size_limit()
78 * Compute the number of hash buckets we need. Divide the max cachesize by
79 * the "target" max bucket size, and round up to next power of two.
95 rp->c_state = RC_UNUSED; in nfsd_cacherep_alloc()
[all …]
/linux-6.12.1/drivers/net/wireless/mediatek/mt76/
Dmt792x_acpi_sar.c1 // SPDX-License-Identifier: ISC
8 mt792x_acpi_read(struct mt792x_dev *dev, u8 *method, u8 **tbl, u32 *len) in mt792x_acpi_read() argument
11 struct mt76_dev *mdev = &dev->mt76; in mt792x_acpi_read()
18 root = ACPI_HANDLE(mdev->dev); in mt792x_acpi_read()
20 return -EOPNOTSUPP; in mt792x_acpi_read()
24 return -EIO; in mt792x_acpi_read()
28 return -EIO; in mt792x_acpi_read()
31 if (sar_root->type != ACPI_TYPE_PACKAGE || in mt792x_acpi_read()
32 sar_root->package.count < 4 || in mt792x_acpi_read()
33 sar_root->package.elements[0].type != ACPI_TYPE_INTEGER) { in mt792x_acpi_read()
[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
117 * position, but restrict this to the max length of the buffer, anything
118 * passed the max length will be ignored. Multiple writes will append
125 SYSCTL_WRITES_LEGACY = -1,
149 size_t len; in _proc_do_string() local
[all …]
/linux-6.12.1/Documentation/netlink/specs/
Dteam.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
5 protocol: genetlink-legacy
10 c-family-name: team-genl-name
11 c-version-name: team-genl-version
12 kernel-policy: global
13 uapi-header: linux/if_team.h
16 -
17 name: string-max-len
20 -
21 name: genl-change-event-mc-grp-name
[all …]

12345678910>>...44