Home
last modified time | relevance | path

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

12345678910>>...43

/linux/fs/ext4/
H A 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 …]
H A Dmballoc.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
18 #include <linux/backing-dev.h>
25 * - test ext4_ext_search_left() and ext4_ext_search_right()
26 * - search for metadata in few groups
29 * - normalization should take into account whether file is still open
30 * - discard preallocations if no free space left (policy?)
31 * - don't normalize tails
32 * - quota
33 * - reservation for superuser
[all …]
/linux/lib/zlib_inflate/
H A 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/lib/
H A 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/drivers/scsi/ibmvscsi_tgt/
H A 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/include/linux/
H A Dminmax.h1 /* SPDX-License-Identifier: GPL-2.0 */
11 * min()/max()/clamp() macros must accomplish several things:
13 * - Avoid multiple evaluations of the arguments (so side-effects like
14 * "x++" happen only once) when non-constant.
15 * - Perform signed v unsigned type-checking (to generate compile
17 * - Unsigne
136 #define max(x, y) __careful_cmp(max, global() macro
240 __minmax_array(op,array,len) global() argument
255 min_array(array,len) global() argument
264 max_array(array,len) global() argument
291 in_range64(u64 val,u64 start,u64 len) in_range64() argument
296 in_range32(u32 val,u32 start,u32 len) in_range32() argument
313 in_range(val,start,len) global() argument
330 #define MAX( global() macro
[all...]
H A 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/fs/smb/client/
H A 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/net/netfilter/
H A 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/net/xdp/
H A 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/tools/perf/scripts/python/
H A 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/drivers/pnp/
H A 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/drivers/pnp/pnpbios/
H A 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/fs/hfsplus/
H A 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/Documentation/netlink/
H A 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/Documentation/core-api/
H A 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/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A 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/fs/nfsd/
H A 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/drivers/net/wireless/broadcom/brcm80211/include/
H A 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/drivers/net/wireless/mediatek/mt76/
H A 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/tools/power/cpupower/utils/helpers/
H A Dbitmask.c1 // SPDX-License-Identifier: GPL-2.0
12 #define howmany(x, y) (((x)+((y)-1))/(y))
17 #define max(a, b) ((a) > (b) ? (a) : (b)) macro
31 bmp->size = n; in bitmask_alloc()
32 bmp->maskp = calloc(longsperbits(n), sizeof(unsigned long)); in bitmask_alloc()
33 if (!bmp->maskp) { in bitmask_alloc()
45 free(bmp->maskp); in bitmask_free()
46 bmp->maskp = (unsigned long *)0xdeadcdef; /* double free tripwire */ in bitmask_free()
52 * routines that actually understand the layout of bmp->maskp[].
64 if (n < bmp->size) in _getbit()
[all …]
/linux/Documentation/netlink/specs/
H A 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 …]
/linux/scripts/dtc/libfdt/
H A Dfdt_ro.c1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
3 * libfdt - Flat Device Tree manipulation
14 const char *s, int len) in fdt_nodename_eq_() argument
19 if (!p || olen < len) in fdt_nodename_eq_()
23 if (memcmp(p, s, len) != 0) in fdt_nodename_eq_()
26 if (p[len] == '\0') in fdt_nodename_eq_()
28 else if (!memchr(s, '@', len) && (p[len] == '@')) in fdt_nodename_eq_()
38 size_t len; in fdt_get_string() local
54 err = -FDT_ERR_BADOFFSET; in fdt_get_string()
58 len = totalsize - absoffset; in fdt_get_string()
[all …]
/linux/scripts/kconfig/
H A 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()
178 int len = get_line_length(line); in fill_window() local
179 strncpy(tmp, line, min(len, x)); in fill_window()
[all …]
/linux/drivers/net/usb/
H A Dcdc_ncm.c4 * Copyright (C) ST-Ericsson 2010-2012
16 * of the GNU General Public License (GPL) Version 2 or the 2-clause
78 .sizeof_stat = sizeof(((struct cdc_ncm_ctx *)0)->m), \
101 return -EOPNOTSUPP; in cdc_ncm_get_sset_count()
110 struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; in cdc_ncm_get_ethtool_stats()
152 struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; in cdc_ncm_check_rx_max()
153 u32 val, max, min; in cdc_ncm_check_rx_max() local
157 max = min_t(u32, CDC_NCM_NTB_MAX_SIZE_RX, le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)); in cdc_ncm_check_rx_max()
160 if (max < min) { in cdc_ncm_check_rx_max()
161 dev_warn(&dev->intf->dev, "dwNtbInMaxSize=%u is too small. Using %u\n", in cdc_ncm_check_rx_max()
[all …]

12345678910>>...43