/linux/net/wireless/ |
H A D | of.c | 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 30 struct ieee80211_freq_range *limit = &freq_limits[i]; in wiphy_freq_limits_valid_chan() local 32 if (cfg80211_does_bw_fit_range(limit, in wiphy_freq_limits_valid_chan() 33 MHZ_TO_KHZ(chan->center_freq), in wiphy_freq_limits_valid_chan() 52 struct ieee80211_supported_band *sband = wiphy->bands[band]; in wiphy_freq_limits_apply() [all …]
|
/linux/arch/powerpc/mm/book3s64/ |
H A D | subpage_prot.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright 2007-2008 Paul Mackerras, IBM Corp. 24 struct subpage_prot_table *spt = mm_ctx_subpage_prot(&mm->context); in subpage_prot_free() 32 if (spt->low_prot[i]) { in subpage_prot_free() 33 free_page((unsigned long)spt->low_prot[i]); in subpage_prot_free() 34 spt->low_prot[i] = NULL; in subpage_prot_free() 39 p = spt->protptrs[i]; in subpage_prot_free() 42 spt->protptrs[i] = NULL; in subpage_prot_free() 43 for (j = 0; j < SBP_L2_COUNT && addr < spt->maxaddr; in subpage_prot_free() 49 spt->maxaddr = 0; in subpage_prot_free() [all …]
|
/linux/fs/romfs/ |
H A D | storage.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 18 #define ROMFS_MTD_READ(sb, ...) mtd_read((sb)->s_mtd, ##__VA_ARGS__) 30 return (ret < 0 || rlen != buflen) ? -EIO : 0; in romfs_mtd_read() 42 size_t len; in romfs_mtd_strnlen() local 48 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen() 51 p = memchr(buf, 0, len); in romfs_mtd_strnlen() 53 return n + (p - buf); in romfs_mtd_strnlen() 54 maxlen -= len; in romfs_mtd_strnlen() 55 pos += len; in romfs_mtd_strnlen() 56 n += len; in romfs_mtd_strnlen() [all …]
|
/linux/drivers/power/supply/ |
H A D | gpio-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> 18 #include <linux/power/gpio-charger.h> 59 int ndescs = gpio_charger->current_limit_gpios->ndescs; in set_charge_current_limit() 60 struct gpio_desc **gpios = gpio_charger->current_limit_gpios->desc; in set_charge_current_limit() 63 if (!gpio_charger->current_limit_map_size) in set_charge_current_limit() 64 return -EINVAL; in set_charge_current_limit() 66 for (i = 0; i < gpio_charger->current_limit_map_size; i++) { in set_charge_current_limit() 67 if (gpio_charger->current_limit_map[i].limit_ua <= val) in set_charge_current_limit() 72 * If a valid charge current limit isn't found, default to smallest in set_charge_current_limit() [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/lib/ |
H A D | decompress_bunzip2.c | 20 the Burrows-Wheeler transformation. Much of that time is delay 25 non-profit hospice organization in the name of the woman I loved, who 32 Lafayette, LA 70503-3240 34 Phone (337) 232-1234 or 1-800-738-2226 35 Fax (337) 232-1297 70 #define RETVAL_LAST_BLOCK (-1) 71 #define RETVAL_NOT_BZIP_DATA (-2) 72 #define RETVAL_UNEXPECTED_INPUT_EOF (-3) 73 #define RETVAL_UNEXPECTED_OUTPUT_EOF (-4) 74 #define RETVAL_DATA_ERROR (-5) [all …]
|
H A D | xxhash.c | 2 * xxHash - Extremely Fast Hash algorithm 3 * Copyright (C) 2012-2016, Yann Collet. 5 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 7 * Redistribution and use in source and binary forms, with or without 15 * in the documentation and/or other materials provided with the 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY [all …]
|
/linux/block/ |
H A D | blk-lib.c | 1 // SPDX-License-Identifier: GPL-2.0 19 sector += bdev->bd_start_sect; in bio_discard_limit() 29 return granularity_aligned_sector - sector; in bio_discard_limit() 50 bio->bi_iter.bi_sector = *sector; in blk_alloc_discard_bio() 51 bio->bi_iter.bi_size = bio_sects << SECTOR_SHIFT; in blk_alloc_discard_bio() 53 *nr_sects -= bio_sects; in blk_alloc_discard_bio() 76 * blkdev_issue_discard - queue a discard 96 if (ret == -EOPNOTSUPP) in blkdev_issue_discard() 108 sector_t bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1; in bio_write_zeroes_limit() 119 * queue limit is likely to change at runtime. [all …]
|
/linux/drivers/scsi/be2iscsi/ |
H A D | be.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 4 * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries. 7 * linux-drivers@broadcom.com 32 u16 len; member 40 static inline u32 MODULO(u16 val, u16 limit) in MODULO() argument 42 WARN_ON(limit & (limit - 1)); in MODULO() 43 return val & (limit - 1); in MODULO() 46 static inline void index_inc(u16 *index, u16 limit) in index_inc() argument 48 *index = MODULO((*index + 1), limit); in index_inc() 53 return q->dma_mem.va + q->head * q->entry_size; in queue_head_node() [all …]
|
/linux/lib/xz/ |
H A D | xz_dec_lzma2.c | 1 // SPDX-License-Identifier: 0BSD 7 * Igor Pavlov <https://7-zip.org/> 32 * pos <= limit <= end 34 * In multi-call mode, also these are true: 39 * Most of these variables are size_t to support single-call mode, 59 /* Write limit; we don't write to buf[limit] or later bytes. */ 60 size_t limit; member 63 * End of the dictionary buffer. In multi-call mode, this is 64 * the same as the dictionary size. In single-call mode, this 77 * Maximum allowed dictionary size in multi-call mode. [all …]
|
/linux/net/sched/ |
H A D | sch_tbf.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Dmitry Torokhov <dtor@mail.ru> - allow attaching inner qdiscs - 27 ------- 32 ------------ 36 does not exceed B + R*(t_f-t_i). 42 s_i+....+s_k <= B + R*(t_k - t_i) 45 ---------- 55 N(t_* + 0) = N(t_* - 0) - S/R. 69 lat = max ((L-B)/R, (L-M)/P) 73 ------ [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 12 len-or-define: 14 pattern: ^[0-9A-Za-z_-]+( - 1)?$ 16 len-or-limit: 17 # literal int, const name, or limit based on fixed-width type 18 # e.g. u8-min, u16-max, etc. 20 pattern: ^[0-9A-Za-z_-]+$ [all …]
|
H A D | genetlink-c.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-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, const name, or limit based on fixed-width type 18 # e.g. u8-min, u16-max, etc. 20 pattern: ^[0-9A-Za-z_-]+$ [all …]
|
H A D | genetlink-legacy.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 12 len-or-define: 14 pattern: ^[0-9A-Za-z_-]+( - 1)?$ 16 len-or-limit: 17 # literal int, const name, or limit based on fixed-width type 18 # e.g. u8-min, u16-max, etc. 20 pattern: ^[0-9A-Za-z_-]+$ [all …]
|
/linux/samples/bpf/ |
H A D | hbm_edt_kern.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * This program is free software; you can redistribute it and/or 10 * A cgroup skb BPF egress program to limit cgroup output bandwidth. 11 * It uses a modified virtual token bucket queue to limit average 20 * - <--------------------------|------------------------> + 45 * The default bandwidth limit is set at 1Gbps but this can be changed by 47 * program does not limit connections using loopback. This behavior can be 49 * some statistics, such as percent of packets marked or dropped, which 68 int len = skb->len; in _hbm_out_cg() local 74 if (qsp != NULL && !qsp->loopback && (skb->ifindex == 1)) in _hbm_out_cg() [all …]
|
H A D | hbm_out_kern.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * This program is free software; you can redistribute it and/or 10 * A cgroup skb BPF egress program to limit cgroup output bandwidth. 11 * It uses a modified virtual token bucket queue to limit average 20 * - <--------------------------|------------------------> + 45 * The default bandwidth limit is set at 1Gbps but this can be changed by 47 * program does not limit connections using loopback. This behavior can be 49 * some statistics, such as percent of packets marked or dropped, which 61 int len = skb->len; in _hbm_out_cg() local 76 if (qsp != NULL && !qsp->loopback && (skb->ifindex == 1)) in _hbm_out_cg() [all …]
|
/linux/fs/jfs/ |
H A D | jfs_types.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Copyright (C) International Business Machines Corp., 2000-2004 59 static inline void PXDlength(pxd_t *pxd, __u32 len) in PXDlength() argument 61 pxd->len_addr = (pxd->len_addr & cpu_to_le32(~0xffffff)) | in PXDlength() 62 cpu_to_le32(len & 0xffffff); in PXDlength() 67 pxd->len_addr = (pxd->len_addr & cpu_to_le32(0xffffff)) | in PXDaddress() 69 pxd->addr2 = cpu_to_le32(addr & 0xffffffff); in PXDaddress() 75 return le32_to_cpu((pxd)->len_addr) & 0xffffff; in lengthPXD() 80 __u64 n = le32_to_cpu(pxd->len_addr) & ~0xffffff; in addressPXD() 81 return (n << 8) + le32_to_cpu(pxd->addr2); in addressPXD() [all …]
|
/linux/drivers/staging/rtl8723bs/core/ |
H A D | rtw_ieee80211.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. 34 /* for adhoc-master to generate ie and provide supported-rate to fw */ 100 /* could be pure B, pure G, or B/G */ in rtw_check_network_type() 108 u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source, in rtw_set_fixed_ie() argument 111 memcpy((void *)pbuf, (void *)source, len); in rtw_set_fixed_ie() 112 *frlen = *frlen + len; in rtw_set_fixed_ie() 113 return pbuf + len; in rtw_set_fixed_ie() 119 uint len, in rtw_set_ie() argument 125 *(pbuf + 1) = (u8)len; in rtw_set_ie() [all …]
|
/linux/drivers/scsi/esas2r/ |
H A D | esas2r_io.c | 5 * Copyright (c) 2001-2013 ATTO Technology, Inc. 8 * This program is free software; you can redistribute it and/or 11 * of the License, or (at your option) any later version. 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR 20 * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT 21 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 22 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is 26 * the risks and costs of program errors, damage to or loss of data, 27 * programs or equipment, and unavailability or interruption of operations. [all …]
|
/linux/fs/netfs/ |
H A D | direct_read.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 struct netfs_io_request *rreq = subreq->rreq; in netfs_prepare_dio_read_iterator() 24 rsize = umin(subreq->len, rreq->io_streams[0].sreq_max_len); in netfs_prepare_dio_read_iterator() 25 subreq->len = rsize; in netfs_prepare_dio_read_iterator() 27 if (unlikely(rreq->io_streams[0].sreq_max_segs)) { in netfs_prepare_dio_read_iterator() 28 size_t limit = netfs_limit_iter(&rreq->buffer.iter, 0, rsize, in netfs_prepare_dio_read_iterator() local 29 rreq->io_streams[0].sreq_max_segs); in netfs_prepare_dio_read_iterator() 31 if (limit < rsize) { in netfs_prepare_dio_read_iterator() 32 subreq->len = limit; in netfs_prepare_dio_read_iterator() 39 subreq->io_iter = rreq->buffer.iter; in netfs_prepare_dio_read_iterator() [all …]
|
/linux/include/uapi/linux/ |
H A D | falloc.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 7 #define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */ 21 * granularity of the operation. Most will limit operations to 22 * filesystem block size boundaries, but this boundary may be larger or 23 * smaller depending on the filesystem and/or the configuration of the 24 * filesystem or file. 27 * considered an illegal operation - just use ftruncate(2) if you need 36 * unwritten extents - even though file system may choose to zero out the 37 * extent or do whatever which will result in reading zeros from the range 49 * shifted towards right by len bytes to create a hole. As such, this [all …]
|
/linux/fs/nfsd/ |
H A D | nfscache.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * change in the future and be a per-client cache. 64 * XXX: these limits are per-container, so memory used will increase 70 unsigned int limit; in nfsd_cache_size_limit() local 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() 74 return min_t(unsigned int, limit, 256*1024); in nfsd_cache_size_limit() 82 nfsd_hashsize(unsigned int limit) in nfsd_hashsize() argument 84 return roundup_pow_of_two(limit / TARGET_BUCKET_SIZE); in nfsd_hashsize() 95 rp->c_state = RC_UNUSED; in nfsd_cacherep_alloc() [all …]
|
/linux/net/dccp/ |
H A D | feat.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 15 * Known limit values 17 /* Ack Ratio takes 2-byte integer values (11.3) */ 19 /* Wmin=32 and Wmax=2^46-1 from 7.5.2 */ 23 #define DCCP_FEAT_MAX_SP_VALS (DCCP_SINGLE_OPT_MAXLEN - 2) 26 FEAT_AT_RX = 1, /* located at RX side of half-connection */ 27 FEAT_AT_TX = 2, /* located at TX side of half-connection */ 28 FEAT_SP = 4, /* server-priority reconciliation (6.3.1) */ 29 FEAT_NN = 8, /* non-negotiable reconciliation (6.3.2) */ 30 FEAT_UNKNOWN = 0xFF /* not understood or invalid feature */ [all …]
|
/linux/drivers/usb/usbip/ |
H A D | vudc_transfer.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * Copyright (C) 2015-2016 Samsung Electronics 9 * Copyright (C) 2003-2005 Alan Stern 39 return -1; in get_frame_limit() 45 * handle_control_request() - handles all control transfers 52 * Return 0 - if the request was handled 53 * 1 - if the request wasn't handles 67 w_index = le16_to_cpu(setup->wIndex); in handle_control_request() 68 w_value = le16_to_cpu(setup->wValue); in handle_control_request() 69 switch (setup->bRequest) { in handle_control_request() [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/engine/ |
H A D | falcon.c | 8 * and/or sell copies of the Software, and to permit persons to whom the 12 * all copies or substantial portions of the Software. 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32 struct nvkm_falcon *falcon = nvkm_falcon(oclass->engine); in nvkm_falcon_oclass_get() 35 while (falcon->func->sclass[c].oclass) { in nvkm_falcon_oclass_get() 37 oclass->base = falcon->func->sclass[index]; in nvkm_falcon_oclass_get() 49 return nvkm_gpuobj_new(object->engine->subdev.device, 256, in nvkm_falcon_cclass_bind() [all …]
|