Searched refs:length (Results 1 - 200 of 5932) sorted by relevance

1234567891011>>

/linux-4.1.27/fs/squashfs/
H A Dblock.c42 * Read the metadata block length, this is stored in the first two
46 u64 *cur_index, int *offset, int *length) get_block_length()
56 *length = (unsigned char) bh->b_data[*offset]; get_block_length()
61 *length |= (unsigned char) bh->b_data[0] << 8; get_block_length()
64 *length = (unsigned char) bh->b_data[*offset] | get_block_length()
84 * filesystem), otherwise the length is obtained from the first two bytes of
85 * the metadata block. A bit in the length field indicates if the block
90 int squashfs_read_data(struct super_block *sb, u64 index, int length, squashfs_read_data() argument
99 bh = kcalloc(((output->length + msblk->devblksize - 1) squashfs_read_data()
104 if (length) { squashfs_read_data()
109 compressed = SQUASHFS_COMPRESSED_BLOCK(length); squashfs_read_data()
110 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length); squashfs_read_data()
112 *next_index = index + length; squashfs_read_data()
115 index, compressed ? "" : "un", length, output->length); squashfs_read_data()
117 if (length < 0 || length > output->length || squashfs_read_data()
118 (index + length) > msblk->bytes_used) squashfs_read_data()
121 for (b = 0; bytes < length; b++, cur_index++) { squashfs_read_data()
135 bh[0] = get_block_length(sb, &cur_index, &offset, &length); squashfs_read_data()
141 compressed = SQUASHFS_COMPRESSED(length); squashfs_read_data()
142 length = SQUASHFS_COMPRESSED_SIZE(length); squashfs_read_data()
144 *next_index = index + length + 2; squashfs_read_data()
147 compressed ? "" : "un", length); squashfs_read_data()
149 if (length < 0 || length > output->length || squashfs_read_data()
150 (index + length) > msblk->bytes_used) squashfs_read_data()
153 for (; bytes < length; b++) { squashfs_read_data()
169 length = squashfs_decompress(msblk, bh, b, offset, length, squashfs_read_data()
171 if (length < 0) squashfs_read_data()
180 for (bytes = length; k < b; k++) { squashfs_read_data()
203 return length; squashfs_read_data()
45 get_block_length(struct super_block *sb, u64 *cur_index, int *offset, int *length) get_block_length() argument
H A Dpage_actor.h15 int length; member in struct:squashfs_page_actor
20 int pages, int length) squashfs_page_actor_init()
27 actor->length = length ? : pages * PAGE_CACHE_SIZE; squashfs_page_actor_init()
61 int length; member in struct:squashfs_page_actor
19 squashfs_page_actor_init(void **page, int pages, int length) squashfs_page_actor_init() argument
H A Dcache.c66 struct squashfs_cache *cache, u64 block, int length) squashfs_cache_get()
123 entry->length = squashfs_read_data(sb, block, length, squashfs_cache_get()
128 if (entry->length < 0) squashfs_cache_get()
129 entry->error = entry->length; squashfs_cache_get()
302 * Copy up to length bytes from cache entry to buffer starting at offset bytes
303 * into the cache entry. If there's not length bytes then copy the number of
307 int offset, int length) squashfs_copy_data()
309 int remaining = length; squashfs_copy_data()
311 if (length == 0) squashfs_copy_data()
314 return min(length, entry->length - offset); squashfs_copy_data()
316 while (offset < entry->length) { squashfs_copy_data()
319 int bytes = min_t(int, entry->length - offset, squashfs_copy_data()
334 return length - remaining; squashfs_copy_data()
339 * Read length bytes from metadata position <block, offset> (block is the
342 * and length bytes may require reading more than one block.
345 u64 *block, int *offset, int length) squashfs_read_metadata()
348 int bytes, res = length; squashfs_read_metadata()
353 while (length) { squashfs_read_metadata()
358 } else if (*offset >= entry->length) { squashfs_read_metadata()
363 bytes = squashfs_copy_data(buffer, entry, *offset, length); squashfs_read_metadata()
366 length -= bytes; squashfs_read_metadata()
369 if (*offset == entry->length) { squashfs_read_metadata()
390 u64 start_block, int length) squashfs_get_fragment()
395 length); squashfs_get_fragment()
405 u64 start_block, int length) squashfs_get_datablock()
409 return squashfs_cache_get(sb, msblk->read_page, start_block, length); squashfs_get_datablock()
416 void *squashfs_read_table(struct super_block *sb, u64 block, int length) squashfs_read_table() argument
418 int pages = (length + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; squashfs_read_table()
423 table = buffer = kmalloc(length, GFP_KERNEL); squashfs_read_table()
433 actor = squashfs_page_actor_init(data, pages, length); squashfs_read_table()
442 res = squashfs_read_data(sb, block, length | squashfs_read_table()
65 squashfs_cache_get(struct super_block *sb, struct squashfs_cache *cache, u64 block, int length) squashfs_cache_get() argument
306 squashfs_copy_data(void *buffer, struct squashfs_cache_entry *entry, int offset, int length) squashfs_copy_data() argument
344 squashfs_read_metadata(struct super_block *sb, void *buffer, u64 *block, int *offset, int length) squashfs_read_metadata() argument
389 squashfs_get_fragment(struct super_block *sb, u64 start_block, int length) squashfs_get_fragment() argument
404 squashfs_get_datablock(struct super_block *sb, u64 start_block, int length) squashfs_get_datablock() argument
H A Dpage_actor.c44 int pages, int length) squashfs_page_actor_init()
51 actor->length = length ? : pages * PAGE_CACHE_SIZE; squashfs_page_actor_init()
84 int pages, int length) squashfs_page_actor_init_special()
91 actor->length = length ? : pages * PAGE_CACHE_SIZE; squashfs_page_actor_init_special()
43 squashfs_page_actor_init(void **buffer, int pages, int length) squashfs_page_actor_init() argument
83 squashfs_page_actor_init_special(struct page **page, int pages, int length) squashfs_page_actor_init_special() argument
H A Dsymlink.c54 int length = min_t(int, i_size_read(inode) - index, PAGE_CACHE_SIZE); squashfs_symlink_readpage() local
77 * Read length bytes from symlink metadata. Squashfs_read_metadata squashfs_symlink_readpage()
80 * squashfs_cache_get routine. As length bytes may overlap metadata squashfs_symlink_readpage()
83 for (bytes = 0; bytes < length; offset = 0, bytes += copied) { squashfs_symlink_readpage()
95 length - bytes); squashfs_symlink_readpage()
96 if (copied == length - bytes) squashfs_symlink_readpage()
97 memset(pageaddr + length, 0, PAGE_CACHE_SIZE - length); squashfs_symlink_readpage()
H A Did.c71 unsigned int length = SQUASHFS_ID_BLOCK_BYTES(no_ids); squashfs_read_id_index_table() local
74 TRACE("In read_id_index_table, length %d\n", length); squashfs_read_id_index_table()
83 * length bytes should not extend into the next table - this check squashfs_read_id_index_table()
87 if (id_table_start + length > next_table) squashfs_read_id_index_table()
90 table = squashfs_read_table(sb, id_table_start, length); squashfs_read_id_index_table()
/linux-4.1.27/sound/usb/line6/
H A Dmidibuf.c23 static const int length[] = { 3, 3, 3, 3, 2, 2, 3 }; midibuf_message_length() local
25 message_length = length[(code >> 4) - 8]; midibuf_message_length()
32 static const int length[] = { -1, 2, -1, 2, -1, -1, 1, 1, 1, 1, midibuf_message_length() local
35 message_length = length[code & 0x0f]; midibuf_message_length()
89 int length) line6_midibuf_write()
95 if (midibuf_is_full(this) || (length <= 0)) line6_midibuf_write()
99 if (data[length - 1] == 0xfe) { line6_midibuf_write()
100 --length; line6_midibuf_write()
106 if (length > bytes_free) line6_midibuf_write()
107 length = bytes_free; line6_midibuf_write()
109 if (length > 0) { line6_midibuf_write()
112 if (length < length1) { line6_midibuf_write()
114 memcpy(this->buf + this->pos_write, data, length); line6_midibuf_write()
115 this->pos_write += length; line6_midibuf_write()
118 length2 = length - length1; line6_midibuf_write()
128 return length + skip_active_sense; line6_midibuf_write()
132 int length) line6_midibuf_read()
142 if (length < 3) line6_midibuf_read()
150 if (length > bytes_used) line6_midibuf_read()
151 length = bytes_used; line6_midibuf_read()
155 /* check MIDI command length */ line6_midibuf_read()
177 if (length < length1) { line6_midibuf_read()
179 for (i = 1; i < length; ++i) line6_midibuf_read()
186 length2 = length - length1; line6_midibuf_read()
203 if (midi_length == length) line6_midibuf_read()
211 if (length < midi_length) line6_midibuf_read()
214 length = midi_length; line6_midibuf_read()
217 if (length < length1) { line6_midibuf_read()
219 memcpy(data + repeat, this->buf + this->pos_read, length); line6_midibuf_read()
220 this->pos_read += length; line6_midibuf_read()
223 length2 = length - length1; line6_midibuf_read()
233 return length + repeat; line6_midibuf_read()
236 int line6_midibuf_ignore(struct midi_buffer *this, int length) line6_midibuf_ignore() argument
240 if (length > bytes_used) line6_midibuf_ignore()
241 length = bytes_used; line6_midibuf_ignore()
243 this->pos_read = (this->pos_read + length) % this->size; line6_midibuf_ignore()
245 return length; line6_midibuf_ignore()
88 line6_midibuf_write(struct midi_buffer *this, unsigned char *data, int length) line6_midibuf_write() argument
131 line6_midibuf_read(struct midi_buffer *this, unsigned char *data, int length) line6_midibuf_read() argument
H A Dmidibuf.h27 extern int line6_midibuf_ignore(struct midi_buffer *mb, int length);
30 int length);
33 int length);
/linux-4.1.27/arch/x86/include/asm/
H A Dbios_ebda.h21 * Return the sanitized length of the EBDA in bytes, if it exists.
26 unsigned int length; get_bios_ebda_length() local
32 /* EBDA length is byte 0 of the EBDA (stored in KiB) */ get_bios_ebda_length()
33 length = *(unsigned char *)phys_to_virt(address); get_bios_ebda_length()
34 length <<= 10; get_bios_ebda_length()
36 /* Trim the length if it extends beyond 640KiB */ get_bios_ebda_length()
37 length = min_t(unsigned int, (640 * 1024) - address, length); get_bios_ebda_length()
38 return length; get_bios_ebda_length()
/linux-4.1.27/arch/x86/include/uapi/asm/
H A Da.out.h7 unsigned a_text; /* length of text, in bytes */
8 unsigned a_data; /* length of data, in bytes */
9 unsigned a_bss; /* length of uninitialized data area for file, in bytes */
10 unsigned a_syms; /* length of symbol table data in file, in bytes */
12 unsigned a_trsize; /* length of relocation info for text, in bytes */
13 unsigned a_drsize; /* length of relocation info for data, in bytes */
/linux-4.1.27/arch/m68k/include/uapi/asm/
H A Da.out.h7 unsigned a_text; /* length of text, in bytes */
8 unsigned a_data; /* length of data, in bytes */
9 unsigned a_bss; /* length of uninitialized data area for file, in bytes */
10 unsigned a_syms; /* length of symbol table data in file, in bytes */
12 unsigned a_trsize; /* length of relocation info for text, in bytes */
13 unsigned a_drsize; /* length of relocation info for data, in bytes */
/linux-4.1.27/drivers/s390/cio/
H A Dcio_debug.h23 static inline void CIO_HEX_EVENT(int level, void *data, int length) CIO_HEX_EVENT() argument
27 while (length > 0) { CIO_HEX_EVENT()
28 debug_event(cio_debug_trace_id, level, data, length); CIO_HEX_EVENT()
29 length -= cio_debug_trace_id->buf_size; CIO_HEX_EVENT()
/linux-4.1.27/lib/
H A Dcheck_signature.c8 * @length: length of signature
16 const unsigned char *signature, int length) check_signature()
18 while (length--) { check_signature()
15 check_signature(const volatile void __iomem *io_addr, const unsigned char *signature, int length) check_signature() argument
H A Ducs2_string.c8 unsigned long length = 0; ucs2_strnlen() local
10 while (*s++ != 0 && length < maxlength) ucs2_strnlen()
11 length++; ucs2_strnlen()
12 return length; ucs2_strnlen()
24 * Return the number of bytes is the length of this string
H A Dpci_iomap.c17 * @maxlen: max length of the memory to map
24 * @maxlen specifies the maximum length to map. If you want to get access to
58 * @maxlen: length of the memory to map
65 * @maxlen specifies the maximum length to map. If you want to get access to
66 * the complete BAR without checking for its length first, pass %0 here.
H A Dinflate.c20 length of 258) in the previous 32 K bytes. If it doesn't find any
21 matches (of at least length 3), it codes the next byte. Otherwise, it
22 codes the length of the matched string and its distance backwards from
25 code codes the distance information, which follows a length code. Each
26 length or distance code actually represents a base value and a number
29 length code. The decoding process is basically: get a literal/length
31 length then get the distance and emit the referred-to bytes from the
44 an encoding of the literal/length and distance Huffman codes that are
67 3. There is an implied maximum of 7 bits for the bit length table and
77 length.
78 6. There are up to 286 literal/length codes. Code 256 represents the
79 end-of-block. Note however that the static length tree defines
81 cannot be used though, since there is no length base or extra bits
89 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
90 (1+6+6). Therefore, to output three times the length, you output
91 three codes (1+1+1), whereas to output four times the same length,
96 12. Note: length code 284 can represent 227-258, but length code 285
97 really is 258. The last length deserves its own, short code
98 since it gets used a lot in very redundant files. The length
99 258 is special since 258 - 3 (the min match length) is 255.
100 13. The literal/length and distance code bit lengths are read as a
142 ush n; /* literal, length base, or distance base */
173 static const unsigned border[] = { /* Order of the bit length code lengths */
213 is 7 bits, but the other literal/length codes can be 8 or 9 bits.
216 literal/length codes have a significantly lower probability of
290 length codes can decode in one step, and dbits is the same thing for
293 codes are shorter than that, in which case the longest code length in
295 table size, in which case the length of the shortest code in bits is
299 different number of possibilities each. The literal/length table
309 STATIC const int lbits = 9; /* bits in base literal/length lookup table */
314 #define BMAX 16 /* maximum bit length of any code (16 for explode) */
333 case), two if the input is invalid (all zero length codes or an huft_build()
336 unsigned a; /* counter for codes of length k */ huft_build()
338 int g; /* maximum code length */ huft_build()
352 unsigned c[BMAX+1]; /* bit length count table */ huft_build()
354 unsigned v[N_MAX]; /* values in order of bit length */ huft_build()
372 /* Generate counts for each bit length */ huft_build()
381 if (c[0] == n) /* null input--all zero length codes */ huft_build()
391 /* Find minimum and maximum length, bound *m by those */ huft_build()
396 k = j; /* minimum code length */ huft_build()
402 g = i; /* maximum code length */ huft_build()
409 /* Adjust last length count to fill out codes, if needed */ huft_build()
423 /* Generate starting offsets into the value table for each length */ huft_build()
438 n = x[g]; /* set n to length of v */ huft_build()
460 /* here i is the Huffman code of length k bits for value *p */ huft_build()
589 struct huft *tl, /* literal/length decoder tables */ inflate_codes()
598 unsigned n, d; /* length and index for copy */ inflate_codes()
636 else /* it's an EOB or a length */ inflate_codes()
642 /* get length of block to copy */ inflate_codes()
724 /* get the length and its complement */ inflate_stored()
770 struct huft *tl; /* literal/length code table */ inflate_fixed()
774 unsigned *l; /* length list for huft_build */ inflate_fixed()
833 unsigned l; /* last length */ inflate_dynamic()
836 struct huft *tl; /* literal/length code table */ inflate_dynamic()
840 unsigned nb; /* number of bit length codes */ inflate_dynamic()
841 unsigned nl; /* number of literal/length codes */ inflate_dynamic()
843 unsigned *ll; /* literal/length and distance code lengths */ inflate_dynamic()
851 ll = malloc(sizeof(*ll) * (288+32)); /* literal/length and distance code lengths */ inflate_dynamic()
853 ll = malloc(sizeof(*ll) * (286+30)); /* literal/length and distance code lengths */ inflate_dynamic()
866 nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */ inflate_dynamic()
872 nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */ inflate_dynamic()
886 /* read in bit-length-code lengths */ inflate_dynamic()
920 if (j < 16) /* length of code in bits (0..15) */ inflate_dynamic()
921 ll[i++] = l = j; /* save last length in l */ inflate_dynamic()
922 else if (j == 16) /* repeat last length 3 to 6 times */ inflate_dynamic()
934 else if (j == 17) /* 3 to 10 zero length codes */ inflate_dynamic()
947 else /* j == 18: 11 to 138 zero length codes */ inflate_dynamic()
975 /* build the decoding tables for literal/length and distance codes */ inflate_dynamic()
1199 ulg orig_len = 0; /* original uncompressed length */
1279 /* Get the crc and original length */
1299 error("length error");
/linux-4.1.27/tools/usb/usbip/libsrc/
H A Dsysfs_utils.c13 int length; write_sysfs_attribute() local
21 length = write(fd, new_value, len); write_sysfs_attribute()
22 if (length < 0) { write_sysfs_attribute()
/linux-4.1.27/arch/arm/mach-gemini/
H A Dmm.c24 .length = SZ_512K,
29 .length = SZ_512K,
34 .length = SZ_512K,
39 .length = SZ_512K,
44 .length = SZ_512K,
49 .length = SZ_512K,
54 .length = SZ_512K,
59 .length = SZ_512K,
64 .length = SZ_512K,
69 .length = SZ_512K,
74 .length = SZ_512K,
/linux-4.1.27/arch/s390/pci/
H A Dpci_mmio.c35 const void __user *, user_buffer, size_t, length) SYSCALL_DEFINE3()
46 if (length <= 0 || PAGE_SIZE - (mmio_addr & ~PAGE_MASK) < length) SYSCALL_DEFINE3()
48 if (length > 64) { SYSCALL_DEFINE3()
49 buf = kmalloc(length, GFP_KERNEL); SYSCALL_DEFINE3()
64 if (copy_from_user(buf, user_buffer, length)) SYSCALL_DEFINE3()
67 ret = zpci_memcpy_toio(io_addr, buf, length); SYSCALL_DEFINE3()
75 void __user *, user_buffer, size_t, length) SYSCALL_DEFINE3()
86 if (length <= 0 || PAGE_SIZE - (mmio_addr & ~PAGE_MASK) < length) SYSCALL_DEFINE3()
88 if (length > 64) { SYSCALL_DEFINE3()
89 buf = kmalloc(length, GFP_KERNEL); SYSCALL_DEFINE3()
104 ret = zpci_memcpy_fromio(buf, io_addr, length); SYSCALL_DEFINE3()
107 if (copy_to_user(user_buffer, buf, length)) SYSCALL_DEFINE3()
/linux-4.1.27/drivers/net/arcnet/
H A Darc-rawmode.c40 struct archdr *pkthdr, int length);
43 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
89 struct archdr *pkthdr, int length) rx()
96 BUGMSG(D_DURING, "it's a raw packet (length=%d)\n", length); rx()
98 if (length > MTU) rx()
99 ofs = 512 - length; rx()
101 ofs = 256 - length; rx()
103 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); rx()
109 skb_put(skb, length + ARC_HDR_SIZE); rx()
119 if (length > sizeof(pkt->soft)) rx()
122 length - sizeof(pkt->soft)); rx()
167 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, prepare_tx() argument
177 length -= ARC_HDR_SIZE; /* hard header is not included in packet length */ prepare_tx()
179 if (length > XMTU) { prepare_tx()
182 length, XMTU); prepare_tx()
183 length = XMTU; prepare_tx()
185 if (length >= MinTU) { prepare_tx()
187 hard->offset[1] = ofs = 512 - length; prepare_tx()
188 } else if (length > MTU) { prepare_tx()
190 hard->offset[1] = ofs = 512 - length - 3; prepare_tx()
192 hard->offset[0] = ofs = 256 - length; prepare_tx()
194 BUGMSG(D_DURING, "prepare_tx: length=%d ofs=%d\n", prepare_tx()
195 length,ofs); prepare_tx()
198 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); prepare_tx()
88 rx(struct net_device *dev, int bufnum, struct archdr *pkthdr, int length) rx() argument
H A Dcapmode.c42 struct archdr *pkthdr, int length) rx()
50 BUGMSG(D_DURING, "it's a raw(cap) packet (length=%d)\n", length); rx()
52 if (length >= MinTU) rx()
53 ofs = 512 - length; rx()
55 ofs = 256 - length; rx()
57 skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC); rx()
63 skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); rx()
81 if (length > sizeof(pkt->soft)) rx()
85 length - sizeof(pkt->soft)); rx()
134 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, prepare_tx() argument
142 /* hard header is not included in packet length */ prepare_tx()
143 length -= ARC_HDR_SIZE; prepare_tx()
145 length -= sizeof(int); prepare_tx()
153 if (length > XMTU) { prepare_tx()
156 length, XMTU); prepare_tx()
157 length = XMTU; prepare_tx()
159 if (length > MinTU) { prepare_tx()
161 hard->offset[1] = ofs = 512 - length; prepare_tx()
162 } else if (length > MTU) { prepare_tx()
164 hard->offset[1] = ofs = 512 - length - 3; prepare_tx()
166 hard->offset[0] = ofs = 256 - length; prepare_tx()
168 BUGMSG(D_DURING, "prepare_tx: length=%d ofs=%d\n", prepare_tx()
169 length,ofs); prepare_tx()
179 ((unsigned char*)&pkt->soft.cap.mes),length-1); prepare_tx()
191 int length=sizeof(struct arc_cap); ack_tx() local
199 ackskb = alloc_skb(length + ARC_HDR_SIZE , GFP_ATOMIC); ack_tx()
205 skb_put(ackskb, length + ARC_HDR_SIZE ); ack_tx()
41 rx(struct net_device *dev, int bufnum, struct archdr *pkthdr, int length) rx() argument
H A Drfc1051.c40 struct archdr *pkthdr, int length);
43 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
126 struct archdr *pkthdr, int length) rx()
133 BUGMSG(D_DURING, "it's a raw packet (length=%d)\n", length); rx()
135 if (length >= MinTU) rx()
136 ofs = 512 - length; rx()
138 ofs = 256 - length; rx()
140 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); rx()
146 skb_put(skb, length + ARC_HDR_SIZE); rx()
153 if (length > sizeof(pkt->soft)) rx()
156 length - sizeof(pkt->soft)); rx()
218 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, prepare_tx() argument
228 length -= ARC_HDR_SIZE; /* hard header is not included in packet length */ prepare_tx()
230 if (length > XMTU) { prepare_tx()
233 length, XMTU); prepare_tx()
234 length = XMTU; prepare_tx()
236 if (length > MinTU) { prepare_tx()
238 hard->offset[1] = ofs = 512 - length; prepare_tx()
239 } else if (length > MTU) { prepare_tx()
241 hard->offset[1] = ofs = 512 - length - 3; prepare_tx()
243 hard->offset[0] = ofs = 256 - length; prepare_tx()
246 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); prepare_tx()
125 rx(struct net_device *dev, int bufnum, struct archdr *pkthdr, int length) rx() argument
/linux-4.1.27/security/selinux/
H A Dselinuxfs.c135 ssize_t length; sel_read_enforce() local
137 length = scnprintf(tmpbuf, TMPBUFLEN, "%d", selinux_enforcing); sel_read_enforce()
138 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); sel_read_enforce()
147 ssize_t length; sel_write_enforce() local
150 length = -ENOMEM; sel_write_enforce()
155 length = -EINVAL; sel_write_enforce()
159 length = -ENOMEM; sel_write_enforce()
164 length = -EFAULT; sel_write_enforce()
168 length = -EINVAL; sel_write_enforce()
173 length = task_has_security(current, SECURITY__SETENFORCE); sel_write_enforce()
174 if (length) sel_write_enforce()
187 length = count; sel_write_enforce()
190 return length; sel_write_enforce()
206 ssize_t length; sel_read_handle_unknown() local
211 length = scnprintf(tmpbuf, TMPBUFLEN, "%d", handle_unknown); sel_read_handle_unknown()
212 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); sel_read_handle_unknown()
279 ssize_t length; sel_write_disable() local
282 length = -ENOMEM; sel_write_disable()
287 length = -EINVAL; sel_write_disable()
291 length = -ENOMEM; sel_write_disable()
296 length = -EFAULT; sel_write_disable()
300 length = -EINVAL; sel_write_disable()
305 length = selinux_disable(); sel_write_disable()
306 if (length) sel_write_disable()
314 length = count; sel_write_disable()
317 return length; sel_write_disable()
332 ssize_t length; sel_read_policyvers() local
334 length = scnprintf(tmpbuf, TMPBUFLEN, "%u", POLICYDB_VERSION_MAX); sel_read_policyvers()
335 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); sel_read_policyvers()
356 ssize_t length; sel_read_mls() local
358 length = scnprintf(tmpbuf, TMPBUFLEN, "%d", sel_read_mls()
360 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); sel_read_mls()
508 ssize_t length; sel_write_load() local
513 length = task_has_security(current, SECURITY__LOAD_POLICY); sel_write_load()
514 if (length) sel_write_load()
518 length = -EINVAL; sel_write_load()
522 length = -EFBIG; sel_write_load()
526 length = -ENOMEM; sel_write_load()
531 length = -EFAULT; sel_write_load()
535 length = security_load_policy(data, count); sel_write_load()
536 if (length) sel_write_load()
539 length = sel_make_bools(); sel_write_load()
540 if (length) sel_write_load()
543 length = sel_make_classes(); sel_write_load()
544 if (length) sel_write_load()
547 length = sel_make_policycap(); sel_write_load()
548 if (length) sel_write_load()
551 length = count; sel_write_load()
561 return length; sel_write_load()
573 ssize_t length; sel_write_context() local
575 length = task_has_security(current, SECURITY__CHECK_CONTEXT); sel_write_context()
576 if (length) sel_write_context()
579 length = security_context_to_sid(buf, size, &sid, GFP_KERNEL); sel_write_context()
580 if (length) sel_write_context()
583 length = security_sid_to_context(sid, &canon, &len); sel_write_context()
584 if (length) sel_write_context()
587 length = -ERANGE; sel_write_context()
595 length = len; sel_write_context()
598 return length; sel_write_context()
605 ssize_t length; sel_read_checkreqprot() local
607 length = scnprintf(tmpbuf, TMPBUFLEN, "%u", selinux_checkreqprot); sel_read_checkreqprot()
608 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); sel_read_checkreqprot()
615 ssize_t length; sel_write_checkreqprot() local
618 length = task_has_security(current, SECURITY__SETCHECKREQPROT); sel_write_checkreqprot()
619 if (length) sel_write_checkreqprot()
622 length = -ENOMEM; sel_write_checkreqprot()
627 length = -EINVAL; sel_write_checkreqprot()
631 length = -ENOMEM; sel_write_checkreqprot()
636 length = -EFAULT; sel_write_checkreqprot()
640 length = -EINVAL; sel_write_checkreqprot()
645 length = count; sel_write_checkreqprot()
648 return length; sel_write_checkreqprot()
705 * and the length returned. Otherwise return 0 or and -error.
714 ssize_t length; sel_write_access() local
716 length = task_has_security(current, SECURITY__COMPUTE_AV); sel_write_access()
717 if (length) sel_write_access()
720 length = -ENOMEM; sel_write_access()
725 length = -ENOMEM; sel_write_access()
730 length = -EINVAL; sel_write_access()
734 length = security_context_to_sid(scon, strlen(scon) + 1, &ssid, sel_write_access()
736 if (length) sel_write_access()
739 length = security_context_to_sid(tcon, strlen(tcon) + 1, &tsid, sel_write_access()
741 if (length) sel_write_access()
746 length = scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, sel_write_access()
754 return length; sel_write_access()
763 ssize_t length; sel_write_create() local
768 length = task_has_security(current, SECURITY__COMPUTE_CREATE); sel_write_create()
769 if (length) sel_write_create()
772 length = -ENOMEM; sel_write_create()
777 length = -ENOMEM; sel_write_create()
782 length = -ENOMEM; sel_write_create()
787 length = -EINVAL; sel_write_create()
822 length = security_context_to_sid(scon, strlen(scon) + 1, &ssid, sel_write_create()
824 if (length) sel_write_create()
827 length = security_context_to_sid(tcon, strlen(tcon) + 1, &tsid, sel_write_create()
829 if (length) sel_write_create()
832 length = security_transition_sid_user(ssid, tsid, tclass, sel_write_create()
834 if (length) sel_write_create()
837 length = security_sid_to_context(newsid, &newcon, &len); sel_write_create()
838 if (length) sel_write_create()
841 length = -ERANGE; sel_write_create()
849 length = len; sel_write_create()
855 return length; sel_write_create()
863 ssize_t length; sel_write_relabel() local
867 length = task_has_security(current, SECURITY__COMPUTE_RELABEL); sel_write_relabel()
868 if (length) sel_write_relabel()
871 length = -ENOMEM; sel_write_relabel()
876 length = -ENOMEM; sel_write_relabel()
881 length = -EINVAL; sel_write_relabel()
885 length = security_context_to_sid(scon, strlen(scon) + 1, &ssid, sel_write_relabel()
887 if (length) sel_write_relabel()
890 length = security_context_to_sid(tcon, strlen(tcon) + 1, &tsid, sel_write_relabel()
892 if (length) sel_write_relabel()
895 length = security_change_sid(ssid, tsid, tclass, &newsid); sel_write_relabel()
896 if (length) sel_write_relabel()
899 length = security_sid_to_context(newsid, &newcon, &len); sel_write_relabel()
900 if (length) sel_write_relabel()
903 length = -ERANGE; sel_write_relabel()
908 length = len; sel_write_relabel()
913 return length; sel_write_relabel()
920 ssize_t length; sel_write_user() local
925 length = task_has_security(current, SECURITY__COMPUTE_USER); sel_write_user()
926 if (length) sel_write_user()
929 length = -ENOMEM; sel_write_user()
934 length = -ENOMEM; sel_write_user()
939 length = -EINVAL; sel_write_user()
943 length = security_context_to_sid(con, strlen(con) + 1, &sid, GFP_KERNEL); sel_write_user()
944 if (length) sel_write_user()
947 length = security_get_user_sids(sid, user, &sids, &nsids); sel_write_user()
948 if (length) sel_write_user()
951 length = sprintf(buf, "%u", nsids) + 1; sel_write_user()
952 ptr = buf + length; sel_write_user()
956 length = rc; sel_write_user()
959 if ((length + len) >= SIMPLE_TRANSACTION_LIMIT) { sel_write_user()
961 length = -ERANGE; sel_write_user()
967 length += len; sel_write_user()
973 return length; sel_write_user()
981 ssize_t length; sel_write_member() local
985 length = task_has_security(current, SECURITY__COMPUTE_MEMBER); sel_write_member()
986 if (length) sel_write_member()
989 length = -ENOMEM; sel_write_member()
994 length = -ENOMEM; sel_write_member()
999 length = -EINVAL; sel_write_member()
1003 length = security_context_to_sid(scon, strlen(scon) + 1, &ssid, sel_write_member()
1005 if (length) sel_write_member()
1008 length = security_context_to_sid(tcon, strlen(tcon) + 1, &tsid, sel_write_member()
1010 if (length) sel_write_member()
1013 length = security_member_sid(ssid, tsid, tclass, &newsid); sel_write_member()
1014 if (length) sel_write_member()
1017 length = security_sid_to_context(newsid, &newcon, &len); sel_write_member()
1018 if (length) sel_write_member()
1021 length = -ERANGE; sel_write_member()
1029 length = len; sel_write_member()
1034 return length; sel_write_member()
1052 ssize_t length; sel_read_bool() local
1074 length = scnprintf(page, PAGE_SIZE, "%d %d", cur_enforcing, sel_read_bool()
1076 ret = simple_read_from_buffer(buf, count, ppos, page, length); sel_read_bool()
1087 ssize_t length; sel_write_bool() local
1094 length = task_has_security(current, SECURITY__SETBOOL); sel_write_bool()
1095 if (length) sel_write_bool()
1098 length = -EINVAL; sel_write_bool()
1102 length = -ENOMEM; sel_write_bool()
1107 length = -EINVAL; sel_write_bool()
1111 length = -ENOMEM; sel_write_bool()
1116 length = -EFAULT; sel_write_bool()
1120 length = -EINVAL; sel_write_bool()
1128 length = count; sel_write_bool()
1133 return length; sel_write_bool()
1147 ssize_t length; sel_commit_bools_write() local
1152 length = task_has_security(current, SECURITY__SETBOOL); sel_commit_bools_write()
1153 if (length) sel_commit_bools_write()
1156 length = -ENOMEM; sel_commit_bools_write()
1161 length = -EINVAL; sel_commit_bools_write()
1165 length = -ENOMEM; sel_commit_bools_write()
1170 length = -EFAULT; sel_commit_bools_write()
1174 length = -EINVAL; sel_commit_bools_write()
1178 length = 0; sel_commit_bools_write()
1180 length = security_set_bools(bool_num, bool_pending_values); sel_commit_bools_write()
1182 if (!length) sel_commit_bools_write()
1183 length = count; sel_commit_bools_write()
1188 return length; sel_commit_bools_write()
1292 ssize_t length; sel_read_avc_cache_threshold() local
1294 length = scnprintf(tmpbuf, TMPBUFLEN, "%u", avc_cache_threshold); sel_read_avc_cache_threshold()
1295 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); sel_read_avc_cache_threshold()
1345 ssize_t length; sel_read_avc_hash_stats() local
1351 length = avc_get_hash_stats(page); sel_read_avc_hash_stats()
1352 if (length >= 0) sel_read_avc_hash_stats()
1353 length = simple_read_from_buffer(buf, count, ppos, page, length); sel_read_avc_hash_stats()
1356 return length; sel_read_avc_hash_stats()
1570 ssize_t length; sel_read_policycap() local
1574 length = scnprintf(tmpbuf, TMPBUFLEN, "%d", value); sel_read_policycap()
1576 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); sel_read_policycap()
/linux-4.1.27/drivers/net/ethernet/cisco/enic/
H A Dvnic_vic.c40 vp->length = htonl(sizeof(vp->num_tlvs)); vic_provinfo_alloc()
50 int vic_provinfo_add_tlv(struct vic_provinfo *vp, u16 type, u16 length, vic_provinfo_add_tlv() argument
58 if (ntohl(vp->length) + offsetof(struct vic_provinfo_tlv, value) + vic_provinfo_add_tlv()
59 length > VIC_PROVINFO_MAX_TLV_DATA) vic_provinfo_add_tlv()
63 ntohl(vp->length) - sizeof(vp->num_tlvs)); vic_provinfo_add_tlv()
66 tlv->length = htons(length); vic_provinfo_add_tlv()
67 memcpy(tlv->value, value, length); vic_provinfo_add_tlv()
70 vp->length = htonl(ntohl(vp->length) + vic_provinfo_add_tlv()
71 offsetof(struct vic_provinfo_tlv, value) + length); vic_provinfo_add_tlv()
78 return vp ? ntohl(vp->length) + sizeof(*vp) - sizeof(vp->num_tlvs) : 0; vic_provinfo_size()
H A Drq_enet_desc.h44 u64 address, u8 type, u16 length) rq_enet_desc_enc()
47 desc->length_type = cpu_to_le16((length & RQ_ENET_LEN_MASK) | rq_enet_desc_enc()
52 u64 *address, u8 *type, u16 *length) rq_enet_desc_dec()
55 *length = le16_to_cpu(desc->length_type) & RQ_ENET_LEN_MASK; rq_enet_desc_dec()
43 rq_enet_desc_enc(struct rq_enet_desc *desc, u64 address, u8 type, u16 length) rq_enet_desc_enc() argument
51 rq_enet_desc_dec(struct rq_enet_desc *desc, u64 *address, u8 *type, u16 *length) rq_enet_desc_dec() argument
H A Dwq_enet_desc.h26 __le16 length; member in struct:wq_enet_desc
54 u64 address, u16 length, u16 mss, u16 header_length, wq_enet_desc_enc()
59 desc->length = cpu_to_le16(length & WQ_ENET_LEN_MASK); wq_enet_desc_enc()
73 u64 *address, u16 *length, u16 *mss, u16 *header_length, wq_enet_desc_dec()
78 *length = le16_to_cpu(desc->length) & WQ_ENET_LEN_MASK; wq_enet_desc_dec()
53 wq_enet_desc_enc(struct wq_enet_desc *desc, u64 address, u16 length, u16 mss, u16 header_length, u8 offload_mode, u8 eop, u8 cq_entry, u8 fcoe_encap, u8 vlan_tag_insert, u16 vlan_tag, u8 loopback) wq_enet_desc_enc() argument
72 wq_enet_desc_dec(struct wq_enet_desc *desc, u64 *address, u16 *length, u16 *mss, u16 *header_length, u8 *offload_mode, u8 *eop, u8 *cq_entry, u8 *fcoe_encap, u8 *vlan_tag_insert, u16 *vlan_tag, u8 *loopback) wq_enet_desc_dec() argument
/linux-4.1.27/drivers/isdn/hardware/eicon/
H A Ddiva.h13 const void *src, int length);
16 const void __user *src, int length);
22 int length, divas_xdi_copy_from_user_fn_t cp_fn);
25 int length,
H A Ddqueue.c27 q->length[i] = 0; diva_data_q_init()
50 q->length[i] = 0; diva_data_q_finit()
73 diva_data_q_ack_segment4write(diva_um_idi_data_queue_t *q, int length) diva_data_q_ack_segment4write() argument
76 q->length[q->write] = length; diva_data_q_ack_segment4write()
97 return (q->length[q->read]); diva_data_q_get_segment_length()
103 q->length[q->read] = 0; diva_data_q_ack_segment4read()
H A Ddqueue.h16 int length[DIVA_UM_IDI_MAX_MSGS]; member in struct:_diva_um_idi_data_queue
25 int length);
H A Dum_idi.h18 int length);
22 int length);
32 int length, divas_um_idi_copy_from_user_fn_t cp_fn);
H A Dxdi_adapter.h16 dword length[8]; /* bar length */ member in struct:_divas_pci_card_resources
30 int length);
/linux-4.1.27/drivers/net/wireless/ath/ath9k/
H A Dreg_wow.h31 * bit 31:24 pattern 0 length
32 * bit 23:16 pattern 1 length
33 * bit 15:8 pattern 2 length
34 * bit 7:0 pattern 3 length
37 * bit 31:24 pattern 4 length
38 * bit 23:16 pattern 5 length
39 * bit 15:8 pattern 6 length
40 * bit 7:0 pattern 7 length
43 * bit 31:24 pattern 8 length
44 * bit 23:16 pattern 9 length
45 * bit 15:8 pattern 10 length
46 * bit 7:0 pattern 11 length
49 * bit 31:24 pattern 12 length
50 * bit 23:16 pattern 13 length
51 * bit 15:8 pattern 14 length
52 * bit 7:0 pattern 15 length
/linux-4.1.27/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/
H A Dbit.h6 u16 length; member in struct:bit_entry
/linux-4.1.27/include/uapi/asm-generic/
H A Dparam.h16 #define MAXHOSTNAMELEN 64 /* max length of hostname */
/linux-4.1.27/arch/alpha/include/uapi/asm/
H A Dparam.h12 #define MAXHOSTNAMELEN 64 /* max length of hostname */
/linux-4.1.27/sound/aoa/soundbus/
H A Dsysfs.c20 int length; modalias_show() local
25 length = strlen(buf); modalias_show()
27 length = sprintf(buf, "of:N%sT%s\n", modalias_show()
31 return length; modalias_show()
/linux-4.1.27/include/linux/
H A Datm.h11 int length; member in struct:compat_atmif_sioc
H A Dcrc32c.h6 extern u32 crc32c(u32 crc, const void *address, unsigned int length);
H A Djhash.h62 * @length: the length of the key
66 * No alignment or length assumptions are made about the input key.
70 static inline u32 jhash(const void *key, u32 length, u32 initval) jhash() argument
76 a = b = c = JHASH_INITVAL + length + initval; jhash()
79 while (length > 12) { jhash()
84 length -= 12; jhash()
89 switch (length) { jhash()
112 * @length: the number of u32's in the key
117 static inline u32 jhash2(const u32 *k, u32 length, u32 initval) jhash2() argument
122 a = b = c = JHASH_INITVAL + (length<<2) + initval; jhash2()
125 while (length > 3) { jhash2()
130 length -= 3; jhash2()
135 switch (length) { jhash2()
H A Drelay.h184 size_t length);
190 * @length: number of bytes to write
201 size_t length) relay_write()
208 if (unlikely(buf->offset + length > chan->subbuf_size)) relay_write()
209 length = relay_switch_subbuf(buf, length); relay_write()
210 memcpy(buf->data + buf->offset, data, length); relay_write()
211 buf->offset += length; relay_write()
219 * @length: number of bytes to write
229 size_t length) __relay_write()
234 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) __relay_write()
235 length = relay_switch_subbuf(buf, length); __relay_write()
236 memcpy(buf->data + buf->offset, data, length); __relay_write()
237 buf->offset += length; __relay_write()
244 * @length: number of bytes to reserve
252 static inline void *relay_reserve(struct rchan *chan, size_t length) relay_reserve() argument
257 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) { relay_reserve()
258 length = relay_switch_subbuf(buf, length); relay_reserve()
259 if (!length) relay_reserve()
263 buf->offset += length; relay_reserve()
271 * @length: number of bytes to reserve
277 size_t length) subbuf_start_reserve()
279 BUG_ON(length >= buf->chan->subbuf_size - 1); subbuf_start_reserve()
280 buf->offset = length; subbuf_start_reserve()
199 relay_write(struct rchan *chan, const void *data, size_t length) relay_write() argument
227 __relay_write(struct rchan *chan, const void *data, size_t length) __relay_write() argument
276 subbuf_start_reserve(struct rchan_buf *buf, size_t length) subbuf_start_reserve() argument
H A Dwireless.h20 __u16 length; member in struct:compat_iw_point
26 __u16 len; /* Real length of this stuff */
31 #define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length)
H A Dcoda_psdev.h34 const char *name, int length, int *type,
41 const char *name, int length,
44 const char *name, int length, int excl, int mode,
47 const char *name, int length);
49 const char *name, int length);
51 char *buffer, int *length);
H A Dcrc32.h22 * @len2: length of the second block
49 * @len2: length of the second block
66 #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length)
76 #define ether_crc(length, data) bitrev32(crc32_le(~0, data, length))
77 #define ether_crc_le(length, data) crc32_le(~0, data, length)
H A Dccp.h44 * would exceed the defined length of the cmd queue the cmd will
129 * @key_len: length in bytes of key
131 * @iv_len: length in bytes of iv
134 * @src_len: length in bytes of data used for this operation
137 * @cmac_key_len: length in bytes of cmac_key
192 * @key_len: length in bytes of key
194 * @iv_len: length in bytes of iv
197 * @src_len: length in bytes of data used for this operation
244 * @ctx_len: length in bytes of hash value
246 * @src_len: length in bytes of data used for this operation
248 * @opad_len: length in bytes of data used for final HMAC operation
251 * @msg_bits: total length of the message in bits used in final SHA operation
274 u64 msg_bits; /* Message length in bits required for
281 * @key_size: length in bits of RSA key
283 * @exp_len: length in bytes of exponent
285 * @mod_len: length in bytes of modulus
288 * @src_len: length in bytes of data used for this operation
344 * @mask_len: length in bytes of mask
347 * @src_len: length in bytes of data used for this operation
394 * @operand_1_len: length of the first operand
397 * @operand_2_len: length of the second operand
400 * @result_len: length of the supplied result buffer
416 * @x_len: the length of the x coordinate
418 * @y_len: the length of the y coordinate
434 * @domain_a_len: the length of the a parameter
437 * @scalar_len: the length of the scalar parameter
458 * @mod_len: length in bytes of modulus
/linux-4.1.27/lib/lz4/
H A Dlz4_decompress.c63 size_t length; lz4_uncompress() local
69 length = (token >> ML_BITS); lz4_uncompress()
70 if (length == RUN_MASK) { lz4_uncompress()
74 for (; len == 255; length += 255) lz4_uncompress()
76 if (unlikely(length > (size_t)(length + len))) lz4_uncompress()
78 length += len; lz4_uncompress()
82 cpy = op + length; lz4_uncompress()
91 memcpy(op, ip, length); lz4_uncompress()
92 ip += length; lz4_uncompress()
108 length = token & ML_MASK; lz4_uncompress()
109 if (length == ML_MASK) { lz4_uncompress()
110 for (; *ip == 255; length += 255) lz4_uncompress()
112 if (unlikely(length > (size_t)(length + *ip))) lz4_uncompress()
114 length += *ip++; lz4_uncompress()
137 cpy = op + length - (STEPSIZE - 4); lz4_uncompress()
185 size_t length; lz4_uncompress_unknownoutputsize() local
189 length = (token >> ML_BITS); lz4_uncompress_unknownoutputsize()
190 if (length == RUN_MASK) { lz4_uncompress_unknownoutputsize()
194 if (unlikely(length > (size_t)(length + s))) lz4_uncompress_unknownoutputsize()
196 length += s; lz4_uncompress_unknownoutputsize()
200 cpy = op + length; lz4_uncompress_unknownoutputsize()
202 (ip + length > iend - COPYLENGTH)) { lz4_uncompress_unknownoutputsize()
207 if (ip + length != iend) lz4_uncompress_unknownoutputsize()
213 memcpy(op, ip, length); lz4_uncompress_unknownoutputsize()
214 op += length; lz4_uncompress_unknownoutputsize()
232 length = (token & ML_MASK); lz4_uncompress_unknownoutputsize()
233 if (length == ML_MASK) { lz4_uncompress_unknownoutputsize()
236 if (unlikely(length > (size_t)(length + s))) lz4_uncompress_unknownoutputsize()
238 length += s; lz4_uncompress_unknownoutputsize()
265 cpy = op + length - (STEPSIZE-4); lz4_uncompress_unknownoutputsize()
H A Dlz4_compress.c72 int length; lz4_compressctx() local
117 /* Encode Literal length */ lz4_compressctx()
118 length = (int)(ip - anchor); lz4_compressctx()
121 if (unlikely(op + length + (2 + 1 + LASTLITERALS) + lz4_compressctx()
122 (length >> 8) > oend)) lz4_compressctx()
125 if (length >= (int)RUN_MASK) { lz4_compressctx()
128 len = length - RUN_MASK; lz4_compressctx()
133 *token = (length << ML_BITS); lz4_compressctx()
136 LZ4_BLINDCOPY(anchor, op, length); lz4_compressctx()
174 length = (int)(ip - anchor); lz4_compressctx()
176 if (unlikely(op + (1 + LASTLITERALS) + (length >> 8) > oend)) lz4_compressctx()
178 if (length >= (int)ML_MASK) { lz4_compressctx()
180 length -= ML_MASK; lz4_compressctx()
181 for (; length > 509 ; length -= 510) { lz4_compressctx()
185 if (length > 254) { lz4_compressctx()
186 length -= 255; lz4_compressctx()
189 *op++ = (u8)length; lz4_compressctx()
191 *token += length; lz4_compressctx()
254 int len, length; lz4_compress64kctx() local
298 /* Encode Literal length */ lz4_compress64kctx()
299 length = (int)(ip - anchor); lz4_compress64kctx()
302 if (unlikely(op + length + (2 + 1 + LASTLITERALS) lz4_compress64kctx()
303 + (length >> 8) > oend)) lz4_compress64kctx()
305 if (length >= (int)RUN_MASK) { lz4_compress64kctx()
307 len = length - RUN_MASK; lz4_compress64kctx()
312 *token = (length << ML_BITS); lz4_compress64kctx()
315 LZ4_BLINDCOPY(anchor, op, length); lz4_compress64kctx()
/linux-4.1.27/arch/x86/kernel/
H A Dprobe_roms.c188 static int __init romchecksum(const unsigned char *rom, unsigned long length) romchecksum() argument
192 for (sum = 0; length && probe_kernel_address(rom++, c) == 0; length--) romchecksum()
194 return !length && !sum; romchecksum()
200 unsigned long start, length, upper; probe_roms() local
216 /* 0 < length <= 0x7f * 512, historically */ probe_roms()
217 length = c * 512; probe_roms()
219 /* if checksum okay, trust length byte */ probe_roms()
220 if (length && romchecksum(rom, length)) probe_roms()
221 video_rom_resource.end = start + length - 1; probe_roms()
235 /* check for extension rom (ignore length byte!) */ probe_roms()
238 length = resource_size(&extension_rom_resource); probe_roms()
239 if (romchecksum(rom, length)) { probe_roms()
254 /* 0 < length <= 0x7f * 512, historically */ probe_roms()
255 length = c * 512; probe_roms()
257 /* but accept any length that fits if checksum okay */ probe_roms()
258 if (!length || start + length > upper || !romchecksum(rom, length)) probe_roms()
262 adapter_rom_resources[i].end = start + length - 1; probe_roms()
H A Dpci-nommu.c45 * and length. They are obtained via sg_dma_{address,length}(SG).
48 * DMA address/length pairs than there are SG table elements.
50 * The routine returns the number of addr/length pairs actually
63 WARN_ON(nents == 0 || sg[0].length == 0); nommu_map_sg()
68 if (!check_addr("map_sg", hwdev, s->dma_address, s->length)) for_each_sg()
70 s->dma_length = s->length; for_each_sg()
/linux-4.1.27/drivers/video/fbdev/mmp/fb/
H A Dmmpfb.c38 if (var->bits_per_pixel == 16 && var->red.length == 8 && var_to_pixfmt()
39 var->green.length == 4 && var->blue.length == 4) { var_to_pixfmt()
49 if (var->bits_per_pixel == 12 && var->red.length == 8 && var_to_pixfmt()
50 var->green.length == 2 && var->blue.length == 2) { var_to_pixfmt()
60 if (var->bits_per_pixel == 16 && var->red.length == 16 && var_to_pixfmt()
61 var->green.length == 16 && var->blue.length == 16) { var_to_pixfmt()
73 if (var->bits_per_pixel == 16 && var->red.length <= 5 && var_to_pixfmt()
74 var->green.length <= 6 && var->blue.length <= 5) { var_to_pixfmt()
75 if (var->transp.length == 0) { var_to_pixfmt()
86 if (var->bits_per_pixel <= 32 && var->red.length <= 8 && var_to_pixfmt()
87 var->green.length <= 8 && var->blue.length <= 8) { var_to_pixfmt()
88 if (var->bits_per_pixel == 24 && var->transp.length == 0) { var_to_pixfmt()
118 var->red.offset = 11; var->red.length = 5; pixfmt_to_var()
119 var->green.offset = 5; var->green.length = 6; pixfmt_to_var()
120 var->blue.offset = 0; var->blue.length = 5; pixfmt_to_var()
121 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
125 var->red.offset = 0; var->red.length = 5; pixfmt_to_var()
126 var->green.offset = 5; var->green.length = 6; pixfmt_to_var()
127 var->blue.offset = 11; var->blue.length = 5; pixfmt_to_var()
128 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
132 var->red.offset = 16; var->red.length = 8; pixfmt_to_var()
133 var->green.offset = 8; var->green.length = 8; pixfmt_to_var()
134 var->blue.offset = 0; var->blue.length = 8; pixfmt_to_var()
135 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
139 var->red.offset = 0; var->red.length = 8; pixfmt_to_var()
140 var->green.offset = 8; var->green.length = 8; pixfmt_to_var()
141 var->blue.offset = 16; var->blue.length = 8; pixfmt_to_var()
142 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
146 var->red.offset = 16; var->red.length = 8; pixfmt_to_var()
147 var->green.offset = 8; var->green.length = 8; pixfmt_to_var()
148 var->blue.offset = 0; var->blue.length = 8; pixfmt_to_var()
149 var->transp.offset = 24; var->transp.length = 8; pixfmt_to_var()
153 var->red.offset = 0; var->red.length = 8; pixfmt_to_var()
154 var->green.offset = 8; var->green.length = 8; pixfmt_to_var()
155 var->blue.offset = 16; var->blue.length = 8; pixfmt_to_var()
156 var->transp.offset = 24; var->transp.length = 8; pixfmt_to_var()
160 var->red.offset = 16; var->red.length = 8; pixfmt_to_var()
161 var->green.offset = 8; var->green.length = 8; pixfmt_to_var()
162 var->blue.offset = 0; var->blue.length = 8; pixfmt_to_var()
163 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
167 var->red.offset = 0; var->red.length = 8; pixfmt_to_var()
168 var->green.offset = 8; var->green.length = 8; pixfmt_to_var()
169 var->blue.offset = 16; var->blue.length = 8; pixfmt_to_var()
170 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
174 var->red.offset = 4; var->red.length = 8; pixfmt_to_var()
175 var->green.offset = 2; var->green.length = 2; pixfmt_to_var()
176 var->blue.offset = 0; var->blue.length = 2; pixfmt_to_var()
177 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
181 var->red.offset = 4; var->red.length = 8; pixfmt_to_var()
182 var->green.offset = 0; var->green.length = 2; pixfmt_to_var()
183 var->blue.offset = 2; var->blue.length = 2; pixfmt_to_var()
184 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
188 var->red.offset = 8; var->red.length = 8; pixfmt_to_var()
189 var->green.offset = 4; var->green.length = 4; pixfmt_to_var()
190 var->blue.offset = 0; var->blue.length = 4; pixfmt_to_var()
191 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
195 var->red.offset = 8; var->red.length = 8; pixfmt_to_var()
196 var->green.offset = 0; var->green.length = 4; pixfmt_to_var()
197 var->blue.offset = 4; var->blue.length = 4; pixfmt_to_var()
198 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
202 var->red.offset = 8; var->red.length = 16; pixfmt_to_var()
203 var->green.offset = 4; var->green.length = 16; pixfmt_to_var()
204 var->blue.offset = 0; var->blue.length = 16; pixfmt_to_var()
205 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
209 var->red.offset = 8; var->red.length = 16; pixfmt_to_var()
210 var->green.offset = 0; var->green.length = 16; pixfmt_to_var()
211 var->blue.offset = 4; var->blue.length = 16; pixfmt_to_var()
212 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
216 var->red.offset = 0; var->red.length = 16; pixfmt_to_var()
217 var->green.offset = 4; var->green.length = 16; pixfmt_to_var()
218 var->blue.offset = 8; var->blue.length = 16; pixfmt_to_var()
219 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
223 var->red.offset = 0; var->red.length = 8; pixfmt_to_var()
224 var->green.offset = 0; var->green.length = 8; pixfmt_to_var()
225 var->blue.offset = 0; var->blue.length = 8; pixfmt_to_var()
226 var->transp.offset = 0; var->transp.length = 0; pixfmt_to_var()
314 return ((chan & 0xffff) >> (16 - bf->length)) << bf->offset; chan_to_field()
/linux-4.1.27/drivers/acpi/acpica/
H A Dexstorob.c67 u32 length; acpi_ex_store_buffer_to_buffer() local
81 length = source_desc->buffer.length; acpi_ex_store_buffer_to_buffer()
84 * If target is a buffer of length zero or is a static buffer, acpi_ex_store_buffer_to_buffer()
85 * allocate a new buffer of the proper length acpi_ex_store_buffer_to_buffer()
87 if ((target_desc->buffer.length == 0) || acpi_ex_store_buffer_to_buffer()
89 target_desc->buffer.pointer = ACPI_ALLOCATE(length); acpi_ex_store_buffer_to_buffer()
94 target_desc->buffer.length = length; acpi_ex_store_buffer_to_buffer()
99 if (length <= target_desc->buffer.length) { acpi_ex_store_buffer_to_buffer()
104 target_desc->buffer.length); acpi_ex_store_buffer_to_buffer()
105 ACPI_MEMCPY(target_desc->buffer.pointer, buffer, length); acpi_ex_store_buffer_to_buffer()
124 /* Set the new length of the target */ acpi_ex_store_buffer_to_buffer()
126 target_desc->buffer.length = length; acpi_ex_store_buffer_to_buffer()
133 target_desc->buffer.length); acpi_ex_store_buffer_to_buffer()
137 length, target_desc->buffer.length)); acpi_ex_store_buffer_to_buffer()
164 u32 length; acpi_ex_store_string_to_string() local
178 length = source_desc->string.length; acpi_ex_store_string_to_string()
184 if ((length < target_desc->string.length) && acpi_ex_store_string_to_string()
191 (acpi_size) target_desc->string.length + 1); acpi_ex_store_string_to_string()
192 ACPI_MEMCPY(target_desc->string.pointer, buffer, length); acpi_ex_store_string_to_string()
207 length + 1); acpi_ex_store_string_to_string()
213 ACPI_MEMCPY(target_desc->string.pointer, buffer, length); acpi_ex_store_string_to_string()
216 /* Set the new target length */ acpi_ex_store_string_to_string()
218 target_desc->string.length = length; acpi_ex_store_string_to_string()
H A Dexfield.c63 * access_length - The access length of the region field
65 * RETURN: Decoded access length
67 * DESCRIPTION: This routine returns the length of the generic_serial_bus
75 u32 length; acpi_ex_get_serial_access_length() local
80 length = 0; acpi_ex_get_serial_access_length()
86 length = 1; acpi_ex_get_serial_access_length()
92 length = 2; acpi_ex_get_serial_access_length()
99 length = access_length; acpi_ex_get_serial_access_length()
106 length = ACPI_GSBUS_BUFFER_SIZE - 2; acpi_ex_get_serial_access_length()
110 return (length); acpi_ex_get_serial_access_length()
135 acpi_size length; acpi_ex_read_data_from_field() local
177 length = ACPI_SMBUS_BUFFER_SIZE; acpi_ex_read_data_from_field()
183 length = acpi_ex_get_serial_access_length(accessor_type, acpi_ex_read_data_from_field()
193 * Data[x-1]; (Bytes 2-x of the arbitrary length data buffer) acpi_ex_read_data_from_field()
195 length += 2; acpi_ex_read_data_from_field()
199 length = ACPI_IPMI_BUFFER_SIZE; acpi_ex_read_data_from_field()
203 buffer_desc = acpi_ut_create_buffer_object(length); acpi_ex_read_data_from_field()
231 * Note: Field.length is in bits. acpi_ex_read_data_from_field()
233 length = acpi_ex_read_data_from_field()
235 if (length > acpi_gbl_integer_byte_width) { acpi_ex_read_data_from_field()
239 buffer_desc = acpi_ut_create_buffer_object(length); acpi_ex_read_data_from_field()
252 length = acpi_gbl_integer_byte_width; acpi_ex_read_data_from_field()
262 * pin number index. The bit_length is the length of the field, which acpi_ex_read_data_from_field()
290 (u32) length)); acpi_ex_read_data_from_field()
303 status = acpi_ex_extract_from_field(obj_desc, buffer, (u32) length); acpi_ex_read_data_from_field()
336 u32 length; acpi_ex_write_data_to_field() local
389 length = ACPI_SMBUS_BUFFER_SIZE; acpi_ex_write_data_to_field()
395 length = acpi_ex_get_serial_access_length(accessor_type, acpi_ex_write_data_to_field()
405 * Data[x-1]; (Bytes 2-x of the arbitrary length data buffer) acpi_ex_write_data_to_field()
407 length += 2; acpi_ex_write_data_to_field()
411 length = ACPI_IPMI_BUFFER_SIZE; acpi_ex_write_data_to_field()
415 if (source_desc->buffer.length < length) { acpi_ex_write_data_to_field()
417 "SMBus/IPMI/GenericSerialBus write requires Buffer of length %u, found length %u", acpi_ex_write_data_to_field()
418 length, source_desc->buffer.length)); acpi_ex_write_data_to_field()
425 buffer_desc = acpi_ut_create_buffer_object(length); acpi_ex_write_data_to_field()
431 ACPI_MEMCPY(buffer, source_desc->buffer.pointer, length); acpi_ex_write_data_to_field()
455 * pin number index. The bit_length is the length of the field, which acpi_ex_write_data_to_field()
491 length = sizeof(source_desc->integer.value); acpi_ex_write_data_to_field()
497 length = source_desc->buffer.length; acpi_ex_write_data_to_field()
503 length = source_desc->string.length; acpi_ex_write_data_to_field()
515 source_desc->common.type, buffer, length)); acpi_ex_write_data_to_field()
532 status = acpi_ex_insert_into_field(obj_desc, buffer, length); acpi_ex_write_data_to_field()
H A Dacpredef.h53 * ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types:
59 * ACPI_PTYPE1_VAR: Variable-length length. Zero-length package is allowed:
66 * 2) PTYPE2 packages contain a Variable-length number of subpackages. Each
69 * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types. Zero-length
78 * Zero-length parent package is allowed:
89 * ACPI_PTYPE2_FIXED: Each subpackage is of Fixed-length. Zero-length
93 * ACPI_PTYPE2_MIN: Each subpackage has a Variable-length but minimum length.
94 * Zero-length parent package is allowed:
97 * ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length
100 * ACPI_PTYPE2_FIX_VAR: Each subpackage consists of some fixed-length elements
101 * followed by an optional element. Zero-length parent package is allowed.
109 * defines the format of the package. Zero-length parent package is
251 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
255 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
259 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
263 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
267 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
271 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
275 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
279 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
283 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
287 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
300 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each 2 (Ints) */
307 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (1 Int(rev), n Pkg (2 Ref/11 Int) */
315 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Ints) */
331 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (9 Int),(4 Str) */
336 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (16 Int),(4 Str) */
351 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (5 Int) */
361 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
380 METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Ints/Strs) */
385 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (3 Int) */
389 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Ints/Bufs) */
400 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (1 Int(n), n-1 Int) */
404 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (1 Int(n), n Pkg (1 Buf/3 Int) */
424 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
434 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each (1 Ref, 0/1 Optional Buf/Ref) */
442 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Ints) */
449 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each: 1 Buf, 1 Pkg */
472 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
504 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (16 Int) */
511 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
515 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Ints) */
519 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (1 Int(rev), n Pkg (5 Int) */
526 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (3 Int) */
572 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
576 * For _HPX, a single package is returned, containing a variable-length number
582 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each (var Ints) */
604 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (1 Int(rev), n Pkg (2 Int) */
611 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (8 Int) */
615 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each (1 Str/1 Buf) */
652 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
656 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Buf) */
669 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (3 Int),(3 Str) */
674 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Bufs) */
678 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (11 Int),(3 Str) */
683 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
696 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
700 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
704 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
708 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
712 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
716 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
731 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each (4): Int,Int,Int/Ref,Int */
738 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each: Pkg/Int,Int,[Variable-length Refs] (Pkg is Ref/Int) */
759 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each (5 Int) with count */
766 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
773 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each (6 Int) */
783 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Buf) */
793 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Int) */
817 * Allow this by making the objects "Variable-length length", but all elements
821 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int) */
825 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int) */
829 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int) */
833 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int) */
837 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int) */
841 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int) */
954 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each 2 Ref/6 Int */
959 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each 5 Int with count */
966 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each 5 Int */
976 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
989 METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
1006 PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0), /* Fixed-length (2 Int), but is optional */
H A Dutids.c74 u32 length; acpi_ut_execute_HID() local
89 length = ACPI_EISAID_STRING_SIZE; acpi_ut_execute_HID()
91 length = obj_desc->string.length + 1; acpi_ut_execute_HID()
98 (acpi_size) length); acpi_ut_execute_HID()
117 hid->length = length; acpi_ut_execute_HID()
151 u32 length; acpi_ut_execute_SUB() local
164 length = obj_desc->string.length + 1; acpi_ut_execute_SUB()
170 (acpi_size) length); acpi_ut_execute_SUB()
184 sub->length = length; acpi_ut_execute_SUB()
219 u32 length; acpi_ut_execute_UID() local
234 length = ACPI_MAX64_DECIMAL_DIGITS + 1; acpi_ut_execute_UID()
236 length = obj_desc->string.length + 1; acpi_ut_execute_UID()
243 (acpi_size) length); acpi_ut_execute_UID()
262 uid->length = length; acpi_ut_execute_UID()
305 u32 length; acpi_ut_execute_CID() local
350 string_area_size += cid_objects[i]->string.length + 1; acpi_ut_execute_CID()
361 * Now that we know the length of the CIDs, allocate return buffer: acpi_ut_execute_CID()
391 length = ACPI_EISAID_STRING_SIZE; acpi_ut_execute_CID()
398 length = cid_objects[i]->string.length + 1; acpi_ut_execute_CID()
402 cid_list->ids[i].length = length; acpi_ut_execute_CID()
403 next_id_string += length; acpi_ut_execute_CID()
H A Drsdump.c68 static void acpi_rs_dump_byte_list(u16 length, u8 *data);
70 static void acpi_rs_dump_word_list(u16 length, u16 *data);
72 static void acpi_rs_dump_dword_list(u8 length, u32 *data);
74 static void acpi_rs_dump_short_byte_list(u8 length, u8 *data);
125 /* Sanity check the length. It must not be zero, or we loop forever */ acpi_rs_dump_resource_list()
127 if (!resource_list->length) { acpi_rs_dump_resource_list()
129 ("Invalid zero length descriptor in resource list\n"); acpi_rs_dump_resource_list()
182 /* Dump all table elements, Exit on zero length element */ acpi_rs_dump_irq_list()
184 for (count = 0; prt_element->length; count++) { acpi_rs_dump_irq_list()
190 prt_element, prt_element->length); acpi_rs_dump_irq_list()
215 /* First table entry must contain the table length (# of table entries) */ acpi_rs_dump_descriptor()
305 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
317 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
331 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
343 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
355 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
523 * PARAMETERS: length - Number of elements in the list
532 static void acpi_rs_dump_byte_list(u16 length, u8 * data) acpi_rs_dump_byte_list() argument
536 for (i = 0; i < length; i++) { acpi_rs_dump_byte_list()
541 static void acpi_rs_dump_short_byte_list(u8 length, u8 * data) acpi_rs_dump_short_byte_list() argument
545 for (i = 0; i < length; i++) { acpi_rs_dump_short_byte_list()
551 static void acpi_rs_dump_dword_list(u8 length, u32 * data) acpi_rs_dump_dword_list() argument
555 for (i = 0; i < length; i++) { acpi_rs_dump_dword_list()
560 static void acpi_rs_dump_word_list(u16 length, u16 *data) acpi_rs_dump_word_list() argument
564 for (i = 0; i < length; i++) { acpi_rs_dump_word_list()
H A Dtbutils.c140 /* Compare original length and checksum to current values */ acpi_tb_check_dsdt_header()
142 if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length || acpi_tb_check_dsdt_header()
156 acpi_gbl_original_dsdt_header.length = acpi_gbl_DSDT->length; acpi_tb_check_dsdt_header()
183 new_table = ACPI_ALLOCATE(table_desc->length); acpi_tb_copy_dsdt()
185 ACPI_ERROR((AE_INFO, "Could not copy DSDT of length 0x%X", acpi_tb_copy_dsdt()
186 table_desc->length)); acpi_tb_copy_dsdt()
190 ACPI_MEMCPY(new_table, table_desc->pointer, table_desc->length); acpi_tb_copy_dsdt()
200 "Forced DSDT copy: length 0x%05X copied locally, original unmapped", acpi_tb_copy_dsdt()
201 new_table->length)); acpi_tb_copy_dsdt()
287 u32 length; acpi_tb_parse_root_table() local
329 /* Map the RSDT/XSDT table header to get the full table length */ acpi_tb_parse_root_table()
339 * Validate length of the table, and map entire table. acpi_tb_parse_root_table()
340 * Minimum length table must contain at least one entry. acpi_tb_parse_root_table()
342 length = table->length; acpi_tb_parse_root_table()
345 if (length < (sizeof(struct acpi_table_header) + table_entry_size)) { acpi_tb_parse_root_table()
347 "Invalid table length 0x%X in RSDT/XSDT", acpi_tb_parse_root_table()
348 length)); acpi_tb_parse_root_table()
352 table = acpi_os_map_memory(address, length); acpi_tb_parse_root_table()
359 status = acpi_tb_verify_checksum(table, length); acpi_tb_parse_root_table()
361 acpi_os_unmap_memory(table, length); acpi_tb_parse_root_table()
367 table_count = (u32)((table->length - sizeof(struct acpi_table_header)) / acpi_tb_parse_root_table()
410 acpi_os_unmap_memory(table, length); acpi_tb_parse_root_table()
H A Dexoparg3.c162 acpi_size length; acpi_ex_opcode_3A_1T_1R() local
183 length = (acpi_size) operand[2]->integer.value; acpi_ex_opcode_3A_1T_1R()
186 * If the index is beyond the length of the String/Buffer, or if the acpi_ex_opcode_3A_1T_1R()
187 * requested length is zero, return a zero-length String/Buffer acpi_ex_opcode_3A_1T_1R()
189 if (index >= operand[0]->string.length) { acpi_ex_opcode_3A_1T_1R()
190 length = 0; acpi_ex_opcode_3A_1T_1R()
195 else if ((index + length) > operand[0]->string.length) { acpi_ex_opcode_3A_1T_1R()
196 length = (acpi_size) operand[0]->string.length - acpi_ex_opcode_3A_1T_1R()
207 buffer = ACPI_ALLOCATE_ZEROED((acpi_size) length + 1); acpi_ex_opcode_3A_1T_1R()
216 /* If the requested length is zero, don't allocate a buffer */ acpi_ex_opcode_3A_1T_1R()
218 if (length > 0) { acpi_ex_opcode_3A_1T_1R()
222 buffer = ACPI_ALLOCATE_ZEROED(length); acpi_ex_opcode_3A_1T_1R()
241 length); acpi_ex_opcode_3A_1T_1R()
244 /* Set the length of the new String/Buffer */ acpi_ex_opcode_3A_1T_1R()
247 return_desc->string.length = (u32) length; acpi_ex_opcode_3A_1T_1R()
H A Dtbfadt.c71 u16 length; member in struct:acpi_fadt_info
207 * for GPEs, the legacy length (byte_width) is used instead to acpi_tb_init_generic_address()
312 u32 length; acpi_tb_parse_fadt() local
322 length = acpi_gbl_root_table_list.tables[table_index].length; acpi_tb_parse_fadt()
326 address, length); acpi_tb_parse_fadt()
335 (void)acpi_tb_verify_checksum(table, length); acpi_tb_parse_fadt()
339 acpi_tb_create_local_fadt(table, length); acpi_tb_parse_fadt()
343 acpi_os_unmap_memory(table, length); acpi_tb_parse_fadt()
373 * length - Length of the table
384 void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) acpi_tb_create_local_fadt() argument
391 if (length > sizeof(struct acpi_table_fadt)) { acpi_tb_create_local_fadt()
394 "truncating length %u to %u", acpi_tb_create_local_fadt()
395 table->revision, length, acpi_tb_create_local_fadt()
406 ACPI_MIN(length, sizeof(struct acpi_table_fadt))); acpi_tb_create_local_fadt()
473 u8 length; acpi_tb_convert_fadt() local
485 * Note: The FADT revision value is unreliable. Only the length can be acpi_tb_convert_fadt()
488 if (acpi_gbl_FADT.header.length <= ACPI_FADT_V2_SIZE) { acpi_tb_convert_fadt()
496 * Now we can update the local FADT length to the length of the acpi_tb_convert_fadt()
500 acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt); acpi_tb_convert_fadt()
521 * length and register name. acpi_tb_convert_fadt()
531 length = *ACPI_ADD_PTR(u8, acpi_tb_convert_fadt()
533 fadt_info_table[i].length); acpi_tb_convert_fadt()
574 length), acpi_tb_convert_fadt()
601 length), acpi_tb_convert_fadt()
611 * For each extended field, check for length mismatch between the acpi_tb_convert_fadt()
612 * legacy length field and the corresponding 64-bit X length field. acpi_tb_convert_fadt()
613 * Note: If the legacy length field is > 0xFF bits, ignore this acpi_tb_convert_fadt()
618 (ACPI_MUL_8(length) <= ACPI_UINT8_MAX) && acpi_tb_convert_fadt()
619 (address64->bit_width != ACPI_MUL_8(length))) { acpi_tb_convert_fadt()
621 "32/64X length mismatch in FADT/%s: %u/%u", acpi_tb_convert_fadt()
622 name, ACPI_MUL_8(length), acpi_tb_convert_fadt()
629 * Both the address and length must be non-zero. acpi_tb_convert_fadt()
631 if (!address64->address || !length) { acpi_tb_convert_fadt()
633 "Required FADT field %s has zero address and/or length: " acpi_tb_convert_fadt()
638 length)); acpi_tb_convert_fadt()
643 * length field. If present, both the address and length must acpi_tb_convert_fadt()
646 if ((address64->address && !length) || acpi_tb_convert_fadt()
647 (!address64->address && length)) { acpi_tb_convert_fadt()
649 "Optional FADT field %s has zero address or length: " acpi_tb_convert_fadt()
654 length)); acpi_tb_convert_fadt()
700 "Invalid length for FADT/%s: %u, using default %u", acpi_tb_setup_fadt_registers()
715 * Get the length of the individual PM1 registers (enable and status). acpi_tb_setup_fadt_registers()
716 * Each register is defined to be (event block length / 2). Extra divide acpi_tb_setup_fadt_registers()
729 * Register block. Each is of length (pm1_event_length/2) acpi_tb_setup_fadt_registers()
H A Dtbprint.c52 static void acpi_tb_fix_string(char *string, acpi_size length);
63 * length - Maximum length
72 static void acpi_tb_fix_string(char *string, acpi_size length) acpi_tb_fix_string() argument
75 while (length && *string) { acpi_tb_fix_string()
80 length--; acpi_tb_fix_string()
132 /* FACS only has signature and length fields */ acpi_tb_print_table_header()
136 header->length)); acpi_tb_print_table_header()
151 header)->length : 20, acpi_tb_print_table_header()
164 local_header.length, local_header.revision, acpi_tb_print_table_header()
177 * length - Length of entire table
186 acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length) acpi_tb_verify_checksum() argument
202 checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length); acpi_tb_verify_checksum()
226 * length - Length of this memory region
234 u8 acpi_tb_checksum(u8 *buffer, u32 length) acpi_tb_checksum() argument
237 u8 *end = buffer + length; acpi_tb_checksum()
H A Dutobject.c266 buffer_desc->buffer.length = (u32) buffer_size; acpi_ut_create_buffer_object()
303 * NOTE: Zero-length strings are NULL terminated acpi_ut_create_string_object()
316 string_desc->string.length = (u32) string_size; acpi_ut_create_string_object()
441 * obj_length - Where the length is returned
448 * The length includes the object structure plus any additional
457 acpi_size length; acpi_ut_get_simple_object_size() local
463 /* Start with the length of the (external) Acpi object */ acpi_ut_get_simple_object_size()
465 length = sizeof(union acpi_object); acpi_ut_get_simple_object_size()
471 * Object is NULL, just return the length of union acpi_object acpi_ut_get_simple_object_size()
474 *obj_length = ACPI_ROUND_UP_TO_NATIVE_WORD(length); acpi_ut_get_simple_object_size()
488 * The final length depends on the object type acpi_ut_get_simple_object_size()
496 length += (acpi_size) internal_object->string.length + 1; acpi_ut_get_simple_object_size()
501 length += (acpi_size) internal_object->buffer.length; acpi_ut_get_simple_object_size()
517 * Get the actual length of the full pathname to this object. acpi_ut_get_simple_object_size()
527 length += ACPI_ROUND_UP_TO_NATIVE_WORD(size); acpi_ut_get_simple_object_size()
563 *obj_length = ACPI_ROUND_UP_TO_NATIVE_WORD(length); acpi_ut_get_simple_object_size()
575 * DESCRIPTION: Get the length of one package element.
592 * here also) and sum it into the running package length acpi_ut_get_element_length()
601 info->length += object_space; acpi_ut_get_element_length()
627 * obj_length - Where the length is returned
648 info.length = 0; acpi_ut_get_package_object_size()
660 * just add the length of the package objects themselves. acpi_ut_get_package_object_size()
663 info.length += ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)) * acpi_ut_get_package_object_size()
666 /* Return the total package length */ acpi_ut_get_package_object_size()
668 *obj_length = info.length; acpi_ut_get_package_object_size()
677 * obj_length - Where the length will be returned
H A Ddsopcode.c168 "Attempt to CreateField of length zero")); acpi_ds_init_buffer_field()
228 /* Entire field must fit within the current length of the buffer */ acpi_ds_init_buffer_field()
230 if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) { acpi_ds_init_buffer_field()
236 8 * (u32) buffer_desc->buffer.length)); acpi_ds_init_buffer_field()
276 /* Now the address and length are valid for this buffer_field */ acpi_ds_init_buffer_field()
310 * This is where we evaluate the address and length fields of the acpi_ds_eval_buffer_field_operands()
319 /* Evaluate/create the address and length operands */ acpi_ds_eval_buffer_field_operands()
377 * DESCRIPTION: Get region address and length
395 * This is where we evaluate the address and length fields of the acpi_ds_eval_region_operands()
408 /* Evaluate/create the address and length operands */ acpi_ds_eval_region_operands()
415 /* Resolve the length and address operands to numbers */ acpi_ds_eval_region_operands()
429 * Get the length operand and save it acpi_ds_eval_region_operands()
434 obj_desc->region.length = (u32) operand_desc->integer.value; acpi_ds_eval_region_operands()
450 obj_desc->region.length)); acpi_ds_eval_region_operands()
452 /* Now the address and length are valid for this opregion */ acpi_ds_eval_region_operands()
468 * DESCRIPTION: Get region address and length.
543 obj_desc->region.length = table->length; acpi_ds_eval_table_region_operands()
548 obj_desc->region.length)); acpi_ds_eval_table_region_operands()
550 /* Now the address and length are valid for this opregion */ acpi_ds_eval_table_region_operands()
579 u32 length; acpi_ds_eval_data_object_operands() local
583 /* The first operand (for all of these data objects) is the length */ acpi_ds_eval_data_object_operands()
604 /* Extract length operand */ acpi_ds_eval_data_object_operands()
607 length = (u32) arg_desc->integer.value; acpi_ds_eval_data_object_operands()
609 /* Cleanup for length operand */ acpi_ds_eval_data_object_operands()
625 acpi_ds_build_internal_buffer_obj(walk_state, op, length, acpi_ds_eval_data_object_operands()
633 acpi_ds_build_internal_package_obj(walk_state, op, length, acpi_ds_eval_data_object_operands()
H A Drsmisc.c96 resource, resource->type, resource->length)); acpi_rs_convert_aml_to_resource()
99 /* Extract the resource Length field (does not include header length) */ acpi_rs_convert_aml_to_resource()
105 * table length (# of table entries) acpi_rs_convert_aml_to_resource()
120 * Get the resource type and the initial (minimum) length acpi_rs_convert_aml_to_resource()
124 resource->length = INIT_RESOURCE_LENGTH(info); acpi_rs_convert_aml_to_resource()
164 resource->length = resource->length + acpi_rs_convert_aml_to_resource()
173 resource->length = resource->length + acpi_rs_convert_aml_to_resource()
182 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
192 resource->length = resource->length + acpi_rs_convert_aml_to_resource()
198 * Vendor data is optional (length/offset may both be zero) acpi_rs_convert_aml_to_resource()
199 * Examine vendor data length field first acpi_rs_convert_aml_to_resource()
204 /* Use vendor offset to get resource source length */ acpi_rs_convert_aml_to_resource()
217 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
225 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
235 resource->length = resource->length + item_count; acpi_rs_convert_aml_to_resource()
241 resource->length = resource->length + info->value; acpi_rs_convert_aml_to_resource()
264 (resource->length - acpi_rs_convert_aml_to_resource()
280 (resource->length - acpi_rs_convert_aml_to_resource()
296 (resource->length - acpi_rs_convert_aml_to_resource()
312 (resource->length - acpi_rs_convert_aml_to_resource()
350 resource->length += acpi_rs_convert_aml_to_resource()
365 resource->length += acpi_rs_convert_aml_to_resource()
383 resource->length += (item_count - 1); acpi_rs_convert_aml_to_resource()
399 resource->length += (item_count - 1); acpi_rs_convert_aml_to_resource()
446 /* Round the resource struct length up to the next boundary (32 or 64) */ acpi_rs_convert_aml_to_resource()
448 resource->length = acpi_rs_convert_aml_to_resource()
449 (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length); acpi_rs_convert_aml_to_resource()
490 * table length (# of table entries) acpi_rs_convert_resource_to_aml()
588 /* Set resource source string length */ acpi_rs_convert_resource_to_aml()
H A Dexconfig.c64 u32 length, u8 *buffer);
167 if ((operand[0]->string.length > ACPI_NAME_SIZE) || acpi_ex_load_table_op()
168 (operand[1]->string.length > ACPI_OEM_ID_SIZE) || acpi_ex_load_table_op()
169 (operand[2]->string.length > ACPI_OEM_TABLE_ID_SIZE)) { acpi_ex_load_table_op()
201 if (operand[3]->string.length > 0) { acpi_ex_load_table_op()
216 if (operand[4]->string.length > 0) { acpi_ex_load_table_op()
283 * length - Number of bytes to read
294 acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) acpi_ex_region_read() argument
303 for (i = 0; i < length; i++) { acpi_ex_region_read()
350 u32 length; acpi_ex_load_op() local
379 /* Get the table header first so we can get the table length */ acpi_ex_load_op()
390 length = table_header->length; acpi_ex_load_op()
399 if (length < sizeof(struct acpi_table_header)) { acpi_ex_load_op()
421 table = ACPI_ALLOCATE(length); acpi_ex_load_op()
428 status = acpi_ex_region_read(obj_desc, length, acpi_ex_load_op()
444 if (obj_desc->buffer.length < sizeof(struct acpi_table_header)) { acpi_ex_load_op()
448 /* Get the actual table length from the table header */ acpi_ex_load_op()
453 length = table_header->length; acpi_ex_load_op()
457 if (length > obj_desc->buffer.length) { acpi_ex_load_op()
460 if (length < sizeof(struct acpi_table_header)) { acpi_ex_load_op()
468 table = ACPI_ALLOCATE(length); acpi_ex_load_op()
473 ACPI_MEMCPY(table, table_header, length); acpi_ex_load_op()
H A Dutresrc.c347 * Resource types, used to validate the resource length field.
348 * The length of fixed-length types must match exactly, variable
349 * lengths must meet the minimum required length, etc.
418 u32 length; acpi_ut_walk_aml_resources() local
434 /* Walk the byte list, abort on any invalid descriptor type or length */ acpi_ut_walk_aml_resources()
444 * Exit on failure. Cannot continue because the descriptor length acpi_ut_walk_aml_resources()
450 /* Get the length of this descriptor */ acpi_ut_walk_aml_resources()
452 length = acpi_ut_get_descriptor_length(aml); acpi_ut_walk_aml_resources()
458 user_function(aml, length, offset, resource_index, acpi_ut_walk_aml_resources()
488 aml += length; acpi_ut_walk_aml_resources()
489 offset += length; acpi_ut_walk_aml_resources()
579 * Validate the resource_length field. This ensures that the length acpi_ut_validate_resource()
585 /* Validate based upon the type of resource - fixed length or variable */ acpi_ut_validate_resource()
590 /* Fixed length resource, length must match exactly */ acpi_ut_validate_resource()
599 /* Variable length resource, length must be at least the minimum */ acpi_ut_validate_resource()
608 /* Small variable length resource, length can be (Min) or (Min-1) */ acpi_ut_validate_resource()
662 "Invalid resource descriptor length: Type " acpi_ut_validate_resource()
714 * header or the length field itself.
730 /* Large Resource type -- bytes 1-2 contain the 16-bit length */ acpi_ut_get_resource_length()
735 /* Small Resource type -- bits 2:0 of byte 0 contain the length */ acpi_ut_get_resource_length()
752 * DESCRIPTION: Get the length of the header for this resource.
775 * RETURN: Byte length
777 * DESCRIPTION: Get the total byte length of a raw AML descriptor, including the
778 * length of the descriptor header and the length field itself.
788 * Get the Resource Length (does not include header length) and add acpi_ut_get_descriptor_length()
789 * the header length (depends on if this is a small or large resource) acpi_ut_get_descriptor_length()
805 * Note: allows a buffer length of zero.
816 /* Allow a buffer length of zero */ acpi_ut_get_resource_end_tag()
818 if (!obj_desc->buffer.length) { acpi_ut_get_resource_end_tag()
826 obj_desc->buffer.length, NULL, acpi_ut_get_resource_end_tag()
H A Drscreate.c82 /* Get the required length for the converted resource */ acpi_buffer_to_resource()
154 aml_buffer_length = aml_buffer->buffer.length; ACPI_EXPORT_SYMBOL()
188 output_buffer->pointer, (u32) output_buffer->length)); ACPI_EXPORT_SYMBOL()
233 /* Get the required buffer length */ acpi_rs_create_pci_routing_table()
269 buffer += user_prt->length; acpi_rs_create_pci_routing_table()
277 user_prt->length = (sizeof(struct acpi_pci_routing_table) - 4); acpi_rs_create_pci_routing_table()
279 /* Each subpackage must be of length 4 */ acpi_rs_create_pci_routing_table()
283 "(PRT[%u]) Need package of length 4, found length %u", acpi_rs_create_pci_routing_table()
341 /* Use *remaining* length of the buffer as max for pathname */ acpi_rs_create_pci_routing_table()
343 path_buffer.length = output_buffer->length - acpi_rs_create_pci_routing_table()
355 user_prt->length += acpi_rs_create_pci_routing_table()
365 * Add to the Length field the length of the string acpi_rs_create_pci_routing_table()
368 user_prt->length += obj_desc->string.length + 1; acpi_rs_create_pci_routing_table()
376 * Add to the Length field the length of the u32 NULL acpi_rs_create_pci_routing_table()
378 user_prt->length += sizeof(u32); acpi_rs_create_pci_routing_table()
392 /* Now align the current length */ acpi_rs_create_pci_routing_table()
394 user_prt->length = acpi_rs_create_pci_routing_table()
395 (u32) ACPI_ROUND_UP_TO_64BIT(user_prt->length); acpi_rs_create_pci_routing_table()
416 output_buffer->pointer, (u32) output_buffer->length)); acpi_rs_create_pci_routing_table()
454 resource_list->length, acpi_rs_create_aml_resources()
480 output_buffer->pointer, (u32) output_buffer->length)); acpi_rs_create_aml_resources()
H A Dutcopy.c146 external_object->string.length = internal_object->string.length; acpi_ut_copy_isimple_to_esimple()
150 length + 1); acpi_ut_copy_isimple_to_esimple()
154 (acpi_size) internal_object->string.length + 1); acpi_ut_copy_isimple_to_esimple()
160 external_object->buffer.length = internal_object->buffer.length; acpi_ut_copy_isimple_to_esimple()
163 length); acpi_ut_copy_isimple_to_esimple()
167 internal_object->buffer.length); acpi_ut_copy_isimple_to_esimple()
206 internal_object->processor.length; acpi_ut_copy_isimple_to_esimple()
294 * update the buffer length counter acpi_ut_copy_ielement_to_eelement()
309 info->length += object_space; acpi_ut_copy_ielement_to_eelement()
319 * space_used - Where the object length is returned
327 * The caller must have verified the buffer length needed using
350 info.length = ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)); acpi_ut_copy_ipackage_to_epackage()
365 info.length += (acpi_size) external_object->package.count * acpi_ut_copy_ipackage_to_epackage()
374 *space_used = info.length; acpi_ut_copy_ipackage_to_epackage()
407 &ret_buffer->length); acpi_ut_copy_iobject_to_eobject()
424 &ret_buffer->length); acpi_ut_copy_iobject_to_eobject()
426 * build simple does not include the object size in the length acpi_ut_copy_iobject_to_eobject()
429 ret_buffer->length += sizeof(union acpi_object); acpi_ut_copy_iobject_to_eobject()
499 external_object->string.length + 1); acpi_ut_copy_esimple_to_isimple()
507 external_object->string.length); acpi_ut_copy_esimple_to_isimple()
509 internal_object->string.length = external_object->string.length; acpi_ut_copy_esimple_to_isimple()
515 ACPI_ALLOCATE_ZEROED(external_object->buffer.length); acpi_ut_copy_esimple_to_isimple()
522 external_object->buffer.length); acpi_ut_copy_esimple_to_isimple()
524 internal_object->buffer.length = external_object->buffer.length; acpi_ut_copy_esimple_to_isimple()
716 * 2) The buffer has a length > 0 acpi_ut_copy_simple_object()
719 (source_desc->buffer.length)) { acpi_ut_copy_simple_object()
721 ACPI_ALLOCATE(source_desc->buffer.length); acpi_ut_copy_simple_object()
730 source_desc->buffer.length); acpi_ut_copy_simple_object()
743 length + 1); acpi_ut_copy_simple_object()
752 (acpi_size) source_desc->string.length + 1); acpi_ut_copy_simple_object()
H A Dutaddress.c57 * length - op_region length
64 * the op_region address/length operands are fully evaluated.
77 u32 length, struct acpi_namespace_node *region_node) acpi_ut_add_address_range()
97 range_info->end_address = (address + length - 1); acpi_ut_add_address_range()
188 * length - Length of address range
204 acpi_physical_address address, u32 length, u8 warn) acpi_ut_check_address_range()
219 end_address = address + length - 1; acpi_ut_check_address_range()
225 * Check if the requested address/length overlaps this acpi_ut_check_address_range()
228 * 1) Input address/length is contained completely in the acpi_ut_check_address_range()
230 * 2) Input address/length overlaps range at the range start acpi_ut_check_address_range()
231 * 3) Input address/length overlaps range at the range end acpi_ut_check_address_range()
232 * 4) Input address/length completely encompasses the range acpi_ut_check_address_range()
75 acpi_ut_add_address_range(acpi_adr_space_type space_id, acpi_physical_address address, u32 length, struct acpi_namespace_node *region_node) acpi_ut_add_address_range() argument
203 acpi_ut_check_address_range(acpi_adr_space_type space_id, acpi_physical_address address, u32 length, u8 warn) acpi_ut_check_address_range() argument
/linux-4.1.27/drivers/scsi/arm/
H A Dmsgqueue.c79 * Purpose : calculate the total length of all messages on the message queue
86 int length = 0; msgqueue_msglength() local
89 length += mq->msg.length; msgqueue_msglength()
91 return length; msgqueue_msglength()
111 * Function: int msgqueue_addmsg(MsgQueue_t *msgq, int length, ...)
114 * length - length of message
118 int msgqueue_addmsg(MsgQueue_t *msgq, int length, ...) msgqueue_addmsg() argument
127 va_start(ap, length); msgqueue_addmsg()
128 for (i = 0; i < length; i++) msgqueue_addmsg()
132 mq->msg.length = length; msgqueue_addmsg()
H A Dmsgqueue.h17 int length; member in struct:message
50 * Purpose : calculate the total length of all messages on the message queue
58 * Purpose : return a message & its length
66 * Function: int msgqueue_addmsg(MsgQueue_t *msgq, int length, ...)
69 * length - length of message
73 extern int msgqueue_addmsg(MsgQueue_t *msgq, int length, ...);
H A Deesox.c194 static void eesoxscsi_buffer_in(void *buf, int length, void __iomem *base) eesoxscsi_buffer_in() argument
224 if (status > length) eesoxscsi_buffer_in()
225 status = length; eesoxscsi_buffer_in()
234 length -= 2; eesoxscsi_buffer_in()
248 length -= 8; eesoxscsi_buffer_in()
260 length -= 4; eesoxscsi_buffer_in()
267 length -= 2; eesoxscsi_buffer_in()
269 } while (length); eesoxscsi_buffer_in()
272 static void eesoxscsi_buffer_out(void *buf, int length, void __iomem *base) eesoxscsi_buffer_out() argument
302 if (status > length) eesoxscsi_buffer_out()
303 status = length; eesoxscsi_buffer_out()
313 length -= 2; eesoxscsi_buffer_out()
328 length -= 8; eesoxscsi_buffer_out()
340 length -= 4; eesoxscsi_buffer_out()
347 length -= 2; eesoxscsi_buffer_out()
349 } while (length); eesoxscsi_buffer_out()
394 /* Prototype: int eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
398 * : length - length of string
402 eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) eesoxscsi_set_proc_info() argument
404 int ret = length; eesoxscsi_set_proc_info()
406 if (length >= 9 && strncmp(buffer, "EESOXSCSI", 9) == 0) { eesoxscsi_set_proc_info()
408 length -= 9; eesoxscsi_set_proc_info()
410 if (length >= 5 && strncmp(buffer, "term=", 5) == 0) { eesoxscsi_set_proc_info()
H A Darxescsi.c116 unsigned int length, error = 0; arxescsi_dma_pseudo() local
120 length = SCp->this_residual; arxescsi_dma_pseudo()
125 while (length > 256) { arxescsi_dma_pseudo()
132 length -= 256; arxescsi_dma_pseudo()
136 while (length > 0) { arxescsi_dma_pseudo()
146 if (length > 1) { arxescsi_dma_pseudo()
148 length -= 2; arxescsi_dma_pseudo()
151 length -= 1; arxescsi_dma_pseudo()
157 while (length >= 256) { arxescsi_dma_pseudo()
168 length -= 256; arxescsi_dma_pseudo()
173 while (length > 0) { arxescsi_dma_pseudo()
184 if (--length > 0) { arxescsi_dma_pseudo()
186 length --; arxescsi_dma_pseudo()
/linux-4.1.27/arch/ia64/kernel/
H A Dacpi-ext.c32 static acpi_status hp_ccsr_locate(acpi_handle obj, u64 *base, u64 *length) hp_ccsr_locate() argument
51 memcpy(length, vendor->byte_data + 8, sizeof(*length)); hp_ccsr_locate()
60 u64 length; member in struct:csr_space
75 space->length = addr.address.address_length; find_csr_space()
81 static acpi_status hp_crs_locate(acpi_handle obj, u64 *base, u64 *length) hp_crs_locate() argument
86 if (!space.length) hp_crs_locate()
90 *length = space.length; hp_crs_locate()
/linux-4.1.27/drivers/net/wireless/ath/ath10k/
H A Dbmi.c80 ath10k_warn(ar, "invalid get_target_info response length (%d)\n", ath10k_bmi_get_target_info()
92 u32 address, void *buffer, u32 length) ath10k_bmi_read_memory()
100 ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi read address 0x%x length %d\n", ath10k_bmi_read_memory()
101 address, length); ath10k_bmi_read_memory()
108 while (length) { ath10k_bmi_read_memory()
109 rxlen = min_t(u32, length, BMI_MAX_DATA_SIZE); ath10k_bmi_read_memory()
126 length -= rxlen; ath10k_bmi_read_memory()
133 u32 address, const void *buffer, u32 length) ath10k_bmi_write_memory()
140 ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi write address 0x%x length %d\n", ath10k_bmi_write_memory()
141 address, length); ath10k_bmi_write_memory()
148 while (length) { ath10k_bmi_write_memory()
149 txlen = min(length, BMI_MAX_DATA_SIZE - hdrlen); ath10k_bmi_write_memory()
167 /* fixup roundup() so `length` zeroes out for last chunk */ ath10k_bmi_write_memory()
168 txlen = min(txlen, length); ath10k_bmi_write_memory()
172 length -= txlen; ath10k_bmi_write_memory()
205 ath10k_warn(ar, "invalid execute response length (%d)\n", ath10k_bmi_execute()
217 int ath10k_bmi_lz_data(struct ath10k *ar, const void *buffer, u32 length) ath10k_bmi_lz_data() argument
224 ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi lz data buffer 0x%p length %d\n", ath10k_bmi_lz_data()
225 buffer, length); ath10k_bmi_lz_data()
232 while (length) { ath10k_bmi_lz_data()
233 txlen = min(length, BMI_MAX_DATA_SIZE - hdrlen); ath10k_bmi_lz_data()
249 length -= txlen; ath10k_bmi_lz_data()
282 u32 address, const void *buffer, u32 length) ath10k_bmi_fast_download()
285 u32 head_len = rounddown(length, 4); ath10k_bmi_fast_download()
286 u32 trailer_len = length - head_len; ath10k_bmi_fast_download()
290 "bmi fast download address 0x%x buffer 0x%p length %d\n", ath10k_bmi_fast_download()
291 address, buffer, length); ath10k_bmi_fast_download()
91 ath10k_bmi_read_memory(struct ath10k *ar, u32 address, void *buffer, u32 length) ath10k_bmi_read_memory() argument
132 ath10k_bmi_write_memory(struct ath10k *ar, u32 address, const void *buffer, u32 length) ath10k_bmi_write_memory() argument
281 ath10k_bmi_fast_download(struct ath10k *ar, u32 address, const void *buffer, u32 length) ath10k_bmi_fast_download() argument
H A Dbmi.h53 /* len = cmd + addr + length */
126 __le32 patch_ids[0]; /* length of @count */
130 __le32 patch_ids[0]; /* length of @count */
137 u8 payload[0]; /* length of @len */
191 void *buffer, u32 length);
193 const void *buffer, u32 length);
222 int ath10k_bmi_lz_data(struct ath10k *ar, const void *buffer, u32 length);
224 const void *buffer, u32 length);
/linux-4.1.27/drivers/macintosh/
H A Dmacio_sysfs.c21 int length = 0; compatible_show() local
31 length += sprintf (buf, "%s\n", compat); compatible_show()
32 buf += length; compatible_show()
38 return length; compatible_show()
/linux-4.1.27/include/keys/
H A Dencrypted-type.h25 char *datalen; /* datablob: decrypted key length */
28 unsigned short datablob_len; /* length of datablob */
29 unsigned short decrypted_datalen; /* decrypted data length */
30 unsigned short payload_datalen; /* payload data length */
H A Drxrpc-type.h33 u16 ticket_len; /* length of ticket[] */
74 u16 ticket_len; /* length of ticket */
75 u16 ticket2_len; /* length of second ticket */
115 #define AFSTOKEN_STRING_MAX 256 /* max small string length */
116 #define AFSTOKEN_DATA_MAX 64 /* max small data length */
117 #define AFSTOKEN_CELL_MAX 64 /* max cellname length */
119 #define AFSTOKEN_BDATALN_MAX 16384 /* max big data length */
124 #define AFSTOKEN_K5_NAME_MAX 128 /* max K5 name length */
125 #define AFSTOKEN_K5_REALM_MAX 64 /* max K5 realm name length */
/linux-4.1.27/drivers/video/fbdev/
H A D68328fb.c116 u_long length; get_line_length() local
118 length = xres_virtual * bpp; get_line_length()
119 length = (length + 31) & ~31; get_line_length()
120 length >>= 3; get_line_length()
121 return (length); get_line_length()
193 var->red.length = 1; mc68x328fb_check_var()
195 var->green.length = 1; mc68x328fb_check_var()
197 var->blue.length = 1; mc68x328fb_check_var()
199 var->transp.length = 0; mc68x328fb_check_var()
203 var->red.length = 8; mc68x328fb_check_var()
205 var->green.length = 8; mc68x328fb_check_var()
207 var->blue.length = 8; mc68x328fb_check_var()
209 var->transp.length = 0; mc68x328fb_check_var()
212 if (var->transp.length) { mc68x328fb_check_var()
214 var->red.length = 5; mc68x328fb_check_var()
216 var->green.length = 5; mc68x328fb_check_var()
218 var->blue.length = 5; mc68x328fb_check_var()
220 var->transp.length = 1; mc68x328fb_check_var()
223 var->red.length = 5; mc68x328fb_check_var()
225 var->green.length = 6; mc68x328fb_check_var()
227 var->blue.length = 5; mc68x328fb_check_var()
229 var->transp.length = 0; mc68x328fb_check_var()
234 var->red.length = 8; mc68x328fb_check_var()
236 var->green.length = 8; mc68x328fb_check_var()
238 var->blue.length = 8; mc68x328fb_check_var()
240 var->transp.length = 0; mc68x328fb_check_var()
244 var->red.length = 8; mc68x328fb_check_var()
246 var->green.length = 8; mc68x328fb_check_var()
248 var->blue.length = 8; mc68x328fb_check_var()
250 var->transp.length = 8; mc68x328fb_check_var()
296 * var->{color}.length contains length of bitfield mc68x328fb_setcolreg()
302 * uses offset = 0 && length = RAMDAC register width. mc68x328fb_setcolreg()
304 * var->{color}.length contains width of DAC mc68x328fb_setcolreg()
310 * var->{color}.length contains length of bitfield mc68x328fb_setcolreg()
319 red = CNVT_TOHW(red, info->var.red.length); mc68x328fb_setcolreg()
320 green = CNVT_TOHW(green, info->var.green.length); mc68x328fb_setcolreg()
321 blue = CNVT_TOHW(blue, info->var.blue.length); mc68x328fb_setcolreg()
322 transp = CNVT_TOHW(transp, info->var.transp.length); mc68x328fb_setcolreg()
461 fb_info.var.red.length = fb_info.var.green.length = fb_info.var.blue.length = 1; mc68x328fb_init()
H A Dvfb.c145 u_long length; get_line_length() local
147 length = xres_virtual * bpp; get_line_length()
148 length = (length + 31) & ~31; get_line_length()
149 length >>= 3; get_line_length()
150 return (length); get_line_length()
223 var->red.length = 8; vfb_check_var()
225 var->green.length = 8; vfb_check_var()
227 var->blue.length = 8; vfb_check_var()
229 var->transp.length = 0; vfb_check_var()
232 if (var->transp.length) { vfb_check_var()
234 var->red.length = 5; vfb_check_var()
236 var->green.length = 5; vfb_check_var()
238 var->blue.length = 5; vfb_check_var()
240 var->transp.length = 1; vfb_check_var()
243 var->red.length = 5; vfb_check_var()
245 var->green.length = 6; vfb_check_var()
247 var->blue.length = 5; vfb_check_var()
249 var->transp.length = 0; vfb_check_var()
254 var->red.length = 8; vfb_check_var()
256 var->green.length = 8; vfb_check_var()
258 var->blue.length = 8; vfb_check_var()
260 var->transp.length = 0; vfb_check_var()
264 var->red.length = 8; vfb_check_var()
266 var->green.length = 8; vfb_check_var()
268 var->blue.length = 8; vfb_check_var()
270 var->transp.length = 8; vfb_check_var()
316 * var->{color}.length contains length of bitfield vfb_setcolreg()
325 * var->{color}.length is set so that 1 << length is the number of available vfb_setcolreg()
333 * var->{color}.length contains length of bitfield vfb_setcolreg()
342 red = CNVT_TOHW(red, info->var.red.length); vfb_setcolreg()
343 green = CNVT_TOHW(green, info->var.green.length); vfb_setcolreg()
344 blue = CNVT_TOHW(blue, info->var.blue.length); vfb_setcolreg()
345 transp = CNVT_TOHW(transp, info->var.transp.length); vfb_setcolreg()
H A Dpxa168fb.c48 if (var->bits_per_pixel == 16 && var->red.length <= 5 && determine_best_pix_fmt()
49 var->green.length <= 6 && var->blue.length <= 5) { determine_best_pix_fmt()
50 if (var->transp.length == 0) { determine_best_pix_fmt()
57 if (var->transp.length == 1 && var->green.length <= 5) { determine_best_pix_fmt()
70 if (var->bits_per_pixel <= 32 && var->red.length <= 8 && determine_best_pix_fmt()
71 var->green.length <= 8 && var->blue.length <= 8) { determine_best_pix_fmt()
72 if (var->bits_per_pixel == 24 && var->transp.length == 0) { determine_best_pix_fmt()
79 if (var->bits_per_pixel == 32 && var->transp.length == 8) { determine_best_pix_fmt()
102 var->red.offset = 11; var->red.length = 5; set_pix_fmt()
103 var->green.offset = 5; var->green.length = 6; set_pix_fmt()
104 var->blue.offset = 0; var->blue.length = 5; set_pix_fmt()
105 var->transp.offset = 0; var->transp.length = 0; set_pix_fmt()
109 var->red.offset = 0; var->red.length = 5; set_pix_fmt()
110 var->green.offset = 5; var->green.length = 6; set_pix_fmt()
111 var->blue.offset = 11; var->blue.length = 5; set_pix_fmt()
112 var->transp.offset = 0; var->transp.length = 0; set_pix_fmt()
116 var->red.offset = 10; var->red.length = 5; set_pix_fmt()
117 var->green.offset = 5; var->green.length = 5; set_pix_fmt()
118 var->blue.offset = 0; var->blue.length = 5; set_pix_fmt()
119 var->transp.offset = 15; var->transp.length = 1; set_pix_fmt()
123 var->red.offset = 0; var->red.length = 5; set_pix_fmt()
124 var->green.offset = 5; var->green.length = 5; set_pix_fmt()
125 var->blue.offset = 10; var->blue.length = 5; set_pix_fmt()
126 var->transp.offset = 15; var->transp.length = 1; set_pix_fmt()
130 var->red.offset = 16; var->red.length = 8; set_pix_fmt()
131 var->green.offset = 8; var->green.length = 8; set_pix_fmt()
132 var->blue.offset = 0; var->blue.length = 8; set_pix_fmt()
133 var->transp.offset = 0; var->transp.length = 0; set_pix_fmt()
137 var->red.offset = 0; var->red.length = 8; set_pix_fmt()
138 var->green.offset = 8; var->green.length = 8; set_pix_fmt()
139 var->blue.offset = 16; var->blue.length = 8; set_pix_fmt()
140 var->transp.offset = 0; var->transp.length = 0; set_pix_fmt()
144 var->red.offset = 16; var->red.length = 8; set_pix_fmt()
145 var->green.offset = 8; var->green.length = 8; set_pix_fmt()
146 var->blue.offset = 0; var->blue.length = 8; set_pix_fmt()
147 var->transp.offset = 24; var->transp.length = 8; set_pix_fmt()
151 var->red.offset = 0; var->red.length = 8; set_pix_fmt()
152 var->green.offset = 8; var->green.length = 8; set_pix_fmt()
153 var->blue.offset = 16; var->blue.length = 8; set_pix_fmt()
154 var->transp.offset = 24; var->transp.length = 8; set_pix_fmt()
158 var->red.offset = 0; var->red.length = 8; set_pix_fmt()
159 var->green.offset = 0; var->green.length = 8; set_pix_fmt()
160 var->blue.offset = 0; var->blue.length = 8; set_pix_fmt()
161 var->transp.offset = 0; var->transp.length = 0; set_pix_fmt()
479 return ((chan & 0xffff) >> (16 - bf->length)) << bf->offset; chan_to_field()
H A Docfb.c132 /* Total length of frame */ ocfb_setupfb()
165 /* maximum (8) VBL (video memory burst length) */ ocfb_setupfb()
191 red >>= (16 - info->var.red.length); ocfb_setcolreg()
192 green >>= (16 - info->var.green.length); ocfb_setcolreg()
193 blue >>= (16 - info->var.blue.length); ocfb_setcolreg()
194 transp >>= (16 - info->var.transp.length); ocfb_setcolreg()
242 var->transp.length = 0; ocfb_init_var()
244 var->red.length = 8; ocfb_init_var()
246 var->green.length = 8; ocfb_init_var()
248 var->blue.length = 8; ocfb_init_var()
253 var->transp.length = 0; ocfb_init_var()
255 var->red.length = 5; ocfb_init_var()
257 var->green.length = 6; ocfb_init_var()
259 var->blue.length = 5; ocfb_init_var()
264 var->transp.length = 0; ocfb_init_var()
266 var->red.length = 8; ocfb_init_var()
268 var->green.length = 8; ocfb_init_var()
270 var->blue.length = 8; ocfb_init_var()
275 var->transp.length = 8; ocfb_init_var()
277 var->red.length = 8; ocfb_init_var()
279 var->green.length = 8; ocfb_init_var()
281 var->blue.length = 8; ocfb_init_var()
/linux-4.1.27/arch/sh/kernel/vsyscall/
H A Dvsyscall-note.S12 .long 1f - 0f; /* name length */ \
13 .long 3f - 2f; /* data length */ \
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dpriv.h9 u32 (*read)(void *, u32 offset, u32 length, struct nvkm_bios *);
13 int nvbios_extend(struct nvkm_bios *, u32 length);
H A Dramcfg.c41 if (bit_M.version == 1 && bit_M.length >= 5) nvbios_ramcfg_count()
43 if (bit_M.version == 2 && bit_M.length >= 3) nvbios_ramcfg_count()
61 if (bit_M.version == 1 && bit_M.length >= 5) nvbios_ramcfg_index()
63 if (bit_M.version == 2 && bit_M.length >= 3) { nvbios_ramcfg_index()
68 if (bit_M.length >= 7 && nvbios_ramcfg_index()
/linux-4.1.27/arch/powerpc/kernel/vdso32/
H A Dnote.S12 .long 1f - 0f; /* name length */ \
13 .long 3f - 2f; /* data length */ \
/linux-4.1.27/fs/xfs/libxfs/
H A Dxfs_cksum.h12 xfs_start_cksum(char *buffer, size_t length, unsigned long cksum_offset) xfs_start_cksum() argument
25 length - (cksum_offset + sizeof(__be32))); xfs_start_cksum()
45 xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset) xfs_update_cksum() argument
47 __uint32_t crc = xfs_start_cksum(buffer, length, cksum_offset); xfs_update_cksum()
56 xfs_verify_cksum(char *buffer, size_t length, unsigned long cksum_offset) xfs_verify_cksum() argument
58 __uint32_t crc = xfs_start_cksum(buffer, length, cksum_offset); xfs_verify_cksum()
H A Dxfs_dir2_data.c109 if (!bf[0].length) { __xfs_dir3_data_check()
113 if (!bf[1].length) { __xfs_dir3_data_check()
117 if (!bf[2].length) { __xfs_dir3_data_check()
122 XFS_WANT_CORRUPTED_RETURN(mp, be16_to_cpu(bf[0].length) >= __xfs_dir3_data_check()
123 be16_to_cpu(bf[1].length)); __xfs_dir3_data_check()
124 XFS_WANT_CORRUPTED_RETURN(mp, be16_to_cpu(bf[1].length) >= __xfs_dir3_data_check()
125 be16_to_cpu(bf[2].length)); __xfs_dir3_data_check()
149 be16_to_cpu(dup->length) <= __xfs_dir3_data_check()
150 be16_to_cpu(bf[2].length)); __xfs_dir3_data_check()
152 p += be16_to_cpu(dup->length); __xfs_dir3_data_check()
375 ASSERT(!dfp->length); xfs_dir2_data_freefind()
382 ASSERT(dfp->length == dup->length); xfs_dir2_data_freefind()
384 ASSERT(off + be16_to_cpu(dup->length) <= be16_to_cpu(dfp->offset)); xfs_dir2_data_freefind()
386 ASSERT(be16_to_cpu(dfp->offset) + be16_to_cpu(dfp->length) <= off); xfs_dir2_data_freefind()
387 ASSERT(matched || be16_to_cpu(dfp->length) >= be16_to_cpu(dup->length)); xfs_dir2_data_freefind()
389 ASSERT(be16_to_cpu(dfp[-1].length) >= be16_to_cpu(dfp[0].length)); xfs_dir2_data_freefind()
396 if (be16_to_cpu(dup->length) < xfs_dir2_data_freefind()
397 be16_to_cpu(bf[XFS_DIR2_DATA_FD_COUNT - 1].length)) xfs_dir2_data_freefind()
431 new.length = dup->length; xfs_dir2_data_freeinsert()
437 if (be16_to_cpu(new.length) > be16_to_cpu(dfp[0].length)) { xfs_dir2_data_freeinsert()
444 if (be16_to_cpu(new.length) > be16_to_cpu(dfp[1].length)) { xfs_dir2_data_freeinsert()
450 if (be16_to_cpu(new.length) > be16_to_cpu(dfp[2].length)) { xfs_dir2_data_freeinsert()
494 bf[2].length = 0; xfs_dir2_data_freeremove()
549 p += be16_to_cpu(dup->length); xfs_dir2_data_freescan()
616 bf[i].length = 0; xfs_dir3_data_init()
627 bf[0].length = cpu_to_be16(t); xfs_dir3_data_init()
628 dup->length = cpu_to_be16(t); xfs_dir3_data_init()
701 (uint)((char *)&dup->length + sizeof(dup->length) - xfs_dir2_data_log_unused()
721 xfs_dir2_data_aoff_t len, /* length in bytes */ xfs_dir2_data_make_free()
795 needscan = (bf[2].length != 0); xfs_dir2_data_make_free()
799 be16_add_cpu(&prevdup->length, len + be16_to_cpu(postdup->length)); xfs_dir2_data_make_free()
824 ASSERT(dfp->length == prevdup->length); xfs_dir2_data_make_free()
825 ASSERT(!dfp[1].length); xfs_dir2_data_make_free()
826 ASSERT(!dfp[2].length); xfs_dir2_data_make_free()
834 be16_add_cpu(&prevdup->length, len); xfs_dir2_data_make_free()
851 needscan = be16_to_cpu(prevdup->length) > xfs_dir2_data_make_free()
852 be16_to_cpu(bf[2].length); xfs_dir2_data_make_free()
862 newdup->length = cpu_to_be16(len + be16_to_cpu(postdup->length)); xfs_dir2_data_make_free()
879 needscan = be16_to_cpu(newdup->length) > xfs_dir2_data_make_free()
880 be16_to_cpu(bf[2].length); xfs_dir2_data_make_free()
889 newdup->length = cpu_to_be16(len); xfs_dir2_data_make_free()
907 xfs_dir2_data_aoff_t len, /* length to use */ xfs_dir2_data_use_free()
918 int oldlen; /* old unused entry's length */ xfs_dir2_data_use_free()
928 ASSERT(offset + len <= (char *)dup + be16_to_cpu(dup->length) - (char *)hdr); xfs_dir2_data_use_free()
933 oldlen = be16_to_cpu(dup->length); xfs_dir2_data_use_free()
936 ASSERT(dfp || oldlen <= be16_to_cpu(bf[2].length)); xfs_dir2_data_use_free()
963 newdup->length = cpu_to_be16(oldlen - len); xfs_dir2_data_use_free()
975 ASSERT(dfp->length == newdup->length); xfs_dir2_data_use_free()
991 newdup->length = cpu_to_be16(((char *)hdr + offset) - (char *)newdup); xfs_dir2_data_use_free()
1003 ASSERT(dfp->length == newdup->length); xfs_dir2_data_use_free()
1019 newdup->length = cpu_to_be16(((char *)hdr + offset) - (char *)newdup); xfs_dir2_data_use_free()
1025 newdup2->length = cpu_to_be16(oldlen - len - be16_to_cpu(newdup->length)); xfs_dir2_data_use_free()
1038 needscan = (bf[2].length != 0); xfs_dir2_data_use_free()
/linux-4.1.27/net/ceph/
H A Dceph_hash.c23 unsigned int ceph_str_hash_rjenkins(const char *str, unsigned int length) ceph_str_hash_rjenkins() argument
30 len = length; ceph_str_hash_rjenkins()
49 c = c + length; ceph_str_hash_rjenkins()
57 /* the first byte of c is reserved for the length */ ceph_str_hash_rjenkins()
84 unsigned int ceph_str_hash_linux(const char *str, unsigned int length) ceph_str_hash_linux() argument
89 while (length--) { ceph_str_hash_linux()
/linux-4.1.27/lib/zlib_deflate/
H A Ddeftree.c49 /* Bit length codes must not exceed MAX_BL_BITS bits */
55 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
58 /* repeat a zero length 3-10 times (3 bits of repeat count) */
61 /* repeat a zero length 11-138 times (7 bits of repeat count) */
63 static const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
69 static const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
74 /* The lengths of the bit length codes are sent in order of decreasing
75 * probability, to avoid transmitting the lengths for unused bit length codes.
106 /* length code for each normalized match length (0 == MIN_MATCH) */
109 /* First normalized length for each code (0 = MIN_MATCH) */
119 int max_length; /* max bit length for the codes */
149 static unsigned bi_reverse (unsigned value, int length);
174 * IN assertion: length <= 16 and value fits in length bits.
177 static void send_bits (deflate_state *s, int value, int length);
182 int length /* number of bits */ send_bits()
185 Tracevv((stderr," l %2d v %4x ", length, value)); send_bits()
186 Assert(length > 0 && length <= 15, "invalid length"); send_bits()
187 s->bits_sent += (ulg)length; send_bits()
193 if (s->bi_valid > (int)Buf_size - length) { send_bits()
197 s->bi_valid += length - Buf_size; send_bits()
200 s->bi_valid += length; send_bits()
205 #define send_bits(s, value, length) \
206 { int len = length;\
230 int length; /* length value */ tr_static_init() local
234 /* number of codes at each bit length for an optimal tree */ tr_static_init()
238 /* Initialize the mapping length (0..255) -> length code (0..28) */ tr_static_init()
239 length = 0; tr_static_init()
241 base_length[code] = length; tr_static_init()
243 length_code[length++] = (uch)code; tr_static_init()
246 Assert (length == 256, "tr_static_init: length != 256"); tr_static_init()
247 /* Note that the length 255 (match length 258) can be represented tr_static_init()
251 length_code[length-1] = (uch)code; tr_static_init()
359 * the subtrees have equal frequency. This minimizes the worst case length.
398 * Compute the optimal bit lengths for a tree and update the total bit length
402 * OUT assertions: the field len is set to the optimal bit length, the
403 * array bl_count contains the frequencies for each bit length.
404 * The length opt_len is updated; static_len is also updated if stree is
420 int bits; /* bit length */ gen_bitlen()
423 int overflow = 0; /* number of elements with bit length too large */ gen_bitlen()
428 * overflow in the case of the bit length tree). gen_bitlen()
450 Trace((stderr,"\nbit length overflow\n")); gen_bitlen()
453 /* Find the first bit length which could increase: */ gen_bitlen()
490 * IN assertion: the array bl_count contains the bit length statistics for
493 * zero code length.
498 ush *bl_count /* number of codes at each bit length */ gen_codes()
501 ush next_code[MAX_BITS+1]; /* next code value for each bit length */ gen_codes()
532 * Update the total bit length for the current block.
534 * OUT assertions: the fields len and code are set to the optimal bit length
535 * and corresponding code. The length opt_len is updated; static_len is
624 * in the bit length tree.
633 int prevlen = -1; /* last emitted length */ scan_tree()
634 int curlen; /* length of current code */ scan_tree()
635 int nextlen = tree[0].Len; /* length of next code */ scan_tree()
679 int prevlen = -1; /* last emitted length */ send_tree()
680 int curlen; /* length of current code */ send_tree()
681 int nextlen = tree[0].Len; /* length of next code */ send_tree()
722 * bl_order of the last bit length code to send.
728 int max_blindex; /* index of last bit length code of non zero freq */ build_bl_tree()
730 /* Determine the bit length frequencies for literal and distance trees */ build_bl_tree()
734 /* Build the bit length tree: */ build_bl_tree()
736 /* opt_len now includes the length of the tree representations, except build_bl_tree()
740 /* Determine the number of bit length codes to send. The pkzip format build_bl_tree()
741 * requires that at least 4 bit length codes be sent. (appnote.txt says build_bl_tree()
747 /* Update opt_len to include the bit length tree and counts */ build_bl_tree()
757 * lengths of the bit length codes, the literal tree and the distance tree.
795 ulg stored_len, /* length of input block */ zlib_tr_stored_block()
806 /* Send just the `stored block' type code without any length bytes or data.
839 * the EOB of the previous block) was thus at least one plus the length zlib_tr_align()
854 * returns the total compressed length for the file so far.
859 ulg stored_len, /* length of input block */
864 int max_blindex = 0; /* index of last bit length code of non zero freq */
884 /* Build the bit length tree for the above two trees, and get the index
885 * in bl_order of the last bit length code to send.
889 /* Determine the best encoding. Compute first the block length in bytes*/
972 unsigned lc /* match length-MIN_MATCH or unmatched char (if dist==0) */ zlib_tr_tally()
982 /* Here, lc is the match length - MIN_MATCH */ zlib_tr_tally()
994 /* Compute an upper bound for the compressed length */ zlib_tr_tally()
1025 int lc; /* match length or unmatched char (if dist == 0) */ compress_block()
1037 /* Here, lc is the match length - MIN_MATCH */ compress_block()
1039 send_code(s, code+LITERALS+1, ltree); /* send the length code */ compress_block()
1043 send_bits(s, lc, extra); /* send the extra length bits */ compress_block()
1086 * Copy a stored block, storing first the length and its
1092 unsigned len, /* its length */ copy_block()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/core/
H A Dmm.c38 node->offset, node->length, node->type); nvkm_mm_dump()
43 node->offset, node->length, node->type); nvkm_mm_dump()
57 prev->length += this->length; nvkm_mm_free()
64 next->length += this->length; nvkm_mm_free()
90 if (a->length == size) region_head()
98 b->length = size; region_head()
102 a->length -= size; region_head()
126 e = this->offset + this->length; nvkm_mm_head()
164 if (a->length == size) region_tail()
171 a->length -= size; region_tail()
172 b->offset = a->offset + a->length; region_tail()
173 b->length = size; region_tail()
194 u32 e = this->offset + this->length; nvkm_mm_tail()
238 nvkm_mm_init(struct nvkm_mm *mm, u32 offset, u32 length, u32 block) nvkm_mm_init() argument
245 next = prev->offset + prev->length; nvkm_mm_init()
252 node->length = offset - next; nvkm_mm_init()
267 if (length) { nvkm_mm_init()
269 node->length = rounddown(offset + length, mm->block_size); nvkm_mm_init()
270 node->length -= node->offset; nvkm_mm_init()
/linux-4.1.27/net/ipv4/netfilter/
H A Dnf_log_ipv4.c59 /* Max length: 40 "SRC=255.255.255.255 DST=255.255.255.255 " */ dump_ipv4_packet()
62 /* Max length: 46 "LEN=65535 TOS=0xFF PREC=0xFF TTL=255 ID=65535 " */ dump_ipv4_packet()
67 /* Max length: 6 "CE DF MF " */ dump_ipv4_packet()
75 /* Max length: 11 "FRAG:65535 " */ dump_ipv4_packet()
93 /* Max length: 127 "OPT (" 15*4*2chars ") " */ dump_ipv4_packet()
135 /* Max length: 11 "PROTO=ICMP " */ dump_ipv4_packet()
141 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ dump_ipv4_packet()
150 /* Max length: 18 "TYPE=255 CODE=255 " */ dump_ipv4_packet()
153 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ dump_ipv4_packet()
165 /* Max length: 19 "ID=65535 SEQ=65535 " */ dump_ipv4_packet()
172 /* Max length: 14 "PARAMETER=255 " */ dump_ipv4_packet()
177 /* Max length: 24 "GATEWAY=255.255.255.255 " */ dump_ipv4_packet()
183 /* Max length: 3+maxlen */ dump_ipv4_packet()
191 /* Max length: 10 "MTU=65535 " */ dump_ipv4_packet()
208 /* Max length: 9 "PROTO=AH " */ dump_ipv4_packet()
211 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ dump_ipv4_packet()
228 /* Max length: 10 "PROTO=ESP " */ dump_ipv4_packet()
234 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ dump_ipv4_packet()
247 /* Max length: 10 "PROTO 255 " */ dump_ipv4_packet()
252 /* Max length: 15 "UID=4294967295 " */ dump_ipv4_packet()
256 /* Max length: 16 "MARK=0xFFFFFFFF " */ dump_ipv4_packet()
260 /* Proto Max log string length */ dump_ipv4_packet()
/linux-4.1.27/arch/cris/arch-v10/lib/
H A Dchecksum.S12 ;; r11 - length
15 ;; check for breakeven length between movem and normal word looping versions
17 ;; actual length when length < 40
24 ;; this overhead is why we have a check above for breakeven length
33 subq 10*4,$r11 ; update length for the first loop
69 addq 10*4,$r11 ; compensate for last loop underflowing length
H A Dchecksumcopy.S16 ;; r12 - length
19 ;; check for breakeven length between movem and normal word looping versions
21 ;; actual length when length < 40
28 ;; this overhead is why we have a check above for breakeven length
37 subq 10*4, $r12 ; update length for the first loop
75 addq 10*4,$r12 ; compensate for last loop underflowing length
/linux-4.1.27/net/sunrpc/auth_gss/
H A Dgss_generic_token.c59 (constructed, definite-length)
60 <length> possible multiple bytes, need to parse/generate
69 the sequence tag and length octets, the mech OID DER encoding, and the
76 der_length_size( int length) der_length_size() argument
78 if (length < (1<<7)) der_length_size()
80 else if (length < (1<<8)) der_length_size()
86 else if (length < (1<<16)) der_length_size()
88 else if (length < (1<<24)) der_length_size()
96 der_write_length(unsigned char **buf, int length) der_write_length() argument
98 if (length < (1<<7)) { der_write_length()
99 *(*buf)++ = (unsigned char) length; der_write_length()
101 *(*buf)++ = (unsigned char) (der_length_size(length)+127); der_write_length()
103 if (length >= (1<<24)) der_write_length()
104 *(*buf)++ = (unsigned char) (length>>24); der_write_length()
105 if (length >= (1<<16)) der_write_length()
106 *(*buf)++ = (unsigned char) ((length>>16)&0xff); der_write_length()
108 if (length >= (1<<8)) der_write_length()
109 *(*buf)++ = (unsigned char) ((length>>8)&0xff); der_write_length()
110 *(*buf)++ = (unsigned char) (length&0xff); der_write_length()
114 /* returns decoded length, or < 0 on failure. Advances buf and
144 /* returns the length of a token, given the mech oid and the body size */
/linux-4.1.27/drivers/staging/rtl8192u/
H A Dr819xU_cmdpkt.h3 /* Different command packet have dedicated message length and definition. */
25 u8 length; /* Command packet length. */ member in struct:tag_cmd_pkt_tx_feedback
61 u8 length; /* Command packet length. */ member in struct:tag_cmd_pkt_interrupt_status
70 u8 length; /* Command packet length. */ member in struct:tag_cmd_pkt_set_configuration
95 u8 length; /* Command packet length */ member in struct:tag_tx_stats_feedback
135 u8 length; /* Command packet length */ member in struct:tag_rx_debug_message_feedback
148 u8 length; /* Command packet length */ member in struct:tag_tx_rate_history
/linux-4.1.27/drivers/input/touchscreen/
H A Dcyttsp4_spi.c47 u8 op, u16 reg, u8 *buf, int length) cyttsp_spi_xfer()
57 if (length > CY_SPI_DATA_SIZE) { cyttsp_spi_xfer()
58 dev_err(dev, "%s: length %d is too big.\n", cyttsp_spi_xfer()
59 __func__, length); cyttsp_spi_xfer()
69 if (length > 0) cyttsp_spi_xfer()
70 memcpy(wr_buf + CY_SPI_CMD_BYTES, buf, length); cyttsp_spi_xfer()
84 xfer[0].len = length + CY_SPI_CMD_BYTES; cyttsp_spi_xfer()
93 xfer[1].len = length; cyttsp_spi_xfer()
120 for (i = 0; i < length; i++) cyttsp_spi_xfer()
131 u16 addr, u8 length, void *data) cyttsp_spi_read_block_data()
140 length); cyttsp_spi_read_block_data()
144 u16 addr, u8 length, const void *data) cyttsp_spi_write_block_data()
147 length); cyttsp_spi_write_block_data()
46 cyttsp_spi_xfer(struct device *dev, u8 *xfer_buf, u8 op, u16 reg, u8 *buf, int length) cyttsp_spi_xfer() argument
130 cyttsp_spi_read_block_data(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, void *data) cyttsp_spi_read_block_data() argument
143 cyttsp_spi_write_block_data(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, const void *data) cyttsp_spi_write_block_data() argument
H A Dcyttsp_spi.c44 u8 op, u16 reg, u8 *buf, int length) cyttsp_spi_xfer()
54 if (length > CY_SPI_DATA_SIZE) { cyttsp_spi_xfer()
55 dev_err(dev, "%s: length %d is too big.\n", cyttsp_spi_xfer()
56 __func__, length); cyttsp_spi_xfer()
68 memcpy(wr_buf + CY_SPI_CMD_BYTES, buf, length); cyttsp_spi_xfer()
81 xfer[0].len = length + CY_SPI_CMD_BYTES; cyttsp_spi_xfer()
90 xfer[1].len = length; cyttsp_spi_xfer()
118 for (i = 0; i < length; i++) cyttsp_spi_xfer()
129 u16 addr, u8 length, void *data) cyttsp_spi_read_block_data()
132 length); cyttsp_spi_read_block_data()
136 u16 addr, u8 length, const void *data) cyttsp_spi_write_block_data()
139 length); cyttsp_spi_write_block_data()
43 cyttsp_spi_xfer(struct device *dev, u8 *xfer_buf, u8 op, u16 reg, u8 *buf, int length) cyttsp_spi_xfer() argument
128 cyttsp_spi_read_block_data(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, void *data) cyttsp_spi_read_block_data() argument
135 cyttsp_spi_write_block_data(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, const void *data) cyttsp_spi_write_block_data() argument
H A Dcyttsp_i2c_common.c37 u16 addr, u8 length, void *values) cyttsp_i2c_read_block_data()
52 .len = length, cyttsp_i2c_read_block_data()
67 u16 addr, u8 length, const void *values) cyttsp_i2c_write_block_data()
76 .len = length + 1, cyttsp_i2c_write_block_data()
83 memcpy(&xfer_buf[1], values, length); cyttsp_i2c_write_block_data()
36 cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, void *values) cyttsp_i2c_read_block_data() argument
66 cyttsp_i2c_write_block_data(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, const void *values) cyttsp_i2c_write_block_data() argument
/linux-4.1.27/mm/
H A Dswap_cgroup.c10 unsigned long length; member in struct:swap_cgroup_ctrl
46 for (idx = 0; idx < ctrl->length; idx++) { swap_cgroup_prepare()
147 unsigned long length; swap_cgroup_swapon() local
153 length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); swap_cgroup_swapon()
154 array_size = length * sizeof(void *); swap_cgroup_swapon()
162 ctrl->length = length; swap_cgroup_swapon()
168 ctrl->length = 0; swap_cgroup_swapon()
186 unsigned long i, length; swap_cgroup_swapoff() local
195 length = ctrl->length; swap_cgroup_swapoff()
197 ctrl->length = 0; swap_cgroup_swapoff()
201 for (i = 0; i < length; i++) { swap_cgroup_swapoff()
/linux-4.1.27/net/netfilter/
H A Dnf_log_common.c31 /* Max length: 10 "PROTO=UDP " */ nf_log_dump_udp_header()
33 else /* Max length: 14 "PROTO=UDPLITE " */ nf_log_dump_udp_header()
39 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ nf_log_dump_udp_header()
47 /* Max length: 20 "SPT=65535 DPT=65535 " */ nf_log_dump_udp_header()
63 /* Max length: 10 "PROTO=TCP " */ nf_log_dump_tcp_header()
69 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ nf_log_dump_tcp_header()
76 /* Max length: 20 "SPT=65535 DPT=65535 " */ nf_log_dump_tcp_header()
79 /* Max length: 30 "SEQ=4294967295 ACK=4294967295 " */ nf_log_dump_tcp_header()
85 /* Max length: 13 "WINDOW=65535 " */ nf_log_dump_tcp_header()
87 /* Max length: 9 "RES=0x3C " */ nf_log_dump_tcp_header()
90 /* Max length: 32 "CWR ECE URG ACK PSH RST SYN FIN " */ nf_log_dump_tcp_header()
107 /* Max length: 11 "URGP=65535 " */ nf_log_dump_tcp_header()
123 /* Max length: 127 "OPT (" 15*4*2chars ") " */ nf_log_dump_tcp_header()
H A Dxt_length.c1 /* Kernel module to match packet length. */
18 MODULE_DESCRIPTION("Xtables: Packet length (Layer3,4,5) match");
44 .name = "length",
51 .name = "length",
/linux-4.1.27/include/uapi/linux/
H A Dppp-comp.h49 #define CILEN_BSD_COMPRESS 3 /* length of config. option */
66 #define CILEN_DEFLATE 4 /* length of its config option */
81 #define CILEN_MPPE 6 /* length of config option */
88 #define CILEN_PREDICTOR_1 2 /* length of its config option */
90 #define CILEN_PREDICTOR_2 2 /* length of its config option */
H A Dbinfmts.h9 * These are the maximum length and maximum number of strings passed to the
H A Dif_addrlabel.h18 __u8 ifal_prefixlen; /* Prefix length */
H A Dreiserfs_xattr.h21 size_t length; member in struct:reiserfs_security_handle
H A Datm_tcp.h23 __u32 length; /* ... of data part */ member in struct:atmtcp_hdr
30 #define ATMTCP_HDR_MAGIC (~0) /* this length indicates a command */
/linux-4.1.27/net/ipv6/netfilter/
H A Dnf_log_ipv6.c63 /* Max length: 88 "SRC=0000.0000.0000.0000.0000.0000.0000.0000 DST=0000.0000.0000.0000.0000.0000.0000.0000 " */ dump_ipv6_packet()
66 /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */ dump_ipv6_packet()
86 /* Max length: 48 "OPT (...) " */ dump_ipv6_packet()
103 /* Max length: 6 "65535 " */ dump_ipv6_packet()
106 /* Max length: 11 "INCOMPLETE " */ dump_ipv6_packet()
136 /* Max length: 3 "AH " */ dump_ipv6_packet()
148 * Max length: 26 "INCOMPLETE [65535 dump_ipv6_packet()
168 /* Max length: 4 "ESP " */ dump_ipv6_packet()
177 * Max length: 26 "INCOMPLETE [65535 bytes] )" dump_ipv6_packet()
193 /* Max length: 20 "Unknown Ext Hdr 255" */ dump_ipv6_packet()
219 /* Max length: 13 "PROTO=ICMPv6 " */ dump_ipv6_packet()
225 /* Max length: 25 "INCOMPLETE [65535 bytes] " */ dump_ipv6_packet()
233 /* Max length: 18 "TYPE=255 CODE=255 " */ dump_ipv6_packet()
240 /* Max length: 19 "ID=65535 SEQ=65535 " */ dump_ipv6_packet()
251 /* Max length: 17 "POINTER=ffffffff " */ dump_ipv6_packet()
258 /* Max length: 3+maxlen */ dump_ipv6_packet()
266 /* Max length: 10 "MTU=65535 " */ dump_ipv6_packet()
274 /* Max length: 10 "PROTO=255 " */ dump_ipv6_packet()
279 /* Max length: 15 "UID=4294967295 " */ dump_ipv6_packet()
283 /* Max length: 16 "MARK=0xFFFFFFFF " */ dump_ipv6_packet()
/linux-4.1.27/scripts/gdb/linux/
H A Ddmesg.py36 length = log_next_idx - log_first_idx
37 log_buf = inf.read_memory(start, length)
45 length = utils.read_u16(log_buf[pos + 8:pos + 10])
46 if length == 0:
62 pos += length
/linux-4.1.27/tools/testing/selftests/vm/
H A Dhugetlbfstest.c14 static size_t length = 1 << 24; variable
40 p = mmap(NULL, length, PROT_READ | PROT_WRITE, flags, fd, 0); do_mmap()
44 assert(llabs(after - before - length) < 0x40000 || do_mmap()
48 ret = munmap(p, length); do_mmap()
64 err = ftruncate(fd, length); open_file()
/linux-4.1.27/tools/firewire/
H A Dnosy-dump.c46 static void print_packet(uint32_t *data, size_t length);
47 static void decode_link_packet(struct link_packet *packet, size_t length,
147 subaction_create(uint32_t *data, size_t length) subaction_create() argument
152 sa = malloc(sizeof *sa - sizeof sa->packet + length); subaction_create()
155 sa->ack = data[length / 4 - 1]; subaction_create()
156 sa->length = length; subaction_create()
157 memcpy(&sa->packet, data, length); subaction_create()
243 decode_link_packet(&t->request->packet, t->request->length, handle_transaction()
246 decode_link_packet(&t->response->packet, t->request->length, handle_transaction()
253 print_packet((uint32_t *) &sa->packet, sa->length); handle_transaction()
255 print_packet((uint32_t *) &sa->packet, sa->length); handle_transaction()
495 handle_request_packet(uint32_t *data, size_t length) handle_request_packet() argument
503 sa = subaction_create(data, length); handle_request_packet()
560 handle_response_packet(uint32_t *data, size_t length) handle_response_packet() argument
572 sa = subaction_create(data, length); handle_response_packet()
632 handle_packet(uint32_t *data, size_t length) handle_packet() argument
634 if (length == 0) { handle_packet()
637 } else if (length > sizeof(struct phy_packet)) { handle_packet()
642 return handle_request_packet(data, length); handle_packet()
645 return handle_response_packet(data, length); handle_packet()
678 dump_data(unsigned char *data, int length) dump_data() argument
682 if (length > 128) dump_data()
685 print_length = length; dump_data()
692 if (print_length < length) dump_data()
693 printf(" (%d more bytes)", length - print_length); dump_data()
697 decode_link_packet(struct link_packet *packet, size_t length, decode_link_packet() argument
716 offset = length * 8 + f->offset - 32; decode_link_packet()
757 print_packet(uint32_t *data, size_t length) print_packet() argument
763 if (length == 4) { print_packet()
765 } else if (length < sizeof(struct phy_packet)) { print_packet()
767 for (i = 1; i < length / 4; i++) print_packet()
771 } else if (length == sizeof(struct phy_packet) && data[1] == ~data[2]) { print_packet()
814 for (i = 1; i < length / 4; i++) print_packet()
822 decode_link_packet(packet, length, 0, print_packet()
828 dump_data((unsigned char *) data + 4, length - 4); print_packet()
840 print_stats(uint32_t *data, size_t length) print_stats() argument
848 if (length == 0) print_stats()
850 else if (length < sizeof(struct phy_packet)) print_stats()
852 else if (length == sizeof(struct phy_packet) && data[1] == ~data[2]) print_stats()
912 int length, retval, view; main() local
988 if (fread(&length, sizeof length, 1, input) != 1) main()
990 fread(buf, 1, length, input); main()
1004 length = read(fd, buf, sizeof buf); main()
1010 fwrite(&length, sizeof length, 1, output); main()
1011 fwrite(buf, 1, length, output); main()
1016 handle_packet(buf, length); main()
1019 print_packet(buf, length); main()
1022 print_stats(buf, length); main()
/linux-4.1.27/arch/arm/mach-omap2/
H A Dio.c76 .length = L3_24XX_SIZE,
82 .length = L4_24XX_SIZE,
92 .length = DSP_MEM_2420_SIZE,
98 .length = DSP_IPI_2420_SIZE,
104 .length = DSP_MMU_2420_SIZE,
116 .length = L4_WK_243X_SIZE,
122 .length = OMAP243X_GPMC_SIZE,
128 .length = OMAP243X_SDRC_SIZE,
134 .length = OMAP243X_SMS_SIZE,
146 .length = L3_34XX_SIZE,
152 .length = L4_34XX_SIZE,
158 .length = OMAP34XX_GPMC_SIZE,
164 .length = OMAP343X_SMS_SIZE,
170 .length = OMAP343X_SDRC_SIZE,
176 .length = L4_PER_34XX_SIZE,
182 .length = L4_EMU_34XX_SIZE,
193 .length = L4_34XX_SIZE,
204 .length = L4_34XX_SIZE,
210 .length = L4_WK_AM33XX_SIZE,
221 .length = L3_44XX_SIZE,
227 .length = L4_44XX_SIZE,
233 .length = L4_PER_44XX_SIZE,
244 .length = L3_54XX_SIZE,
250 .length = L4_54XX_SIZE,
256 .length = L4_WK_54XX_SIZE,
262 .length = L4_PER_54XX_SIZE,
/linux-4.1.27/drivers/scsi/esas2r/
H A Desas2r_flash.c188 sgc->length, build_flash_msg()
199 sgc->length); build_flash_msg()
204 * remember the length we asked for. we have to keep track of build_flash_msg()
208 fc->curr_len = fc->sgc.length; build_flash_msg()
219 fc->sgc.length = 0; build_flash_msg()
272 esas2r_calc_byte_cksum((u8 *)pi, ch->length, 0); fix_bios()
278 u32 len = ch->length; fix_efi()
338 * If an upload just completed and the compare length is non-zero, fw_download_proc()
349 + ch->length /* end of the current image */ fw_download_proc()
362 /* Update fc and determine the length for the next upload */ fw_download_proc()
364 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
366 fc->sgc.length = fc->cmp_len; fw_download_proc()
374 * have a length = zero. This can happen since some components are fw_download_proc()
375 * not required. At the end of this 'while' we set up the length fw_download_proc()
376 * for the next request and therefore sgc.length can be = 0. fw_download_proc()
378 while (fc->sgc.length == 0) { fw_download_proc()
385 if (ch->length == 0) fw_download_proc()
392 fc->sgc.length = ch->length; fw_download_proc()
405 fc->cmp_len = ch->length; fw_download_proc()
406 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
422 if (ch->length == 0) fw_download_proc()
429 + fi->cmp_hdr[CH_IT_BIOS].length; fw_download_proc()
430 fc->sgc.length = ch->length; fw_download_proc()
439 fc->flsh_addr -= ch->length; fw_download_proc()
440 fc->cmp_len = ch->length; fw_download_proc()
441 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
457 if (ch->length == 0) fw_download_proc()
464 + fi->cmp_hdr[CH_IT_BIOS].length fw_download_proc()
465 + fi->cmp_hdr[CH_IT_MAC].length; fw_download_proc()
466 fc->sgc.length = ch->length; fw_download_proc()
475 fc->flsh_addr -= ch->length; fw_download_proc()
476 fc->cmp_len = ch->length; fw_download_proc()
477 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
494 if (ch->length == 0) fw_download_proc()
499 fc->flsh_addr = FLS_OFFSET_CPYR - ch->length; fw_download_proc()
500 fc->sgc.length = ch->length; fw_download_proc()
509 fc->flsh_addr = FLS_OFFSET_CPYR - ch->length; fw_download_proc()
510 fc->cmp_len = ch->length; fw_download_proc()
511 fc->sgc.length = FM_BUF_SZ; fw_download_proc()
544 && fc->sgc.length > fc->cmp_len) fw_download_proc()
545 fc->sgc.length = fc->cmp_len; fw_download_proc()
587 static u32 chk_cfg(u8 *cfg, u32 length, u32 *flash_ver) chk_cfg() argument
591 u32 len = length; chk_cfg()
622 /* See if we are comparing the size to the specified length */ chk_cfg()
623 if (length && sz != length) chk_cfg()
630 static u8 chk_boot(u8 *boot_img, u32 length) chk_boot() argument
641 || ((u32)hdroffset + sizeof(struct esas2r_boot_header) > length)) chk_boot()
671 for (len = (fi->length - fc->fi_hdr_len) / 2, calc_fi_checksum()
686 * 3) validate the adap_typ, action and length fields.
688 * length fields
702 /* Verify the length - length must even since we do a word checksum */ verify_fi()
703 len = fi->length; verify_fi()
719 * Loop through each component and verify the img_type and length verify_fi()
762 if (ch->length & 0x1ff) verify_fi()
766 if (ch->length == 0) verify_fi()
770 if (chk_boot((u8 *)fi + ch->image_offset, ch->length) verify_fi()
779 if (ch->length == 0) { verify_fi()
785 if (!chk_cfg((u8 *)fi + ch->image_offset + ch->length, verify_fi()
786 ch->length, NULL)) verify_fi()
802 len += ch->length; verify_fi()
811 /* Compare fi->length to the sum of ch->length fields */ verify_fi()
812 if (len != fi->length - fc->fi_hdr_len) { verify_fi()
900 datalen = le32_to_cpu(fsc->length); esas2r_process_fs_ioctl()
916 sgc->length = datalen; esas2r_process_fs_ioctl()
1311 vrq->data.sge[0].length = esas2r_nvram_write()
1432 if (ch->length) esas2r_fm_api()
1438 if (ch->length) esas2r_fm_api()
1456 fc->sgc.length = FLS_LENGTH_BOOT; esas2r_fm_api()
1467 fi->length = fc->fi_hdr_len; esas2r_fm_api()
1479 ch->length = 0; esas2r_fm_api()
H A Desas2r_vda.c112 rq->vrq->flash.length = cpu_to_le32(datalen); esas2r_process_vda_ioctl()
128 rq->vrq->cli.length = cpu_to_le32(datalen); esas2r_process_vda_ioctl()
168 /* Setup the length so building the payload SGL works */ esas2r_process_vda_ioctl()
169 rq->vrq->mgt.length = cpu_to_le32(datalen); esas2r_process_vda_ioctl()
177 sgc->length = payldlen; esas2r_process_vda_ioctl()
187 rq->vrq->mgt.length = cpu_to_le32(datalen); esas2r_process_vda_ioctl()
221 rq->vrq->cfg.length = cpu_to_le32(vi->cmd.cfg.data_length); esas2r_process_vda_ioctl()
256 sgc->length = datalen; esas2r_process_vda_ioctl()
295 le32_to_cpu(rq->func_rsp.mgt_rsp.length); esas2r_complete_vda_ioctl()
351 u32 length) esas2r_build_flash_req()
365 vrq->length = cpu_to_le32(length); esas2r_build_flash_req()
377 u32 length, esas2r_build_mgt_req()
389 vrq->length = cpu_to_le32(length); esas2r_build_mgt_req()
391 if (vrq->length) { esas2r_build_mgt_req()
396 vrq->sge[0].length = cpu_to_le32(SGE_LAST | length); esas2r_build_mgt_req()
404 vrq->prde[0].ctl_len = cpu_to_le32(length); esas2r_build_mgt_req()
415 length); esas2r_build_mgt_req()
428 vrq->length = cpu_to_le32(sizeof(struct atto_vda_ae_data)); esas2r_build_ae_req()
433 vrq->sge[0].length = cpu_to_le32(SGE_LAST | vrq->length); esas2r_build_ae_req()
440 vrq->prde[0].ctl_len = cpu_to_le32(vrq->length); esas2r_build_ae_req()
450 u32 length, esas2r_build_cli_req()
459 vrq->length = cpu_to_le32(length); esas2r_build_cli_req()
467 u32 length, esas2r_build_ioctl_req()
476 vrq->length = cpu_to_le32(length); esas2r_build_ioctl_req()
485 u32 length, esas2r_build_cfg_req()
495 vrq->length = cpu_to_le32(length); esas2r_build_cfg_req()
500 memcpy(&vrq->data, data, length); esas2r_build_cfg_req()
346 esas2r_build_flash_req(struct esas2r_adapter *a, struct esas2r_request *rq, u8 sub_func, u8 cksum, u32 addr, u32 length) esas2r_build_flash_req() argument
372 esas2r_build_mgt_req(struct esas2r_adapter *a, struct esas2r_request *rq, u8 sub_func, u8 scan_gen, u16 dev_index, u32 length, void *data) esas2r_build_mgt_req() argument
448 esas2r_build_cli_req(struct esas2r_adapter *a, struct esas2r_request *rq, u32 length, u32 cmd_rsp_len) esas2r_build_cli_req() argument
465 esas2r_build_ioctl_req(struct esas2r_adapter *a, struct esas2r_request *rq, u32 length, u8 sub_func) esas2r_build_ioctl_req() argument
482 esas2r_build_cfg_req(struct esas2r_adapter *a, struct esas2r_request *rq, u8 sub_func, u32 length, void *data) esas2r_build_cfg_req() argument
/linux-4.1.27/drivers/target/iscsi/
H A Discsi_target_datain_values.c121 datain->length = read_data_left; iscsit_set_datain_values_yes_and_yes()
130 datain->length = iscsit_set_datain_values_yes_and_yes()
132 next_burst_len += datain->length; iscsit_set_datain_values_yes_and_yes()
134 datain->length = (conn->sess->sess_ops->MaxBurstLength - iscsit_set_datain_values_yes_and_yes()
149 cmd->read_data_done += datain->length; iscsit_set_datain_values_yes_and_yes()
152 dr->read_data_done += datain->length; iscsit_set_datain_values_yes_and_yes()
230 datain->length = (cmd->se_cmd.data_length - offset); iscsit_set_datain_values_no_and_yes()
243 datain->length = iscsit_set_datain_values_no_and_yes()
247 seq->next_burst_len += datain->length; iscsit_set_datain_values_no_and_yes()
249 datain->length = (conn->sess->sess_ops->MaxBurstLength - iscsit_set_datain_values_no_and_yes()
262 if ((read_data_done + datain->length) == cmd->se_cmd.data_length) iscsit_set_datain_values_no_and_yes()
268 cmd->read_data_done += datain->length; iscsit_set_datain_values_no_and_yes()
271 dr->read_data_done += datain->length; iscsit_set_datain_values_no_and_yes()
342 if ((read_data_done + pdu->length) == cmd->se_cmd.data_length) { iscsit_set_datain_values_yes_and_no()
351 next_burst_len += pdu->length; iscsit_set_datain_values_yes_and_no()
364 cmd->read_data_done += pdu->length; iscsit_set_datain_values_yes_and_no()
367 dr->read_data_done += pdu->length; iscsit_set_datain_values_yes_and_no()
371 datain->length = pdu->length; iscsit_set_datain_values_yes_and_no()
459 seq->next_burst_len += pdu->length; iscsit_set_datain_values_no_and_no()
461 if ((read_data_done + pdu->length) == cmd->se_cmd.data_length) iscsit_set_datain_values_no_and_no()
467 cmd->read_data_done += pdu->length; iscsit_set_datain_values_no_and_no()
470 dr->read_data_done += pdu->length; iscsit_set_datain_values_no_and_no()
474 datain->length = pdu->length; iscsit_set_datain_values_no_and_no()
/linux-4.1.27/drivers/iio/
H A Dkfifo_buf.c22 int bytes_per_datum, int length) __iio_allocate_kfifo()
24 if ((length == 0) || (bytes_per_datum == 0)) __iio_allocate_kfifo()
27 return __kfifo_alloc((struct __kfifo *)&buf->kf, length, __iio_allocate_kfifo()
40 buf->buffer.length); iio_request_update_kfifo()
67 static int iio_set_length_kfifo(struct iio_buffer *r, int length) iio_set_length_kfifo() argument
70 if (length < 2) iio_set_length_kfifo()
71 length = 2; iio_set_length_kfifo()
72 if (r->length != length) { iio_set_length_kfifo()
73 r->length = length; iio_set_length_kfifo()
152 kf->buffer.length = 2; iio_kfifo_allocate()
21 __iio_allocate_kfifo(struct iio_kfifo *buf, int bytes_per_datum, int length) __iio_allocate_kfifo() argument
/linux-4.1.27/drivers/net/appletalk/
H A Dltpc.h27 unsigned short length; /* host order */ member in struct:lt_mem
52 unsigned short length; /* host order */ member in struct:lt_sendlap
60 unsigned short length; /* host order */ member in struct:lt_rcvlap
/linux-4.1.27/lib/zlib_inflate/
H A Dinflate.h20 EXLEN, /* i: waiting for extra length (gzip) */
29 STORED, /* i: waiting for stored size (length and complement) */
32 LENLENS, /* i: waiting for code length code lengths */
33 CODELENS, /* i: waiting for length/lit and distance code lengths */
34 LEN, /* i: waiting for length/lit code */
35 LENEXT, /* i: waiting for length extra bits */
41 LENGTH, /* i: waiting for 32-bit length (gzip) */
92 unsigned length; /* literal or length of data to copy */ member in struct:inflate_state
97 code const *lencode; /* starting table for length/literal codes */
102 unsigned ncode; /* number of code length code lengths */
103 unsigned nlen; /* number of length code lengths */
/linux-4.1.27/include/linux/dma/
H A Dhsu.h26 * @length: I/O space length
35 unsigned int length; member in struct:hsu_dma_chip
/linux-4.1.27/drivers/staging/rtl8192e/rtl8192e/
H A Dr8192E_cmdpkt.h35 u8 length; member in struct:cmpk_txfb
62 u8 length; member in struct:cmpk_intr_sta
70 u8 length; member in struct:cmpk_set_cfg
88 u8 length; member in struct:cmpk_tx_status
117 u8 length; member in struct:cmpk_rx_dbginfo
125 u8 length; member in struct:cmpk_tx_rahis
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/gr/
H A Dctxnv40.h41 cp_ctx(struct nvkm_grctx *ctx, u32 reg, u32 length) cp_ctx() argument
46 ctx->ctxvals_pos = ctx->ctxvals_base + length; cp_ctx()
48 if (length > (CP_CTX_COUNT >> CP_CTX_COUNT_SHIFT)) { cp_ctx()
49 cp_lsr(ctx, length); cp_ctx()
50 length = 0; cp_ctx()
53 cp_out(ctx, CP_CTX | (length << CP_CTX_COUNT_SHIFT) | ctx->ctxprog_reg); cp_ctx()
/linux-4.1.27/arch/m68k/atari/
H A Datasound.c85 /* Set length of envelope (max 8 sec). */ atari_mksound()
86 int length = (ticks * PSG_ENV_FREQ_10) / HZ / 10; atari_mksound() local
88 if (length > 0xffff) length = 0xffff; atari_mksound()
90 sound_ym.wd_data = length & 0xff; atari_mksound()
92 sound_ym.wd_data = length >> 8; atari_mksound()
/linux-4.1.27/drivers/media/pci/bt8xx/
H A Ddst_ca.c74 static void put_command_and_length(u8 *data, int command, int length) put_command_and_length() argument
79 data[3] = length; put_command_and_length()
82 static void put_checksum(u8 *check_string, int length) put_checksum() argument
85 dprintk(verbose, DST_CA_DEBUG, 1, " -> string length : 0x%02x", length); put_checksum()
86 check_string[length] = dst_check_sum (check_string, length); put_checksum()
87 dprintk(verbose, DST_CA_DEBUG, 1, " -> checksum : 0x%02x", check_string[length]); put_checksum()
156 int length, str_length; ca_get_app_info() local
172 length = state->messages[5]; ca_get_app_info()
173 str_length = length - 6; ca_get_app_info()
176 dprintk(verbose, DST_CA_ERROR, 1, "Invalid string length returned in ca_get_app_info(). Recovering."); ca_get_app_info()
179 // First, the command and length fields ca_get_app_info()
180 put_command_and_length(&state->messages[0], CA_APP_INFO, length); ca_get_app_info()
185 // Set string length and copy string ca_get_app_info()
212 // Set the command and length of the output ca_get_ca_info()
351 static int handle_dst_tag(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw_buffer, u32 length) handle_dst_tag() argument
357 if (length > 247) { handle_dst_tag()
361 hw_buffer->msg[0] = (length & 0xff) + 7; handle_dst_tag()
366 hw_buffer->msg[5] = length & 0xff; handle_dst_tag()
370 * Need to compute length for EN50221 section 8.3.2, for the time being handle_dst_tag()
373 memcpy(&hw_buffer->msg[7], &p_ca_message->msg[4], length); handle_dst_tag()
379 static int write_to_8820(struct dst_state *state, struct ca_msg *hw_buffer, u8 length, u8 reply) write_to_8820() argument
381 if ((dst_put_ci(state, hw_buffer->msg, length, hw_buffer->msg, reply)) < 0) { write_to_8820()
395 u32 length = 0; asn_1_decode() local
400 length = length_field & 0x7f; asn_1_decode()
401 dprintk(verbose, DST_CA_DEBUG, 1, " Length=[%02x]\n", length); asn_1_decode()
405 length = length << 8; asn_1_decode()
406 length += asn_1_array[count + 1]; asn_1_decode()
407 dprintk(verbose, DST_CA_DEBUG, 1, " Length=[%04x]", length); asn_1_decode()
410 return length; asn_1_decode()
413 static int debug_string(u8 *msg, u32 length, u32 offset) debug_string() argument
418 for (i = offset; i < length; i++) debug_string()
428 u32 length = 0; ca_set_pmt() local
431 length = asn_1_decode(&p_ca_message->msg[3]); ca_set_pmt()
432 dprintk(verbose, DST_CA_DEBUG, 1, " CA Message length=[%d]", length); ca_set_pmt()
433 debug_string(&p_ca_message->msg[4], length, 0); /* length is excluding tag & length */ ca_set_pmt()
435 memset(hw_buffer->msg, '\0', length); ca_set_pmt()
436 handle_dst_tag(state, p_ca_message, hw_buffer, length); ca_set_pmt()
439 debug_string(hw_buffer->msg, (length + tag_length), 0); /* tags too */ ca_set_pmt()
440 write_to_8820(state, hw_buffer, (length + tag_length), reply); ca_set_pmt()
675 static ssize_t dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) dst_ca_read() argument
682 static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *offset) dst_ca_write() argument
/linux-4.1.27/drivers/media/usb/cpia2/
H A Dcpia2_usb.c100 if(cam->workbuff->length > cam->workbuff->max_length) process_frame()
101 cam->workbuff->max_length = cam->workbuff->length; process_frame()
121 if (cam->workbuff->length > 3) { process_frame()
123 cam->workbuff->length < cam->workbuff->max_length) { process_frame()
125 memset(cam->workbuff->data+cam->workbuff->length, process_frame()
127 cam->workbuff->length); process_frame()
129 cam->workbuff->max_length = cam->workbuff->length; process_frame()
173 cam->workbuff->data[cam->workbuff->length++] = 0xFF; add_APPn()
174 cam->workbuff->data[cam->workbuff->length++] = 0xE0+cam->APPn; add_APPn()
175 cam->workbuff->data[cam->workbuff->length++] = 0; add_APPn()
176 cam->workbuff->data[cam->workbuff->length++] = cam->APP_len+2; add_APPn()
177 memcpy(cam->workbuff->data+cam->workbuff->length, add_APPn()
179 cam->workbuff->length += cam->APP_len; add_APPn()
192 cam->workbuff->data[cam->workbuff->length++] = 0xFF; add_COM()
193 cam->workbuff->data[cam->workbuff->length++] = 0xFE; add_COM()
194 cam->workbuff->data[cam->workbuff->length++] = 0; add_COM()
195 cam->workbuff->data[cam->workbuff->length++] = cam->COM_len+2; add_COM()
196 memcpy(cam->workbuff->data+cam->workbuff->length, add_COM()
198 cam->workbuff->length += cam->COM_len; add_COM()
252 ptr->length = 0; cpia2_usb_complete()
265 cam->workbuff->length = 0; cpia2_usb_complete()
268 //DBG(" Packet %d length = %d, status = %d\n", i, n, st); cpia2_usb_complete()
309 if (cam->frame_size < cam->workbuff->length + n) { cpia2_usb_complete()
310 ERR("buffer overflow! length: %d, n: %d\n", cpia2_usb_complete()
311 cam->workbuff->length, n); cpia2_usb_complete()
313 if(cam->workbuff->length > cam->workbuff->max_length) cpia2_usb_complete()
315 cam->workbuff->length; cpia2_usb_complete()
319 if (cam->workbuff->length == 0) { cpia2_usb_complete()
335 cam->workbuff->length = 2; cpia2_usb_complete()
338 memcpy(cam->workbuff->data+cam->workbuff->length, cpia2_usb_complete()
340 cam->workbuff->length += n-data_offset; cpia2_usb_complete()
341 } else if (cam->workbuff->length > 0) { cpia2_usb_complete()
342 memcpy(cam->workbuff->data + cam->workbuff->length, cpia2_usb_complete()
344 cam->workbuff->length += n; cpia2_usb_complete()
347 if ((cam->workbuff->length >= 3) && cpia2_usb_complete()
348 (cam->workbuff->data[cam->workbuff->length - 3] == 0xFF) && cpia2_usb_complete()
349 (cam->workbuff->data[cam->workbuff->length - 2] == 0xD9) && cpia2_usb_complete()
350 (cam->workbuff->data[cam->workbuff->length - 1] == 0xFF)) { cpia2_usb_complete()
352 cam->workbuff->data[cam->workbuff->length - 1] = 0; cpia2_usb_complete()
353 cam->workbuff->length -= 1; cpia2_usb_complete()
354 } else if ((cam->workbuff->length >= 2) && cpia2_usb_complete()
355 (cam->workbuff->data[cam->workbuff->length - 2] == 0xFF) && cpia2_usb_complete()
356 (cam->workbuff->data[cam->workbuff->length - 1] == 0xD9)) { cpia2_usb_complete()
361 DBG("Workbuff image size = %d\n",cam->workbuff->length); cpia2_usb_complete()
686 urb->iso_frame_desc[fx].length = FRAME_SIZE_PER_DESC; submit_urbs()
721 cam->buffers[i].length = 0; cpia2_usb_stream_start()
892 cam->curbuff->length = 0; cpia2_usb_disconnect()
/linux-4.1.27/arch/x86/um/
H A Dstub_32.S12 /* load length of additional data */
15 /* if(length == 0) : end of list */
H A Dstub_64.S27 /* load length of additional data */
30 /* if(length == 0) : end of list */
/linux-4.1.27/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Dmm.h16 u32 length; member in struct:nvkm_mm_node
33 int nvkm_mm_init(struct nvkm_mm *, u32 offset, u32 length, u32 block);
/linux-4.1.27/drivers/usb/gadget/
H A Du_f.c23 req->length = len ?: default_len; alloc_ep_req()
24 req->buf = kmalloc(req->length, GFP_ATOMIC); alloc_ep_req()
/linux-4.1.27/arch/arm64/include/asm/
H A Dalternative.h17 void apply_alternatives(void *start, size_t length);
41 " .error \"Alternatives instruction length mismatch\"\n\t"\
H A Dalternative-asm.h23 .error "Alternatives instruction length mismatch"
/linux-4.1.27/include/asm-generic/
H A Dscatterlist.h12 unsigned int length; member in struct:scatterlist
31 #define sg_dma_len(sg) ((sg)->length)
/linux-4.1.27/drivers/infiniband/hw/ipath/
H A Dipath_keys.c144 isge->length = sge->length; ipath_lkey_ok()
145 isge->sge_length = sge->length; ipath_lkey_ok()
158 off + sge->length > mr->length || ipath_lkey_ok()
167 while (off >= mr->map[m]->segs[n].length) { ipath_lkey_ok()
168 off -= mr->map[m]->segs[n].length; ipath_lkey_ok()
177 isge->length = mr->map[m]->segs[n].length - off; ipath_lkey_ok()
178 isge->sge_length = sge->length; ipath_lkey_ok()
189 * ipath_rkey_ok - check the IB virtual address, length, and RKEY
192 * @len: length of data
224 sge->length = len; ipath_rkey_ok()
240 if (unlikely(vaddr < mr->iova || off + len > mr->length || ipath_rkey_ok()
249 while (off >= mr->map[m]->segs[n].length) { ipath_rkey_ok()
250 off -= mr->map[m]->segs[n].length; ipath_rkey_ok()
259 sge->length = mr->map[m]->segs[n].length - off; ipath_rkey_ok()
/linux-4.1.27/arch/arm64/crypto/
H A Dcrc32-arm64.c43 s64 length = len; crc32_arm64_le_hw() local
45 while ((length -= sizeof(u64)) >= 0) { crc32_arm64_le_hw()
51 if (length & sizeof(u32)) { crc32_arm64_le_hw()
55 if (length & sizeof(u16)) { crc32_arm64_le_hw()
59 if (length & sizeof(u8)) crc32_arm64_le_hw()
67 s64 length = len; crc32c_arm64_le_hw() local
69 while ((length -= sizeof(u64)) >= 0) { crc32c_arm64_le_hw()
75 if (length & sizeof(u32)) { crc32c_arm64_le_hw()
79 if (length & sizeof(u16)) { crc32c_arm64_le_hw()
83 if (length & sizeof(u8)) crc32c_arm64_le_hw()
129 unsigned int length) chksum_update()
133 ctx->crc = crc32_arm64_le_hw(ctx->crc, data, length); chksum_update()
138 unsigned int length) chksumc_update()
142 ctx->crc = crc32c_arm64_le_hw(ctx->crc, data, length); chksumc_update()
191 unsigned int length, u8 *out) chksum_digest()
195 return __chksum_finup(mctx->key, data, length, out); chksum_digest()
199 unsigned int length, u8 *out) chksumc_digest()
203 return __chksumc_finup(mctx->key, data, length, out); chksumc_digest()
128 chksum_update(struct shash_desc *desc, const u8 *data, unsigned int length) chksum_update() argument
137 chksumc_update(struct shash_desc *desc, const u8 *data, unsigned int length) chksumc_update() argument
190 chksum_digest(struct shash_desc *desc, const u8 *data, unsigned int length, u8 *out) chksum_digest() argument
198 chksumc_digest(struct shash_desc *desc, const u8 *data, unsigned int length, u8 *out) chksumc_digest() argument
/linux-4.1.27/sound/firewire/fireworks/
H A Dfireworks_transaction.c119 copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode) copy_resp_to_buf() argument
127 length = min_t(size_t, be32_to_cpu(t->length) * sizeof(u32), length); copy_resp_to_buf()
136 if (capacity < length) { copy_resp_to_buf()
142 while (length > 0) { copy_resp_to_buf()
145 till_end = min_t(unsigned int, length, till_end); copy_resp_to_buf()
153 length -= till_end; copy_resp_to_buf()
168 void *data, size_t length, int *rcode) handle_resp_for_user()
193 copy_resp_to_buf(efw, data, length, rcode); handle_resp_for_user()
200 void *data, size_t length, int *rcode, u32 seqnum) handle_resp_for_kernel()
218 t->size = min_t(unsigned int, length, t->size); handle_resp_for_kernel()
231 void *data, size_t length, void *callback_data) efw_response()
237 if (length < sizeof(struct snd_efw_transaction)) { efw_response()
248 data, length, &rcode, seqnum); efw_response()
251 data, length, &dummy); efw_response()
254 data, length, &rcode); efw_response()
307 .length = SND_EFW_RESPONSE_MAXIMUM_BYTES,
167 handle_resp_for_user(struct fw_card *card, int generation, int source, void *data, size_t length, int *rcode) handle_resp_for_user() argument
199 handle_resp_for_kernel(struct fw_card *card, int generation, int source, void *data, size_t length, int *rcode, u32 seqnum) handle_resp_for_kernel() argument
228 efw_response(struct fw_card *card, struct fw_request *request, int tcode, int destination, int source, int generation, unsigned long long offset, void *data, size_t length, void *callback_data) efw_response() argument
/linux-4.1.27/arch/powerpc/platforms/pseries/
H A Dreconfig.c142 * @length: return value; set to length of value
149 static char * parse_next_property(char *buf, char *end, char **name, int *length, parse_next_property() argument
170 /* now we're on the length */ parse_next_property()
171 *length = -1; parse_next_property()
172 *length = simple_strtoul(tmp, &tmp, 10); parse_next_property()
173 if (*length == -1) { parse_next_property()
186 tmp += *length; parse_next_property()
203 static struct property *new_property(const char *name, const int length, new_property() argument
213 if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) new_property()
216 memcpy(new->value, value, length); new_property()
217 *(((char *)new->value) + length) = 0; new_property()
218 new->length = length; new_property()
235 int length, rv = 0; do_add_node() local
252 (buf = parse_next_property(buf, end, &name, &length, &value))) { do_add_node()
255 prop = new_property(name, length, value, last); do_add_node()
313 int length; do_add_property() local
320 if (parse_next_property(buf, end, &name, &length, &value) == NULL) do_add_property()
323 prop = new_property(name, length, value, NULL); do_add_property()
359 int length; do_update_property() local
367 next_prop = parse_next_property(buf, end, &name, &length, &value); do_update_property()
374 newprop = new_property(name, length, value, NULL); do_update_property()
/linux-4.1.27/block/
H A Dcmdline-parser.c41 int length; parse_subpart() local
50 length = min_t(int, next - partdef, parse_subpart()
52 strncpy(new_subpart->name, partdef, length); parse_subpart()
53 new_subpart->name[length] = '\0'; parse_subpart()
93 int length; parse_parts() local
110 length = min_t(int, next - bdevdef, sizeof(newparts->name) - 1); parse_parts()
111 strncpy(newparts->name, bdevdef, length); parse_parts()
112 newparts->name[length] = '\0'; parse_parts()
121 length = (!next) ? (sizeof(buf) - 1) : parse_parts()
124 strncpy(buf, bdevdef, length); parse_parts()
125 buf[length] = '\0'; parse_parts()
/linux-4.1.27/drivers/net/ethernet/intel/e1000e/
H A Dmanage.c27 * @length: size of EEPROM to calculate a checksum for
29 * Calculates the checksum for some buffer on a specified length. The
32 static u8 e1000_calculate_checksum(u8 *buffer, u32 length) e1000_calculate_checksum() argument
40 for (i = 0; i < length; i++) e1000_calculate_checksum()
171 u16 i, length = sizeof(struct e1000_host_mng_command_header); e1000_mng_write_cmd_header() local
175 hdr->checksum = e1000_calculate_checksum((u8 *)hdr, length); e1000_mng_write_cmd_header()
177 length >>= 2; e1000_mng_write_cmd_header()
179 for (i = 0; i < length; i++) { e1000_mng_write_cmd_header()
191 * @length: size of the buffer
200 u16 length, u16 offset, u8 *sum) e1000_mng_host_if_write()
209 if (length == 0 || offset + length > E1000_HI_MAX_MNG_DATA_LENGTH) e1000_mng_host_if_write()
223 length -= j - prev_bytes; e1000_mng_host_if_write()
227 remaining = length & 0x3; e1000_mng_host_if_write()
228 length -= remaining; e1000_mng_host_if_write()
230 /* Calculate length in DWORDs */ e1000_mng_host_if_write()
231 length >>= 2; e1000_mng_host_if_write()
236 for (i = 0; i < length; i++) { e1000_mng_host_if_write()
263 * @length: size of the buffer
267 s32 e1000e_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length) e1000e_mng_write_dhcp_info() argument
274 hdr.command_length = length; e1000e_mng_write_dhcp_info()
285 ret_val = e1000_mng_host_if_write(hw, buffer, length, e1000e_mng_write_dhcp_info()
199 e1000_mng_host_if_write(struct e1000_hw *hw, u8 *buffer, u16 length, u16 offset, u8 *sum) e1000_mng_host_if_write() argument
/linux-4.1.27/drivers/infiniband/hw/qib/
H A Dqib_keys.c181 isge->length = sge->length; qib_lkey_ok()
182 isge->sge_length = sge->length; qib_lkey_ok()
194 off + sge->length > mr->length || qib_lkey_ok()
217 while (off >= mr->map[m]->segs[n].length) { qib_lkey_ok()
218 off -= mr->map[m]->segs[n].length; qib_lkey_ok()
228 isge->length = mr->map[m]->segs[n].length - off; qib_lkey_ok()
229 isge->sge_length = sge->length; qib_lkey_ok()
240 * qib_rkey_ok - check the IB virtual address, length, and RKEY
243 * @len: length of data
280 sge->length = len; qib_rkey_ok()
293 if (unlikely(vaddr < mr->iova || off + len > mr->length || qib_rkey_ok()
316 while (off >= mr->map[m]->segs[n].length) { qib_rkey_ok()
317 off -= mr->map[m]->segs[n].length; qib_rkey_ok()
327 sge->length = mr->map[m]->segs[n].length - off; qib_rkey_ok()
367 if (wr->wr.fast_reg.length > ps * wr->wr.fast_reg.page_list_len) qib_fast_reg_mr()
373 mr->length = wr->wr.fast_reg.length; qib_fast_reg_mr()
380 mr->map[m]->segs[n].length = ps; qib_fast_reg_mr()
/linux-4.1.27/drivers/iio/common/ssp_sensors/
H A Dssp_spi.c39 __le16 length; member in struct:ssp_msg_header
45 u16 length; member in struct:ssp_msg
95 h.length = cpu_to_le16(len); ssp_create_msg()
106 msg->length = len; ssp_create_msg()
145 int length = data_frame[(*data_index)++]; ssp_print_mcu_debug() local
147 if (length > received_len - *data_index || length <= 0) { ssp_print_mcu_debug()
148 ssp_dbg("[SSP]: MSG From MCU-invalid debug length(%d/%d)\n", ssp_print_mcu_debug()
149 length, received_len); ssp_print_mcu_debug()
150 return length ? length : -EPROTO; ssp_print_mcu_debug()
155 *data_index += length; ssp_print_mcu_debug()
195 const bool use_no_irq = msg->length == 0; ssp_do_transfer()
264 if (WARN_ON(!msg->length)) ssp_spi_sync()
344 u16 length, msg_options; ssp_irq_msg() local
353 length = le16_to_cpu(data->header_buffer[1]); ssp_irq_msg()
356 if (length == 0) { ssp_irq_msg()
357 dev_err(SSP_DEV, "length received from mcu is 0\n"); ssp_irq_msg()
385 buffer = kmalloc(length, GFP_KERNEL | GFP_DMA); ssp_irq_msg()
392 ret = spi_read(data->spi, buffer, length); ssp_irq_msg()
407 msg->length); ssp_irq_msg()
412 msg->length); ssp_irq_msg()
416 msg->length = 1; ssp_irq_msg()
430 buffer = kzalloc(length, GFP_KERNEL | GFP_DMA); ssp_irq_msg()
434 ret = spi_read(data->spi, buffer, length); ssp_irq_msg()
441 ret = ssp_parse_dataframe(data, buffer, length); ssp_irq_msg()
487 u8 *send_buf, u8 length) ssp_send_instruction()
503 msg = ssp_create_msg(inst, length + 2, SSP_AP2HUB_WRITE, 0); ssp_send_instruction()
508 ssp_fill_buffer(msg, 1, send_buf, length); ssp_send_instruction()
486 ssp_send_instruction(struct ssp_data *data, u8 inst, u8 sensor_type, u8 *send_buf, u8 length) ssp_send_instruction() argument
/linux-4.1.27/drivers/firewire/
H A Dcore-transaction.c54 #define HEADER_DATA_LENGTH(length) ((length) << 16)
213 unsigned long long offset, void *payload, size_t length) fw_fill_request()
219 HEADER_DATA_LENGTH(length) | fw_fill_request()
224 packet->payload_length = length; fw_fill_request()
255 HEADER_DATA_LENGTH(length) | fw_fill_request()
259 packet->payload_length = length; fw_fill_request()
269 HEADER_DATA_LENGTH(length) | fw_fill_request()
312 * @length: length of the payload, in bytes
331 * @length <= 8 or of local (loopback) requests. Hence make sure that the
335 * In case of request types without payload, @data is NULL and @length is 0.
352 unsigned long long offset, void *payload, size_t length, fw_send_request()
383 speed, offset, payload, length); fw_send_request()
401 void *payload, size_t length, void *data) transaction_callback()
406 memcpy(d->payload, payload, length); transaction_callback()
421 void *payload, size_t length) fw_run_transaction()
430 offset, payload, length, transaction_callback, &d); fw_run_transaction()
489 struct list_head *list, unsigned long long offset, size_t length) lookup_overlapping_address_handler()
494 if (handler->offset < offset + length && list_for_each_entry_rcu()
495 offset < handler->offset + handler->length) list_for_each_entry_rcu()
503 unsigned long long offset, size_t length) is_enclosing_handler()
506 offset + length <= handler->offset + handler->length; is_enclosing_handler()
510 struct list_head *list, unsigned long long offset, size_t length) lookup_enclosing_address_handler()
515 if (is_enclosing_handler(handler, offset, length)) list_for_each_entry_rcu()
542 static bool is_in_fcp_region(u64 offset, size_t length) is_in_fcp_region() argument
545 offset + length <= (CSR_REGISTER_BASE | CSR_FCP_END); is_in_fcp_region()
553 * region->start, ->end, and handler->length have to be quadlet-aligned.
576 handler->length & 3 || fw_core_add_address_handler()
577 handler->length == 0) fw_core_add_address_handler()
583 while (handler->offset + handler->length <= region->end) { fw_core_add_address_handler()
584 if (is_in_fcp_region(handler->offset, handler->length)) fw_core_add_address_handler()
589 handler->offset, handler->length); fw_core_add_address_handler()
591 handler->offset += other->length; fw_core_add_address_handler()
626 u32 length; member in struct:fw_request
675 int rcode, void *payload, size_t length) fw_fill_response()
717 HEADER_DATA_LENGTH(length) | fw_fill_response()
721 response->payload_length = length; fw_fill_response()
752 u32 *data, length; allocate_request() local
759 length = 4; allocate_request()
765 length = HEADER_GET_DATA_LENGTH(p->header[3]); allocate_request()
770 length = 4; allocate_request()
775 length = HEADER_GET_DATA_LENGTH(p->header[3]); allocate_request()
784 request = kmalloc(sizeof(*request) + length, GFP_ATOMIC); allocate_request()
795 request->length = length; allocate_request()
797 memcpy(request->data, data, length); allocate_request()
854 offset, request->length); handle_exclusive_region_request()
859 request->data, request->length, handle_exclusive_region_request()
877 request->length > 0x200) { handle_fcp_region_request()
896 if (is_enclosing_handler(handler, offset, request->length)) handle_fcp_region_request()
901 request->length, handle_fcp_region_request()
931 if (!is_in_fcp_region(offset, request->length)) fw_core_handle_request()
974 * FIXME: sanity check packet, is length correct, does tcodes fw_core_handle_response()
1044 unsigned long long offset, void *payload, size_t length, handle_topology_map()
1054 if ((offset & 3) > 0 || (length & 3) > 0) { handle_topology_map()
1060 memcpy(payload, &card->topology_map[start], length); handle_topology_map()
1066 .length = 0x400,
1089 unsigned long long offset, void *payload, size_t length, handle_registers()
1203 .length = 0x400,
1209 unsigned long long offset, void *payload, size_t length, handle_low_memory()
1220 .length = FW_MAX_PHYSICAL_RANGE,
1248 .length = ARRAY_SIZE(vendor_textual_descriptor),
1255 .length = ARRAY_SIZE(model_textual_descriptor),
211 fw_fill_request(struct fw_packet *packet, int tcode, int tlabel, int destination_id, int source_id, int generation, int speed, unsigned long long offset, void *payload, size_t length) fw_fill_request() argument
350 fw_send_request(struct fw_card *card, struct fw_transaction *t, int tcode, int destination_id, int generation, int speed, unsigned long long offset, void *payload, size_t length, fw_transaction_callback_t callback, void *callback_data) fw_send_request() argument
400 transaction_callback(struct fw_card *card, int rcode, void *payload, size_t length, void *data) transaction_callback() argument
419 fw_run_transaction(struct fw_card *card, int tcode, int destination_id, int generation, int speed, unsigned long long offset, void *payload, size_t length) fw_run_transaction() argument
488 lookup_overlapping_address_handler( struct list_head *list, unsigned long long offset, size_t length) lookup_overlapping_address_handler() argument
502 is_enclosing_handler(struct fw_address_handler *handler, unsigned long long offset, size_t length) is_enclosing_handler() argument
509 lookup_enclosing_address_handler( struct list_head *list, unsigned long long offset, size_t length) lookup_enclosing_address_handler() argument
674 fw_fill_response(struct fw_packet *response, u32 *request_header, int rcode, void *payload, size_t length) fw_fill_response() argument
1042 handle_topology_map(struct fw_card *card, struct fw_request *request, int tcode, int destination, int source, int generation, unsigned long long offset, void *payload, size_t length, void *callback_data) handle_topology_map() argument
1087 handle_registers(struct fw_card *card, struct fw_request *request, int tcode, int destination, int source, int generation, unsigned long long offset, void *payload, size_t length, void *callback_data) handle_registers() argument
1207 handle_low_memory(struct fw_card *card, struct fw_request *request, int tcode, int destination, int source, int generation, unsigned long long offset, void *payload, size_t length, void *callback_data) handle_low_memory() argument
/linux-4.1.27/drivers/scsi/fnic/
H A Drq_enet_desc.h42 u64 address, u8 type, u16 length) rq_enet_desc_enc()
45 desc->length_type = cpu_to_le16((length & RQ_ENET_LEN_MASK) | rq_enet_desc_enc()
50 u64 *address, u8 *type, u16 *length) rq_enet_desc_dec()
53 *length = le16_to_cpu(desc->length_type) & RQ_ENET_LEN_MASK; rq_enet_desc_dec()
41 rq_enet_desc_enc(struct rq_enet_desc *desc, u64 address, u8 type, u16 length) rq_enet_desc_enc() argument
49 rq_enet_desc_dec(struct rq_enet_desc *desc, u64 *address, u8 *type, u16 *length) rq_enet_desc_dec() argument
H A Dwq_enet_desc.h24 __le16 length; member in struct:wq_enet_desc
52 u64 address, u16 length, u16 mss, u16 header_length, wq_enet_desc_enc()
57 desc->length = cpu_to_le16(length & WQ_ENET_LEN_MASK); wq_enet_desc_enc()
71 u64 *address, u16 *length, u16 *mss, u16 *header_length, wq_enet_desc_dec()
76 *length = le16_to_cpu(desc->length) & WQ_ENET_LEN_MASK; wq_enet_desc_dec()
51 wq_enet_desc_enc(struct wq_enet_desc *desc, u64 address, u16 length, u16 mss, u16 header_length, u8 offload_mode, u8 eop, u8 cq_entry, u8 fcoe_encap, u8 vlan_tag_insert, u16 vlan_tag, u8 loopback) wq_enet_desc_enc() argument
70 wq_enet_desc_dec(struct wq_enet_desc *desc, u64 *address, u16 *length, u16 *mss, u16 *header_length, u8 *offload_mode, u8 *eop, u8 *cq_entry, u8 *fcoe_encap, u8 *vlan_tag_insert, u16 *vlan_tag, u8 *loopback) wq_enet_desc_dec() argument
/linux-4.1.27/drivers/pci/hotplug/
H A Dcpqphp_sysfs.c52 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_ctrl()
59 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_ctrl()
66 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_ctrl()
73 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_ctrl()
98 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_dev()
105 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_dev()
112 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_dev()
119 out += sprintf(out, "start = %8.8x, length = %8.8x\n", res->base, res->length); show_dev()
/linux-4.1.27/arch/sh/kernel/
H A Ddma-nommu.c33 WARN_ON(nents == 0 || sg[0].length == 0); nommu_map_sg()
38 dma_cache_sync(dev, sg_virt(s), s->length, dir); for_each_sg()
41 s->dma_length = s->length; for_each_sg()
61 dma_cache_sync(dev, sg_virt(s), s->length, dir); nommu_sync_sg()
/linux-4.1.27/drivers/thunderbolt/
H A Dctl.h63 u32 length, int timeout_msec);
67 u32 length, int timeout_msec);
69 enum tb_cfg_space space, u32 offset, u32 length);
71 enum tb_cfg_space space, u32 offset, u32 length);
/linux-4.1.27/include/acpi/
H A Dacpi_numa.h7 /* Proximity bitmap length */
/linux-4.1.27/include/scsi/fc/
H A Dfc_fcp.h56 __be32 fc_dl; /* data length (must follow fc_cdb) */
59 #define FCP_CMND_LEN 32 /* expected length of structure */
68 __be32 fc_dl; /* data length (must follow fc_cdb) */
71 #define FCP_CMND32_LEN 48 /* expected length of structure */
72 #define FCP_CMND32_ADD_LEN (16 / 4) /* Additional cdb length */
97 * Bits 7:2 are the additional FCP_CDB length / 4.
99 #define FCP_CFL_LEN_MASK 0xfc /* mask for additional length */
100 #define FCP_CFL_LEN_SHIFT 2 /* shift bits for additional length */
109 __be32 ft_burst_len; /* burst length */
113 #define FCP_TXRDY_LEN 12 /* expected length of structure */
132 * are valid length.
141 #define FCP_RESP_LEN 12 /* expected length of structure */
145 __be32 fr_sns_len; /* SCSI Sense length */
146 __be32 fr_rsp_len; /* Response Info length */
150 * bidirectional read residual length, if any.
154 #define FCP_RESP_EXT_LEN 12 /* expected length of the structure */
/linux-4.1.27/include/uapi/linux/netfilter_ipv6/
H A Dip6t_opts.h21 #define IP6T_OPTS_INV_LEN 0x01 /* Invert the sense of length. */
/linux-4.1.27/arch/powerpc/mm/
H A Dvphn.h10 * form the complete property we have to add the length in the first cell.
/linux-4.1.27/arch/arm/mach-tegra/
H A Dio.c37 .length = IO_PPSB_SIZE,
43 .length = IO_APB_SIZE,
49 .length = IO_CPU_SIZE,
55 .length = IO_IRAM_SIZE,
/linux-4.1.27/sound/firewire/
H A Dlib.c22 * @length: length of @buffer
33 u64 offset, void *buffer, size_t length, snd_fw_transaction()
48 buffer, length); snd_fw_transaction()
32 snd_fw_transaction(struct fw_unit *unit, int tcode, u64 offset, void *buffer, size_t length, unsigned int flags) snd_fw_transaction() argument
H A Dlib.h14 u64 offset, void *buffer, size_t length,
/linux-4.1.27/sound/usb/usx2y/
H A Dusx2yhwdeppcm.h15 length; member in struct:snd_usX2Y_hwdep_pcm_shm::__anon14747
/linux-4.1.27/tools/testing/selftests/powerpc/vphn/
H A Dvphn.h10 * form the complete property we have to add the length in the first cell.
/linux-4.1.27/drivers/net/ethernet/qualcomm/
H A Dqca_framing.h40 /* Frame length is invalid */
43 /* Frame length is invalid */
81 /* Waiting Byte 0-1 of length (litte endian) */
89 /* The frame length is used as the state until
105 /* Offset in buffer (borrowed for length too) */
108 /* Frame length as kept by this module */
126 * QCAFRM_INVLEN QCA7K frame length is invalid
H A Dqca_framing.c29 qcafrm_create_header(u8 *buf, u16 length) qcafrm_create_header() argument
36 len = cpu_to_le16(length); qcafrm_create_header()
66 * QCAFRM_INVLEN Atheros frame length is invalid
85 /* first two bytes of length must be 0 */ qcafrm_fsm_decode()
105 /* 2 bytes length. */ qcafrm_fsm_decode()
106 /* Borrow offset field to hold length for now. */ qcafrm_fsm_decode()
/linux-4.1.27/drivers/memstick/host/
H A Dtifm_ms.c87 unsigned char *buf, unsigned int length) tifm_ms_read_data()
92 while (host->io_pos && length) { tifm_ms_read_data()
95 length--; tifm_ms_read_data()
99 if (!length) tifm_ms_read_data()
103 if (length < 4) tifm_ms_read_data()
107 length -= 4; tifm_ms_read_data()
111 if (length tifm_ms_read_data()
117 length--; tifm_ms_read_data()
118 if (!length) tifm_ms_read_data()
127 unsigned char *buf, unsigned int length) tifm_ms_write_data()
133 while (host->io_pos < 4 && length) { tifm_ms_write_data()
136 length--; tifm_ms_write_data()
151 if (!length) tifm_ms_write_data()
155 if (length < 4) tifm_ms_write_data()
161 length -= 4; tifm_ms_write_data()
165 switch (length) { tifm_ms_write_data()
185 unsigned int length; tifm_ms_transfer_data() local
193 length = host->req->sg.length - host->block_pos; tifm_ms_transfer_data()
196 length = host->req->data_len - host->block_pos; tifm_ms_transfer_data()
199 dev_dbg(&sock->dev, "fifo data transfer, %d, %d\n", length, tifm_ms_transfer_data()
202 while (length) { tifm_ms_transfer_data()
210 p_cnt = min(p_cnt, length); tifm_ms_transfer_data()
231 length -= t_size; tifm_ms_transfer_data()
235 dev_dbg(&sock->dev, "fifo data transfer, %d remaining\n", length); tifm_ms_transfer_data()
236 if (!length && (host->req->data_dir == WRITE)) { tifm_ms_transfer_data()
251 return length; tifm_ms_transfer_data()
271 data_len = host->req->sg.length; tifm_ms_issue_cmd()
86 tifm_ms_read_data(struct tifm_ms *host, unsigned char *buf, unsigned int length) tifm_ms_read_data() argument
126 tifm_ms_write_data(struct tifm_ms *host, unsigned char *buf, unsigned int length) tifm_ms_write_data() argument
H A Djmb38x_ms.c158 unsigned char *buf, unsigned int length) jmb38x_ms_read_data()
162 while (host->io_pos && length) { jmb38x_ms_read_data()
165 length--; jmb38x_ms_read_data()
169 if (!length) jmb38x_ms_read_data()
173 if (length < 4) jmb38x_ms_read_data()
176 length -= 4; jmb38x_ms_read_data()
180 if (length jmb38x_ms_read_data()
186 length--; jmb38x_ms_read_data()
187 if (!length) jmb38x_ms_read_data()
197 unsigned int length) jmb38x_ms_read_reg_data()
201 while (host->io_pos > 4 && length) { jmb38x_ms_read_reg_data()
204 length--; jmb38x_ms_read_reg_data()
208 if (!length) jmb38x_ms_read_reg_data()
211 while (host->io_pos && length) { jmb38x_ms_read_reg_data()
214 length--; jmb38x_ms_read_reg_data()
223 unsigned int length) jmb38x_ms_write_data()
228 while (host->io_pos < 4 && length) { jmb38x_ms_write_data()
231 length--; jmb38x_ms_write_data()
244 if (!length) jmb38x_ms_write_data()
248 if (length < 4) jmb38x_ms_write_data()
253 length -= 4; jmb38x_ms_write_data()
257 switch (length) { jmb38x_ms_write_data()
276 unsigned int length) jmb38x_ms_write_reg_data()
280 while (host->io_pos < 4 && length) { jmb38x_ms_write_reg_data()
284 length--; jmb38x_ms_write_reg_data()
287 if (!length) jmb38x_ms_write_reg_data()
290 while (host->io_pos < 8 && length) { jmb38x_ms_write_reg_data()
294 length--; jmb38x_ms_write_reg_data()
302 unsigned int length; jmb38x_ms_transfer_data() local
310 length = host->req->sg.length - host->block_pos; jmb38x_ms_transfer_data()
313 length = host->req->data_len - host->block_pos; jmb38x_ms_transfer_data()
317 while (length) { jmb38x_ms_transfer_data()
325 p_cnt = min(p_cnt, length); jmb38x_ms_transfer_data()
351 length -= t_size; jmb38x_ms_transfer_data()
355 if (!length && host->req->data_dir == WRITE) { jmb38x_ms_transfer_data()
364 return length; jmb38x_ms_transfer_data()
408 data_len = host->req->sg.length; jmb38x_ms_issue_cmd()
157 jmb38x_ms_read_data(struct jmb38x_ms_host *host, unsigned char *buf, unsigned int length) jmb38x_ms_read_data() argument
195 jmb38x_ms_read_reg_data(struct jmb38x_ms_host *host, unsigned char *buf, unsigned int length) jmb38x_ms_read_reg_data() argument
221 jmb38x_ms_write_data(struct jmb38x_ms_host *host, unsigned char *buf, unsigned int length) jmb38x_ms_write_data() argument
274 jmb38x_ms_write_reg_data(struct jmb38x_ms_host *host, unsigned char *buf, unsigned int length) jmb38x_ms_write_reg_data() argument
/linux-4.1.27/drivers/staging/comedi/
H A Drange.c85 if (RANGE_LENGTH(it.range_type) != lr->length) { do_rangeinfo_ioctl()
87 "wrong length %d should be %d (0x%08x)\n", do_rangeinfo_ioctl()
89 lr->length, it.range_type); do_rangeinfo_ioctl()
94 sizeof(struct comedi_krange) * lr->length)) do_rangeinfo_ioctl()
117 range_len = s->range_table->length; comedi_check_chanlist()
119 range_len = s->range_table_list[chan]->length; comedi_check_chanlist()
125 "bad chanlist[%d]=0x%08x chan=%d range length=%d\n", comedi_check_chanlist()
/linux-4.1.27/drivers/s390/char/
H A Dsclp_ocf.c49 v = sclp_find_gds_vector(evbuf + 1, (void *) evbuf + evbuf->length, sclp_ocf_handler()
54 v = sclp_find_gds_vector(v + 1, (void *) v + v->length, 0x9f22); sclp_ocf_handler()
58 sv = sclp_find_gds_subvector(v + 1, (void *) v + v->length, 0x81); sclp_ocf_handler()
62 netid = sclp_find_gds_subvector(sv + 1, (void *) sv + sv->length, 1); sclp_ocf_handler()
64 cpc = sclp_find_gds_subvector(sv + 1, (void *) sv + sv->length, 2); sclp_ocf_handler()
68 size = min(OCF_LENGTH_HMC_NETWORK, (size_t) netid->length); sclp_ocf_handler()
74 size = min(OCF_LENGTH_CPC_NAME, (size_t) cpc->length); sclp_ocf_handler()
/linux-4.1.27/arch/arm/mach-omap1/
H A Dio.c35 .length = OMAP1_IO_SIZE,
45 .length = OMAP7XX_DSP_SIZE,
50 .length = OMAP7XX_DSPREG_SIZE,
61 .length = OMAP1510_DSP_SIZE,
66 .length = OMAP1510_DSPREG_SIZE,
77 .length = OMAP16XX_DSP_SIZE,
82 .length = OMAP16XX_DSPREG_SIZE,
/linux-4.1.27/drivers/mtd/nand/
H A Dfsmc_nand.c47 {.offset = 8, .length = 8},
48 {.offset = 24, .length = 8},
49 {.offset = 40, .length = 8},
50 {.offset = 56, .length = 8},
51 {.offset = 72, .length = 8},
52 {.offset = 88, .length = 8},
53 {.offset = 104, .length = 8},
54 {.offset = 120, .length = 8}
62 {.offset = 8, .length = 8},
63 {.offset = 24, .length = 8},
64 {.offset = 40, .length = 8},
65 {.offset = 56, .length = 8},
73 {.offset = 8, .length = 8},
118 {.offset = 15, .length = 3},
119 {.offset = 31, .length = 3},
120 {.offset = 47, .length = 3},
121 {.offset = 63, .length = 3},
122 {.offset = 79, .length = 3},
123 {.offset = 95, .length = 3},
124 {.offset = 111, .length = 3},
125 {.offset = 127, .length = 3},
126 {.offset = 143, .length = 3},
127 {.offset = 159, .length = 3},
128 {.offset = 175, .length = 3},
129 {.offset = 191, .length = 3},
130 {.offset = 207, .length = 3},
131 {.offset = 223, .length = 3},
132 {.offset = 239, .length = 3},
133 {.offset = 255, .length = 1}
162 {.offset = 15, .length = 3},
163 {.offset = 31, .length = 3},
164 {.offset = 47, .length = 3},
165 {.offset = 63, .length = 3},
166 {.offset = 79, .length = 3},
167 {.offset = 95, .length = 3},
168 {.offset = 111, .length = 3},
169 {.offset = 127, .length = 97}
198 {.offset = 15, .length = 3},
199 {.offset = 31, .length = 3},
200 {.offset = 47, .length = 3},
201 {.offset = 63, .length = 3},
202 {.offset = 79, .length = 3},
203 {.offset = 95, .length = 3},
204 {.offset = 111, .length = 3},
205 {.offset = 127, .length = 1}
226 {.offset = 15, .length = 3},
227 {.offset = 31, .length = 3},
228 {.offset = 47, .length = 3},
229 {.offset = 63, .length = 1},
244 {.offset = 15, .length = 1},
259 {.offset = 2, .length = 13},
260 {.offset = 18, .length = 13},
261 {.offset = 34, .length = 13},
262 {.offset = 50, .length = 13},
263 {.offset = 66, .length = 13},
264 {.offset = 82, .length = 13},
265 {.offset = 98, .length = 13},
266 {.offset = 114, .length = 13}
272 {.offset = 0, .length = 4},
273 {.offset = 6, .length = 9}
741 len = ecc_place->eccplace[group].length; fsmc_read_page_hwecc()
745 * length is intentionally kept a higher multiple of 2 fsmc_read_page_hwecc()
/linux-4.1.27/fs/reiserfs/
H A Dxattr_security.c70 &sec->value, &sec->length); reiserfs_security_init()
77 sec->length = 0; reiserfs_security_init()
81 if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) { reiserfs_security_init()
83 reiserfs_xattr_nblocks(inode, sec->length); reiserfs_security_init()
100 sec->length, XATTR_CREATE); reiserfs_security_write()
/linux-4.1.27/arch/parisc/math-emu/
H A Dfpbits.h53 #define Bitfield_extract(start, length, object) \
54 ((object) >> (HOSTWDSZ - (start) - (length)) & \
55 ((unsigned)-1 >> (HOSTWDSZ - (length))))
57 #define Bitfield_signed_extract(start, length, object) \
58 ((int)((object) << start) >> (HOSTWDSZ - (length)))
/linux-4.1.27/drivers/input/joystick/
H A Dadi.c110 int length; member in struct:adi
181 static void adi_move_bits(struct adi_port *port, int length) adi_move_bits() argument
192 adi[0].data[((length - 1) >> 1) + i + 1] = adi[1].data[i]; adi_move_bits()
223 if (adi->ret < adi->length || adi->id != (adi_get_bits(adi, 4) | (adi_get_bits(adi, 4) << 4))) adi_decode()
265 adi_move_bits(port, port->adi[0].length); adi_read()
268 if (port->adi[i].length) adi_read()
334 if (adi->ret < ADI_MIN_ID_LENGTH) /* Minimum ID packet length */ adi_id_decode()
346 adi->length = adi_get_bits(adi, 10); adi_id_decode()
348 if (adi->length >= ADI_MAX_LENGTH || adi->length < ADI_MIN_LENGTH) { adi_id_decode()
349 printk(KERN_WARNING "adi: Bad data packet length (%d).\n", adi->length); adi_id_decode()
350 adi->length = 0; adi_id_decode()
359 adi->length = 0; adi_id_decode()
380 if (adi->length != t && adi->length != t + (t & 1)) { adi_id_decode()
381 printk(KERN_WARNING "adi: Expected length %d != data length %d\n", t, adi->length); adi_id_decode()
382 adi->length = 0; adi_id_decode()
448 if (!adi->length) adi_init_center()
499 if (!port->adi[i].length) adi_connect()
507 if (!port->adi[0].length && !port->adi[1].length) { adi_connect()
522 if (port->adi[i].length > 0) { adi_connect()
532 if (port->adi[i].length > 0) { adi_connect()
551 if (port->adi[i].length > 0) adi_disconnect()
/linux-4.1.27/drivers/staging/sm750fb/
H A Dddk750_hwi2c.c86 * length - Total number of bytes to be written to the device
95 unsigned int length, hwI2CWriteData()
115 if (length < MAX_HWI2C_FIFO) hwI2CWriteData()
116 count = length - 1; hwI2CWriteData()
132 /* Substract length */ hwI2CWriteData()
133 length -= (count + 1); hwI2CWriteData()
138 } while (length > 0); hwI2CWriteData()
152 * length - Total number of bytes to be read
155 * length to make sure that it can keep all the data read.
162 unsigned int length, hwI2CReadData()
182 if (length <= MAX_HWI2C_FIFO) hwI2CReadData()
183 count = length - 1; hwI2CReadData()
199 /* Substract length by 16 */ hwI2CReadData()
200 length -= (count + 1); hwI2CReadData()
205 } while (length > 0); hwI2CReadData()
93 hwI2CWriteData( unsigned char deviceAddress, unsigned int length, unsigned char *pBuffer ) hwI2CWriteData() argument
160 hwI2CReadData( unsigned char deviceAddress, unsigned int length, unsigned char *pBuffer ) hwI2CReadData() argument
/linux-4.1.27/drivers/parport/
H A Dprobe.c133 * '\0'. Buffer begins with two Device ID length bytes as given by
138 unsigned char length[2]; parport_read_device_id() local
146 /* First two bytes are MSB,LSB of inclusive length. */ parport_read_device_id()
147 retval = parport_read (port, length, 2); parport_read_device_id()
156 memcpy(buffer, length, 2); parport_read_device_id()
159 /* Some devices wrongly send LE length, and some send it two parport_read_device_id()
161 belen = (length[0] << 8) + length[1]; parport_read_device_id()
162 lelen = (length[1] << 8) + length[0]; parport_read_device_id()
180 " length of %#zX bytes\n", parport_read_device_id()
187 /* Try to respect the given ID length despite all the bugs in parport_read_device_id()
188 * the ID length. Read according to shortest possible ID parport_read_device_id()
220 length[0], length[1]); parport_read_device_id()
/linux-4.1.27/include/uapi/linux/usb/
H A Dfunctionfs.h39 __le32 length; member in struct:usb_functionfs_descs_head_v2
50 __le32 length; member in struct:usb_functionfs_descs_head
92 * | 4 | length | LE32 | length of the whole data chunk |
112 * | 4 | length | LE32 | length of the whole data chunk |
125 * | 0 | bLength | U8 | length of the descriptor |
135 * | 1 | dwLength | U32 | length of the descriptor |
145 * | 1 | dwLength | U32 | length of the descriptor |
168 * | 0 | dwSize | U32 | length of the descriptor |
170 * | 8 | wPropertyNameLength | U16 | bPropertyName length (NL) |
172 * |10+NL| dwPropertyDataLength | U32 | bPropertyData length (DL) |
178 __le32 length; member in struct:usb_functionfs_strings_head
189 * | 4 | length | LE32 | length of the data chunk |
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
H A Den_port.h106 /* Received frames with a length of 64 octets */
116 /* Received frames with a length of 127 octets */
126 /* Received frames with a length of 255 octets */
136 /* Received frames with a length of 511 octets */
146 /* Received frames with a length of 1023 octets */
156 /* Received frames with a length of 1518 octets */
166 /* Received frames with a length of 1522 octets */
176 /* Received frames with a length of 1548 octets */
186 /* Received frames with a length of 1548 < octets < MTU */
196 /* Received frames with a length of MTU< octets and good CRC */
321 /* Count of received frames with a length/type field value between 46
325 /* Count of received frames with length/type field between 1501 and 1535
334 /* Transmit frames with a length of 64 octets */
345 /* Transmit frames with a length of 65 to 127 octets. */
356 /* Transmit frames with a length of 128 to 255 octets */
367 /* Transmit frames with a length of 256 to 511 octets */
378 /* Transmit frames with a length of 512 to 1023 octets */
389 /* Transmit frames with a length of 1024 to 1518 octets */
400 /* Counts transmit frames with a length of 1519 to 1522 bytes */
411 /* Transmit frames with a length of 1523 to 1548 octets */
422 /* Counts transmit frames with a length of 1549 to MTU bytes */
433 /* Transmit frames with a length greater than MTU octets and a good CRC. */
563 /* Received frames with a length greater than MTU octets and a bad CRC */
568 /* Received frames with SFD with a length of less than 64 octets and a
571 /* Received frames with a length less than 64 octets and a good CRC */
580 frame-too-long, FCS, or length errors */
/linux-4.1.27/scripts/
H A Dsign-file58 die "$file: Wanted length ", $st[7], ", got ", $len, "\n"
143 die $x509, ": ", $cursor->[0], ": ASN.1 indefinite length\n"
195 my $cursor = [ 0, length($x509_certificate), \$x509_certificate ];
232 my $vcursor = [ 0, length($raw_value), \$raw_value ];
274 if (length($org) <= length($cn) &&
275 substr($cn, 0, length($org)) eq $org) {
281 if (length($org) >= 7 &&
282 length($cn) >= 7 &&
381 $signature = pack("n", length($signature)) . $signature,
392 length($signers_name),
393 length($key_identifier),
394 length($signature));
397 print "Size of unsigned module: ", length($unsigned_module), "\n";
398 print "Size of signer's name : ", length($signers_name), "\n";
399 print "Size of key identifier : ", length($key_identifier), "\n";
400 print "Size of signature : ", length($signature), "\n";
401 print "Size of information : ", length($info), "\n";
402 print "Size of magic number : ", length($magic_number), "\n";
/linux-4.1.27/drivers/mtd/ubi/
H A Dmisc.c29 * @length: the buffer length
32 * the length. Continuous 0xFF bytes at the end of the buffer are not
36 int length) ubi_calc_data_len()
40 ubi_assert(!(length & (ubi->min_io_size - 1))); ubi_calc_data_len()
42 for (i = length - 1; i >= 0; i--) ubi_calc_data_len()
46 /* The resulting length must be aligned to the minimum flash I/O size */ ubi_calc_data_len()
47 length = ALIGN(i + 1, ubi->min_io_size); ubi_calc_data_len()
48 return length; ubi_calc_data_len()
35 ubi_calc_data_len(const struct ubi_device *ubi, const void *buf, int length) ubi_calc_data_len() argument
/linux-4.1.27/drivers/regulator/
H A Dpwm-regulator.c109 int length, ret; pwm_regulator_probe() local
123 prop = of_find_property(np, "voltage-table", &length); pwm_regulator_probe()
129 if ((length < sizeof(*drvdata->duty_cycle_table)) || pwm_regulator_probe()
130 (length % sizeof(*drvdata->duty_cycle_table))) { pwm_regulator_probe()
131 dev_err(&pdev->dev, "voltage-table length(%d) is invalid\n", pwm_regulator_probe()
132 length); pwm_regulator_probe()
136 drvdata->desc.n_voltages = length / sizeof(*drvdata->duty_cycle_table); pwm_regulator_probe()
139 length, GFP_KERNEL); pwm_regulator_probe()
146 length / sizeof(u32)); pwm_regulator_probe()
/linux-4.1.27/arch/s390/include/asm/
H A Didals.h26 * Test if an address/length pair needs an idal list.
29 idal_is_needed(void *vaddr, unsigned int length) idal_is_needed() argument
31 return ((__pa(vaddr) + length - 1) >> 31) != 0; idal_is_needed()
36 * Return the number of idal words needed for an address/length pair.
38 static inline unsigned int idal_nr_words(void *vaddr, unsigned int length) idal_nr_words() argument
40 return ((__pa(vaddr) & (IDA_BLOCK_SIZE-1)) + length + idal_nr_words()
45 * Create the list of idal words for an address/length pair.
48 void *vaddr, unsigned int length) idal_create_words()
54 cidaw = ((paddr & (IDA_BLOCK_SIZE-1)) + length + idal_create_words()
47 idal_create_words(unsigned long *idaws, void *vaddr, unsigned int length) idal_create_words() argument
H A Dappldata.h43 unsigned short length) appldata_asm()
53 parm_list.buffer_length = length; appldata_asm()
41 appldata_asm(struct appldata_product_id *id, unsigned short fn, void *buffer, unsigned short length) appldata_asm() argument
/linux-4.1.27/net/nfc/
H A Dllcp_commands.c93 u8 *tlv, length; nfc_llcp_build_tlv() local
100 length = llcp_tlv_length[type]; nfc_llcp_build_tlv()
101 if (length == 0 && value_length == 0) nfc_llcp_build_tlv()
103 else if (length == 0) nfc_llcp_build_tlv()
104 length = value_length; nfc_llcp_build_tlv()
106 *tlv_length = 2 + length; nfc_llcp_build_tlv()
107 tlv = kzalloc(2 + length, GFP_KERNEL); nfc_llcp_build_tlv()
112 tlv[1] = length; nfc_llcp_build_tlv()
113 memcpy(tlv + 2, value, length); nfc_llcp_build_tlv()
203 u8 *tlv = tlv_array, type, length, offset = 0; nfc_llcp_parse_gb_tlv() local
205 pr_debug("TLV array length %d\n", tlv_array_len); nfc_llcp_parse_gb_tlv()
212 length = tlv[1]; nfc_llcp_parse_gb_tlv()
214 pr_debug("type 0x%x length %d\n", type, length); nfc_llcp_parse_gb_tlv()
237 offset += length + 2; nfc_llcp_parse_gb_tlv()
238 tlv += length + 2; nfc_llcp_parse_gb_tlv()
252 u8 *tlv = tlv_array, type, length, offset = 0; nfc_llcp_parse_connection_tlv() local
254 pr_debug("TLV array length %d\n", tlv_array_len); nfc_llcp_parse_connection_tlv()
261 length = tlv[1]; nfc_llcp_parse_connection_tlv()
263 pr_debug("type 0x%x length %d\n", type, length); nfc_llcp_parse_connection_tlv()
279 offset += length + 2; nfc_llcp_parse_connection_tlv()
280 tlv += length + 2; nfc_llcp_parse_connection_tlv()
309 /* XXX Add an skb length check */ llcp_add_tlv()
433 pr_debug("SKB size %d SN length %zu\n", size, sock->service_name_len); nfc_llcp_send_connect()
/linux-4.1.27/drivers/net/ethernet/8390/
H A Dstnic.c222 stnic_block_input (struct net_device *dev, int length, struct sk_buff *skb, stnic_block_input() argument
230 STNIC_WRITE (PG0_RBCR0, length & 0xff); stnic_block_input()
231 STNIC_WRITE (PG0_RBCR1, length >> 8); stnic_block_input()
234 if (length & 1) stnic_block_input()
235 length++; stnic_block_input()
237 while (length > 0) stnic_block_input()
248 length -= sizeof (half); stnic_block_input()
255 stnic_block_output (struct net_device *dev, int length, stnic_block_output() argument
262 STNIC_WRITE (PG0_RBCR0, length & 0xff); stnic_block_output()
263 STNIC_WRITE (PG0_RBCR1, length >> 8); stnic_block_output()
268 if (length & 1) stnic_block_output()
269 length++; stnic_block_output()
271 while (length > 0) stnic_block_output()
280 length -= sizeof (half); stnic_block_output()
/linux-4.1.27/drivers/media/pci/ivtv/
H A Divtv-queue.c48 q->length = 0; ivtv_queue_init()
66 q->length += s->buf_size; ivtv_enqueue()
81 q->length -= s->buf_size; ivtv_dequeue()
95 from->length -= s->buf_size; ivtv_queue_move_buf()
101 to->length += s->buf_size; ivtv_queue_move_buf()
115 available buffer length, otherwise needed_bytes is compared to the
117 length is always used.
134 needed_bytes = from->length; ivtv_queue_move()
137 bytes_available = from_free ? from->length : from->bytesused; ivtv_queue_move()
138 bytes_steal = (from_free && steal) ? steal->length : 0; ivtv_queue_move()
156 steal->length -= s->buf_size; ivtv_queue_move()
160 from->length += s->buf_size; ivtv_queue_move()
168 u32 old_length = to->length; ivtv_queue_move()
170 while (to->length - old_length < needed_bytes) { ivtv_queue_move()
/linux-4.1.27/drivers/media/common/b2c2/
H A Dflexcop-sram.c178 u32 length;
180 length = len;
185 length = (((addr >> 0x0f) + 1) << 0x0f) - addr;
188 sram_read_chunk(adapter, addr, buf, length);
189 addr = addr + length;
190 buf = buf + length;
191 len = len - length;
197 u32 length;
199 length = len;
205 length = (((addr >> 0x0f) + 1) << 0x0f) - addr;
208 sram_write_chunk(adapter, addr, buf, length);
209 addr = addr + length;
210 buf = buf + length;
211 len = len - length;
/linux-4.1.27/fs/exofs/
H A Dore.c230 * The ore might decide to only IO less then @length bytes do to alignmets
234 * (@offset + @length) % strip_size == 0. Or the complete range is within a
236 * - Memory condition only permitted a shorter IO. (A user can use @length=~0
237 * And check the returned ios->length for max_io_size.)
239 * The caller must check returned ios->length (and/or ios->nr_pages) and
240 * re-issue these pages that fall outside of ios->length
243 bool is_reading, u64 offset, u64 length, ore_get_rw_state()
251 if (layout->parity && length) { ore_get_rw_state()
259 num_stripes = div_u64_rem(length, stripe_size, &remainder); ore_get_rw_state()
291 if (length) { ore_get_rw_state()
292 ore_calc_stripe_info(layout, offset, length, &ios->si); ore_get_rw_state()
293 ios->length = ios->si.length; ore_get_rw_state()
295 ios->length + PAGE_SIZE - 1) / PAGE_SIZE; ore_get_rw_state()
309 * be converted to use ore_get_rw_state() with length=0
447 "offset=0x%llx, length=0x%llx\n", ore_check_io()
449 _LLU(per_dev->length)); ore_check_io()
457 u64 offset = (ios->offset + ios->length) - residual; ore_check_io()
527 u64 length, struct ore_striping_info *si) ore_calc_stripe_info()
582 si->length = T - H; ore_calc_stripe_info()
583 if (si->length > length) ore_calc_stripe_info()
584 si->length = length; ore_calc_stripe_info()
586 Nlast = div_u64(H + si->length + U - 1, U); ore_calc_stripe_info()
649 per_dev->length += len; _ore_add_stripe_unit()
653 * per_dev->length and cur_pg. This means that we might have a bigger _ore_add_stripe_unit()
654 * bio than the CDB requested length (per_dev->length). That's fine _ore_add_stripe_unit()
673 if (!per_dev->length && !per_dev->offset) { _add_parity_units()
707 u64 length = ios->length; _prepare_for_striping() local
715 BUG_ON(length > si->length); _prepare_for_striping()
717 while (length) { _prepare_for_striping()
722 if (!per_dev->length && !per_dev->offset) { _prepare_for_striping()
738 if (cur_len >= length) _prepare_for_striping()
739 cur_len = length; _prepare_for_striping()
746 length -= cur_len; _prepare_for_striping()
750 if (unlikely((dev == si->par_dev) || (!length && ios->sp2d))) { _prepare_for_striping()
751 if (!length && ios->sp2d) { _prepare_for_striping()
765 ios->sp2d ? length : cur_len); _prepare_for_striping()
843 if (ios->pages && !master_dev->length) _write_mirror()
875 per_dev->length = master_dev->length; _write_mirror()
885 per_dev->offset, bio, per_dev->length); _write_mirror()
887 "length=0x%llx dev=%d\n", _write_mirror()
890 _LLU(per_dev->length), dev); _write_mirror()
897 (ios->si.unit_off + ios->length > _write_mirror()
902 ios->kern_buff, ios->length); _write_mirror()
906 "length=0x%llx dev=%d\n", _write_mirror()
909 _LLU(ios->length), per_dev->dev); _write_mirror()
965 if (ios->pages && !per_dev->length) _ore_read_mirror()
988 per_dev->bio, per_dev->length); _ore_read_mirror()
991 ORE_DBGMSG("read(0x%llx) offset=0x%llx length=0x%llx" _ore_read_mirror()
993 _LLU(per_dev->offset), _LLU(per_dev->length), _ore_read_mirror()
242 ore_get_rw_state(struct ore_layout *layout, struct ore_components *oc, bool is_reading, u64 offset, u64 length, struct ore_io_state **pios) ore_get_rw_state() argument
526 ore_calc_stripe_info(struct ore_layout *layout, u64 file_offset, u64 length, struct ore_striping_info *si) ore_calc_stripe_info() argument
/linux-4.1.27/fs/ntfs/
H A Drunlist.c165 if ((dst->vcn + dst->length) != src->vcn) ntfs_are_rl_mergeable()
169 ((dst->lcn + dst->length) == src->lcn)) ntfs_are_rl_mergeable()
191 dst->length += src->length; __ntfs_rl_merge()
252 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; ntfs_rl_append()
254 /* We may have changed the length of the file, so fix the end marker */ ntfs_rl_append()
256 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; ntfs_rl_append()
306 merged_length = dst[loc - 1].length; ntfs_rl_insert()
308 merged_length += src->length; ntfs_rl_insert()
339 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; ntfs_rl_insert()
340 /* ... and the length. */ ntfs_rl_insert()
342 dst[marker].length = dst[marker + 1].vcn - dst[marker].vcn; ntfs_rl_insert()
347 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length; ntfs_rl_insert()
348 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; ntfs_rl_insert()
351 dst[loc].length = dst[loc + 1].vcn; ntfs_rl_insert()
440 /* We may have changed the length of the file, so fix the end marker. */ ntfs_rl_replace()
442 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; ntfs_rl_replace()
490 dst[loc].length = dst[loc+1].vcn - dst[loc].vcn; ntfs_rl_split()
491 dst[loc+ssize+1].vcn = dst[loc+ssize].vcn + dst[loc+ssize].length; ntfs_rl_split()
492 dst[loc+ssize+1].length = dst[loc+ssize+2].vcn - dst[loc+ssize+1].vcn; ntfs_rl_split()
562 for (dend = 0; likely(drl[dend].length); dend++) ntfs_runlists_merge()
572 drl[0].length = drl[1].vcn; ntfs_runlists_merge()
580 while (srl[si].length && srl[si].lcn < LCN_HOLE) ntfs_runlists_merge()
584 BUG_ON(!srl[si].length); ntfs_runlists_merge()
594 for (; drl[di].length; di++) { ntfs_runlists_merge()
595 if (drl[di].vcn + drl[di].length > srl[sstart].vcn) ntfs_runlists_merge()
608 for (send = si; srl[send].length; send++) ntfs_runlists_merge()
610 for (dend = di; drl[dend].length; dend++) ntfs_runlists_merge()
631 ((drl[dins].vcn + drl[dins].length) <= /* End of hole */ ntfs_runlists_merge()
632 (srl[send - 1].vcn + srl[send - 1].length))); ntfs_runlists_merge()
635 if (finish && !drl[dins].length) ntfs_runlists_merge()
637 if (marker && (drl[dins].vcn + drl[dins].length > srl[send - 1].vcn)) ntfs_runlists_merge()
663 for (ds = dend; drl[ds].length; ds++) ntfs_runlists_merge()
697 drl[ds - 1].length; ntfs_runlists_merge()
702 drl[ds].length = marker_vcn - drl[ds].vcn; ntfs_runlists_merge()
709 drl[ds].length = (s64)0; ntfs_runlists_merge()
777 attr_end = (u8*)attr + le32_to_cpu(attr->length); ntfs_mapping_pairs_decompress()
795 rl->length = vcn; ntfs_mapping_pairs_decompress()
820 * Get the change in vcn, i.e. the run length in clusters. ntfs_mapping_pairs_decompress()
822 * A negative run length doesn't make any sense, but hey, I ntfs_mapping_pairs_decompress()
824 * length as a signed value so that's how it is... ntfs_mapping_pairs_decompress()
832 } else { /* The length entry is compulsory. */ ntfs_mapping_pairs_decompress()
833 ntfs_error(vol->sb, "Missing length entry in mapping " ntfs_mapping_pairs_decompress()
838 * Assume a negative length to indicate data corruption and ntfs_mapping_pairs_decompress()
842 ntfs_error(vol->sb, "Invalid length in mapping pairs " ntfs_mapping_pairs_decompress()
847 * Enter the current run length into the current runlist ntfs_mapping_pairs_decompress()
850 rl[rlpos].length = deltaxcn; ntfs_mapping_pairs_decompress()
851 /* Increment the current vcn by the current run length. */ ntfs_mapping_pairs_decompress()
939 vcn += rl[rlpos].length = max_cluster - ntfs_mapping_pairs_decompress()
959 rl[rlpos].length = (s64)0; ntfs_mapping_pairs_decompress()
1021 for (i = 0; likely(rl[i].length); i++) { ntfs_rl_vcn_to_lcn()
1058 while (likely(rl->length)) { ntfs_rl_find_vcn_nolock()
1080 * number (lcn) or a specific run length.
1148 while (rl->length && first_vcn >= rl[1].vcn) ntfs_get_size_for_mapping_pairs()
1150 if (unlikely((!rl->length && first_vcn > rl->vcn) || ntfs_get_size_for_mapping_pairs()
1158 s64 delta, length = rl->length; ntfs_get_size_for_mapping_pairs() local
1160 /* We know rl->length != 0 already. */ ntfs_get_size_for_mapping_pairs()
1161 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) ntfs_get_size_for_mapping_pairs()
1165 * run length. ntfs_get_size_for_mapping_pairs()
1170 length = s1 - rl->vcn; ntfs_get_size_for_mapping_pairs()
1174 /* Header byte + length. */ ntfs_get_size_for_mapping_pairs()
1175 rls += 1 + ntfs_get_nr_significant_bytes(length - delta); ntfs_get_size_for_mapping_pairs()
1194 for (; rl->length && !the_end; rl++) { ntfs_get_size_for_mapping_pairs()
1195 s64 length = rl->length; ntfs_get_size_for_mapping_pairs() local
1197 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) ntfs_get_size_for_mapping_pairs()
1201 * run length. ntfs_get_size_for_mapping_pairs()
1206 length = s1 - rl->vcn; ntfs_get_size_for_mapping_pairs()
1209 /* Header byte + length. */ ntfs_get_size_for_mapping_pairs()
1210 rls += 1 + ntfs_get_nr_significant_bytes(length); ntfs_get_size_for_mapping_pairs()
1246 * a given logical cluster number (lcn) or a specific run length to the minimum
1347 while (rl->length && first_vcn >= rl[1].vcn) ntfs_mapping_pairs_build()
1349 if (unlikely((!rl->length && first_vcn > rl->vcn) || ntfs_mapping_pairs_build()
1360 s64 delta, length = rl->length; ntfs_mapping_pairs_build() local
1362 /* We know rl->length != 0 already. */ ntfs_mapping_pairs_build()
1363 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) ntfs_mapping_pairs_build()
1367 * run length. ntfs_mapping_pairs_build()
1372 length = s1 - rl->vcn; ntfs_mapping_pairs_build()
1376 /* Write length. */ ntfs_mapping_pairs_build()
1378 length - delta); ntfs_mapping_pairs_build()
1412 for (; rl->length && !the_end; rl++) { ntfs_mapping_pairs_build()
1413 s64 length = rl->length; ntfs_mapping_pairs_build() local
1415 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) ntfs_mapping_pairs_build()
1419 * run length. ntfs_mapping_pairs_build()
1424 length = s1 - rl->vcn; ntfs_mapping_pairs_build()
1427 /* Write length. */ ntfs_mapping_pairs_build()
1429 length); ntfs_mapping_pairs_build()
1479 * @new_length: the new length of the runlist in VCNs
1482 * holding the runlist elements to a length of @new_length VCNs.
1519 * length @new_length followed by a terminator runlist element. ntfs_rl_truncate_nolock()
1528 rl[1].length = rl->vcn = 0; ntfs_rl_truncate_nolock()
1530 rl[1].vcn = rl->length = new_length; ntfs_rl_truncate_nolock()
1536 while (likely(rl->length && new_length >= rl[1].vcn)) ntfs_rl_truncate_nolock()
1542 if (rl->length) { ntfs_rl_truncate_nolock()
1549 while (likely(trl->length)) ntfs_rl_truncate_nolock()
1553 rl->length = new_length - rl->vcn; ntfs_rl_truncate_nolock()
1559 if (rl->length) { ntfs_rl_truncate_nolock()
1561 if (!rl->length) ntfs_rl_truncate_nolock()
1564 rl->length = 0; ntfs_rl_truncate_nolock()
1580 } else if (likely(/* !rl->length && */ new_length > rl->vcn)) { ntfs_rl_truncate_nolock()
1588 (rl - 1)->length = new_length - (rl - 1)->vcn; ntfs_rl_truncate_nolock()
1608 rl->length = new_length - rl->vcn; ntfs_rl_truncate_nolock()
1611 rl->length = 0; ntfs_rl_truncate_nolock()
1615 } else /* if (unlikely(!rl->length && new_length == rl->vcn)) */ { ntfs_rl_truncate_nolock()
1628 * @length: size of the hole to be created in units of clusters
1631 * @length clusters.
1636 * If @start and/or @start + @length are outside the runlist return error code
1640 * + @length return error code -EINVAL.
1645 const VCN start, const s64 length) ntfs_rl_punch_nolock()
1647 const VCN end = start + length; ntfs_rl_punch_nolock()
1653 ntfs_debug("Entering for start 0x%llx, length 0x%llx.", ntfs_rl_punch_nolock()
1654 (long long)start, (long long)length); ntfs_rl_punch_nolock()
1657 BUG_ON(length < 0); ntfs_rl_punch_nolock()
1661 if (likely(!start && !length)) ntfs_rl_punch_nolock()
1666 while (likely(rl->length && start >= rl[1].vcn)) ntfs_rl_punch_nolock()
1670 while (likely(rl_end->length && end >= rl_end[1].vcn)) { ntfs_rl_punch_nolock()
1677 if (unlikely(rl_end->length && rl_end->lcn < LCN_HOLE)) ntfs_rl_punch_nolock()
1680 if (!rl_end->length && end > rl_end->vcn) ntfs_rl_punch_nolock()
1682 if (!length) ntfs_rl_punch_nolock()
1684 if (!rl->length) ntfs_rl_punch_nolock()
1688 while (likely(rl_real_end->length)) ntfs_rl_punch_nolock()
1703 rl->length = end - rl->vcn; ntfs_rl_punch_nolock()
1707 rl->length = rl_end->vcn - rl->vcn; ntfs_rl_punch_nolock()
1719 rl->length -= delta; ntfs_rl_punch_nolock()
1787 rl->length = length; ntfs_rl_punch_nolock()
1789 rl->vcn += length; ntfs_rl_punch_nolock()
1792 rl->lcn += length; ntfs_rl_punch_nolock()
1793 rl->length -= length; ntfs_rl_punch_nolock()
1807 rl->length = start - rl->vcn; ntfs_rl_punch_nolock()
1815 rl->length = rl[1].vcn - start; ntfs_rl_punch_nolock()
1834 if (rl[1].length && end >= rl[2].vcn) { ntfs_rl_punch_nolock()
1836 rl->length = start - rl->vcn; ntfs_rl_punch_nolock()
1853 rl->length = start - rl->vcn; ntfs_rl_punch_nolock()
1867 rl->length += delta; ntfs_rl_punch_nolock()
1890 rl->length = start - rl->vcn; ntfs_rl_punch_nolock()
1894 rl->length = length; ntfs_rl_punch_nolock()
1899 rl->length -= delta; ntfs_rl_punch_nolock()
1644 ntfs_rl_punch_nolock(const ntfs_volume *vol, runlist *const runlist, const VCN start, const s64 length) ntfs_rl_punch_nolock() argument
H A Drunlist.h35 * @length: length in clusters of the current array element
37 * The last vcn (in fact the last vcn + 1) is reached when length == 0.
45 s64 length; /* Run length in clusters. */ member in struct:__anon11240
98 const VCN start, const s64 length);
/linux-4.1.27/drivers/media/usb/dvb-usb/
H A Ddvb-usb-urb.c69 static void dvb_usb_data_complete(struct usb_data_stream *stream, u8 *buffer, size_t length) dvb_usb_data_complete() argument
73 dvb_dmx_swfilter(&adap->demux, buffer, length); dvb_usb_data_complete()
76 static void dvb_usb_data_complete_204(struct usb_data_stream *stream, u8 *buffer, size_t length) dvb_usb_data_complete_204() argument
80 dvb_dmx_swfilter_204(&adap->demux, buffer, length); dvb_usb_data_complete_204()
84 u8 *buffer, size_t length) dvb_usb_data_complete_raw()
88 dvb_dmx_swfilter_raw(&adap->demux, buffer, length); dvb_usb_data_complete_raw()
83 dvb_usb_data_complete_raw(struct usb_data_stream *stream, u8 *buffer, size_t length) dvb_usb_data_complete_raw() argument
/linux-4.1.27/drivers/input/mouse/
H A Dcyapa_gen5.c228 * The length of the major axis of the ellipse of contact between
234 * The length of the minor axis of the ellipse of contact between
240 * The length of the major axis of the approaching tool.
246 * The length of the minor axis of the approaching tool.
305 __le16 length; member in struct:gen5_bl_cmd_head
344 __le16 length; member in struct:gen5_app_cmd_head
448 int length; cyapa_empty_pip_output_data() local
484 length = get_unaligned_le16(gen5_pip->empty_buf); cyapa_empty_pip_output_data()
485 if (length == GEN5_RESP_LENGTH_SIZE) { cyapa_empty_pip_output_data()
488 } else if (length > CYAPA_REG_MAP_SIZE) { cyapa_empty_pip_output_data()
491 } else if (length == 0) { cyapa_empty_pip_output_data()
493 length = GEN5_RESP_LENGTH_SIZE; cyapa_empty_pip_output_data()
495 func(cyapa, gen5_pip->empty_buf, length)) { cyapa_empty_pip_output_data()
496 length = min(buf_len, length); cyapa_empty_pip_output_data()
497 memcpy(buf, gen5_pip->empty_buf, length); cyapa_empty_pip_output_data()
498 *len = length; cyapa_empty_pip_output_data()
505 error = cyapa_i2c_pip_read(cyapa, gen5_pip->empty_buf, length); cyapa_empty_pip_output_data()
511 length = get_unaligned_le16(gen5_pip->empty_buf); cyapa_empty_pip_output_data()
512 if (length <= GEN5_RESP_LENGTH_SIZE) { cyapa_empty_pip_output_data()
515 func(cyapa, gen5_pip->empty_buf, length)) { cyapa_empty_pip_output_data()
516 length = min(buf_len, length); cyapa_empty_pip_output_data()
517 memcpy(buf, gen5_pip->empty_buf, length); cyapa_empty_pip_output_data()
518 *len = length; cyapa_empty_pip_output_data()
567 int length; cyapa_do_i2c_pip_cmd_polling() local
577 length = resp_len ? *resp_len : 0; cyapa_do_i2c_pip_cmd_polling()
578 if (resp_data && resp_len && length != 0 && func) { cyapa_do_i2c_pip_cmd_polling()
582 *resp_len = length; cyapa_do_i2c_pip_cmd_polling()
631 /* Send command data, wait and read output response data's length. */ cyapa_i2c_pip_cmd_irq_sync()
765 int length; gen5_idle_state_parse() local
781 length = get_unaligned_le16(&resp_data[GEN5_RESP_LENGTH_OFFSET]); gen5_idle_state_parse()
782 if (length == GEN5_RESP_LENGTH_SIZE) { gen5_idle_state_parse()
791 length = GEN5_HID_DESCRIPTOR_SIZE; gen5_idle_state_parse()
794 resp_data, &length, gen5_idle_state_parse()
801 length = get_unaligned_le16( gen5_idle_state_parse()
804 if ((length == GEN5_HID_DESCRIPTOR_SIZE || gen5_idle_state_parse()
805 length == GEN5_RESP_LENGTH_SIZE) && gen5_idle_state_parse()
811 } else if ((length == GEN5_HID_DESCRIPTOR_SIZE || gen5_idle_state_parse()
812 length == GEN5_RESP_LENGTH_SIZE) && gen5_idle_state_parse()
829 int length; gen5_hid_description_header_parse() local
845 length = get_unaligned_le16(&resp_data[GEN5_RESP_LENGTH_OFFSET]); gen5_hid_description_header_parse()
847 if (length == GEN5_RESP_LENGTH_SIZE) { gen5_hid_description_header_parse()
864 } else if (length == GEN5_HID_DESCRIPTOR_SIZE && gen5_hid_description_header_parse()
870 } else if (length == GEN5_HID_DESCRIPTOR_SIZE && gen5_hid_description_header_parse()
887 int length; gen5_report_data_header_parse() local
889 length = get_unaligned_le16(&reg_data[GEN5_RESP_LENGTH_OFFSET]); gen5_report_data_header_parse()
892 if (length < GEN5_TOUCH_REPORT_HEAD_SIZE || gen5_report_data_header_parse()
893 length > GEN5_TOUCH_REPORT_MAX_SIZE) gen5_report_data_header_parse()
899 if (length < GEN5_BTN_REPORT_HEAD_SIZE || gen5_report_data_header_parse()
900 length > GEN5_BTN_REPORT_MAX_SIZE) gen5_report_data_header_parse()
904 if (length != GEN5_WAKEUP_EVENT_SIZE) gen5_report_data_header_parse()
919 int length; gen5_cmd_resp_header_parse() local
927 length = get_unaligned_le16(&reg_data[GEN5_RESP_LENGTH_OFFSET]); gen5_cmd_resp_header_parse()
928 ret = cyapa_i2c_pip_read(cyapa, gen5_pip->empty_buf, length); gen5_cmd_resp_header_parse()
929 if (ret != length) gen5_cmd_resp_header_parse()
932 if (length == GEN5_RESP_LENGTH_SIZE) { gen5_cmd_resp_header_parse()
950 (gen5_pip->empty_buf[length - 1] == gen5_cmd_resp_header_parse()
972 int length; cyapa_gen5_state_parse() local
980 length = get_unaligned_le16(&reg_data[GEN5_RESP_LENGTH_OFFSET]); cyapa_gen5_state_parse()
981 if (length == 0 || length == GEN5_RESP_LENGTH_SIZE) { cyapa_gen5_state_parse()
983 } else if (length == GEN5_HID_DESCRIPTOR_SIZE && cyapa_gen5_state_parse()
987 } else if ((length == GEN5_APP_REPORT_DESCRIPTOR_SIZE || cyapa_gen5_state_parse()
988 length == GEN5_APP_CONTRACT_REPORT_DESCRIPTOR_SIZE) && cyapa_gen5_state_parse()
993 } else if (length == GEN5_BL_REPORT_DESCRIPTOR_SIZE && cyapa_gen5_state_parse()
1055 put_unaligned_le16(cmd_len - 2, &bl_cmd_head->length); cyapa_gen5_bl_initiate()
1298 put_unaligned_le16(cmd_len - 2, &bl_cmd_head->length); cyapa_gen5_write_fw_block()
1422 &app_cmd_head->length); cyapa_gen5_set_interval_time()
1477 put_unaligned_le16(cmd_len - 2, &app_cmd_head->length); cyapa_gen5_get_interval_time()
1510 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); cyapa_gen5_disable_pip_report()
1734 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); cyapa_gen5_calibrate_pwcs()
1940 put_unaligned_le16(sizeof(cmd) - 2, &cmd_head->length); cyapa_gen5_read_idac_data()
2119 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); cyapa_gen5_execute_panel_scan()
2171 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); cyapa_gen5_read_panel_scan_raw_data()
2524 int length; cyapa_gen5_irq_cmd_handler() local
2538 length = get_unaligned_le16(gen5_pip->irq_cmd_buf); cyapa_gen5_irq_cmd_handler()
2539 length = (length <= GEN5_RESP_LENGTH_SIZE) ? cyapa_gen5_irq_cmd_handler()
2540 GEN5_RESP_LENGTH_SIZE : length; cyapa_gen5_irq_cmd_handler()
2541 if (length > GEN5_RESP_LENGTH_SIZE) cyapa_gen5_irq_cmd_handler()
2543 gen5_pip->irq_cmd_buf, length); cyapa_gen5_irq_cmd_handler()
2547 gen5_pip->irq_cmd_buf, length))) { cyapa_gen5_irq_cmd_handler()
2560 length = 0; cyapa_gen5_irq_cmd_handler()
2562 length = *gen5_pip->resp_len; cyapa_gen5_irq_cmd_handler()
2565 &length, cyapa_gen5_irq_cmd_handler()
2567 if (gen5_pip->resp_len && length != 0) { cyapa_gen5_irq_cmd_handler()
2568 *gen5_pip->resp_len = length; cyapa_gen5_irq_cmd_handler()
2576 *gen5_pip->resp_len = (*gen5_pip->resp_len < length) ? cyapa_gen5_irq_cmd_handler()
2577 *gen5_pip->resp_len : length; cyapa_gen5_irq_cmd_handler()
2686 dev_err(dev, "failed to read length bytes, (%d)\n", ret); cyapa_gen5_irq_handler()
2693 /* Invliad length or internal reset happened. */ cyapa_gen5_irq_handler()
2731 /* Invalid report data length for finger packet. */ cyapa_gen5_irq_handler()
2732 dev_err(dev, "invalid touch packet length=%d\n", report_len); cyapa_gen5_irq_handler()
2741 /* Invalid report data length of button packet. */ cyapa_gen5_irq_handler()
2742 dev_err(dev, "invalid button packet length=%d\n", report_len); cyapa_gen5_irq_handler()
/linux-4.1.27/crypto/
H A Dscatterwalk.c37 BUG_ON(!sg->length); scatterwalk_start()
64 if (walk->offset >= walk->sg->offset + walk->sg->length) scatterwalk_pagedone()
115 if (start < offset + sg->length) scatterwalk_map_and_copy()
118 offset += sg->length; scatterwalk_map_and_copy()
133 if (num_bytes < sg->length) scatterwalk_bytes_sglen()
137 offset += sg->length; scatterwalk_bytes_sglen()
/linux-4.1.27/fs/nfs/flexfilelayout/
H A Dflexfilelayoutdev.c185 u64 offset, u64 length) extend_ds_error()
189 end = max_t(u64, end_offset(err->offset, err->length), extend_ds_error()
190 end_offset(offset, length)); extend_ds_error()
192 err->length = end - err->offset; extend_ds_error()
196 u64 length, int status, enum nfs_opnum4 opnum, ds_error_can_merge()
203 end_offset(err->offset, err->length) >= offset && ds_error_can_merge()
204 err->offset <= end_offset(offset, length); ds_error_can_merge()
210 if (!ds_error_can_merge(old, new->offset, new->length, new->status, merge_ds_error()
214 extend_ds_error(old, new->offset, new->length); merge_ds_error()
236 u64 length, int status, enum nfs_opnum4 opnum, ff_layout_update_ds_error()
243 if (ds_error_can_merge(err, offset, length, status, opnum, ff_layout_update_ds_error()
246 extend_ds_error(err, offset, length); ff_layout_update_ds_error()
256 u64 length, int status, enum nfs_opnum4 opnum, ff_layout_track_ds_error()
269 if (ff_layout_update_ds_error(flo, offset, length, status, opnum, ff_layout_track_ds_error()
282 dserr->length = length; ff_layout_track_ds_error()
415 lseg->pls_range.length, NFS4ERR_NXIO, nfs4_ff_layout_prepare_ds()
499 if (!is_range_intersecting(err->offset, err->length, ff_layout_encode_ds_ioerr()
500 range->offset, range->length)) ff_layout_encode_ds_ioerr()
502 /* offset(8) + length(8) + stateid(NFS4_STATEID_SIZE) ff_layout_encode_ds_ioerr()
503 * + array length + deviceid(NFS4_DEVICEID4_SIZE) ff_layout_encode_ds_ioerr()
511 p = xdr_encode_hyper(p, err->length); ff_layout_encode_ds_ioerr()
522 dprintk("%s: offset %llu length %llu status %d op %d count %d\n", ff_layout_encode_ds_ioerr()
523 __func__, err->offset, err->length, err->status, ff_layout_encode_ds_ioerr()
184 extend_ds_error(struct nfs4_ff_layout_ds_err *err, u64 offset, u64 length) extend_ds_error() argument
195 ds_error_can_merge(struct nfs4_ff_layout_ds_err *err, u64 offset, u64 length, int status, enum nfs_opnum4 opnum, nfs4_stateid *stateid, struct nfs4_deviceid *deviceid) ds_error_can_merge() argument
235 ff_layout_update_ds_error(struct nfs4_flexfile_layout *flo, u64 offset, u64 length, int status, enum nfs_opnum4 opnum, nfs4_stateid *stateid, struct nfs4_deviceid *deviceid) ff_layout_update_ds_error() argument
254 ff_layout_track_ds_error(struct nfs4_flexfile_layout *flo, struct nfs4_ff_layout_mirror *mirror, u64 offset, u64 length, int status, enum nfs_opnum4 opnum, gfp_t gfp_flags) ff_layout_track_ds_error() argument
/linux-4.1.27/include/linux/mfd/syscon/
H A Datmel-smc.h80 * setup length = (128* SETUP[5] + SETUP[4:0])
82 * where setup length is the timing expressed in cycles.
110 * pulse length = (256* PULSE[6] + PULSE[5:0])
112 * where pulse length is the timing expressed in cycles.
140 * cycle length = (CYCLE[8:7]*256 + CYCLE[6:0])
142 * where cycle length is the timing expressed in cycles.
/linux-4.1.27/drivers/misc/mei/
H A Dbus.c227 static ssize_t ___mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length, ___mei_cl_send() argument
253 if (length > me_cl->props.max_msg_length) { ___mei_cl_send()
258 cb = mei_cl_alloc_cb(cl, length, MEI_FOP_WRITE, NULL); ___mei_cl_send()
264 memcpy(cb->buf.data, buf, length); ___mei_cl_send()
277 ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length) __mei_cl_recv() argument
295 rets = mei_cl_read_start(cl, length, NULL); __mei_cl_recv()
332 r_length = min_t(size_t, length, cb->buf_idx); __mei_cl_recv()
344 inline ssize_t __mei_cl_async_send(struct mei_cl *cl, u8 *buf, size_t length) __mei_cl_async_send() argument
346 return ___mei_cl_send(cl, buf, length, 0); __mei_cl_async_send()
349 inline ssize_t __mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length) __mei_cl_send() argument
351 return ___mei_cl_send(cl, buf, length, 1); __mei_cl_send()
354 ssize_t mei_cl_send(struct mei_cl_device *device, u8 *buf, size_t length) mei_cl_send() argument
362 return device->ops->send(device, buf, length); mei_cl_send()
364 return __mei_cl_send(cl, buf, length); mei_cl_send()
368 ssize_t mei_cl_recv(struct mei_cl_device *device, u8 *buf, size_t length) mei_cl_recv() argument
376 return device->ops->recv(device, buf, length); mei_cl_recv()
378 return __mei_cl_recv(cl, buf, length); mei_cl_recv()
/linux-4.1.27/drivers/staging/ozwpan/
H A Dozusbsvc1.c38 ei->length = elt->length + sizeof(struct oz_elt); oz_usb_submit_elt()
77 elt->length = sizeof(struct oz_get_desc_req); oz_usb_get_desc_req()
105 elt->length = sizeof(struct oz_set_config_req); oz_usb_set_config_req()
128 elt->length = sizeof(struct oz_set_interface_req); oz_usb_set_interface_req()
153 elt->length = sizeof(struct oz_feature_req); oz_usb_set_clear_feature_req()
179 elt->length = sizeof(struct oz_vendor_class_req) - 1 + data_len; oz_usb_vendor_class_req()
261 oz_send_isoc_unit(pd, ep_num, data, desc->length); oz_usb_send_isoc()
285 unit_size = urb->iso_frame_desc[i].length; oz_usb_send_isoc()
291 if ((unit_size == desc->length) && oz_usb_send_isoc()
292 (desc->length <= rem)) { oz_usb_send_isoc()
299 desc->actual_length = desc->length; oz_usb_send_isoc()
305 elt->length = hdr_size + MAX_ISOC_FIXED_DATA - rem; oz_usb_send_isoc()
400 if (elt->length < sizeof(struct oz_get_desc_rsp) - 1) oz_usb_rx()
402 data_len = elt->length - oz_usb_rx()
431 body->rcode, body->data, elt->length- oz_usb_rx()
436 oz_usb_handle_ep_data(usb_ctx, usb_hdr, elt->length); oz_usb_rx()
/linux-4.1.27/arch/powerpc/perf/
H A Dhv-gpci.c27 * perf stat -e 'hv_gpci/counter_info_version=3,offset=0,length=8,
51 EVENT_DEFINE_RANGE_FORMAT(length, config1, 24, 31);
134 u16 secondary_index, u8 version_in, u32 offset, u8 length, single_gpci_request()
161 * we verify offset and length are within the zeroed buffer at event single_gpci_request()
165 for (i = offset; i < offset + length; i++) single_gpci_request()
216 u8 length; h_gpci_event_init() local
241 length = event_get_length(event); h_gpci_event_init()
242 if (length < 1 || length > 8) { h_gpci_event_init()
243 pr_devel("length invalid\n"); h_gpci_event_init()
248 if ((event_get_offset(event) + length) > GPCI_MAX_DATA_BYTES) { h_gpci_event_init()
250 (size_t)event_get_offset(event) + length, h_gpci_event_init()
261 length, h_gpci_event_init()
133 single_gpci_request(u32 req, u32 starting_index, u16 secondary_index, u8 version_in, u32 offset, u8 length, u64 *value) single_gpci_request() argument
H A Dhv-24x7-catalog.h11 __be32 length; /* In 4096 byte pages */ member in struct:hv_24x7_catalog_page_0
34 __be16 length; /* in bytes, must be a multiple of 16 */ member in struct:hv_24x7_event_data
/linux-4.1.27/net/wireless/
H A Dwext-priv.c27 if (wrqu->data.length < dev->wireless_handlers->num_private_args) { iw_handler_get_private()
31 wrqu->data.length = dev->wireless_handlers->num_private_args; iw_handler_get_private()
36 wrqu->data.length = dev->wireless_handlers->num_private_args; iw_handler_get_private()
40 sizeof(struct iw_priv_args) * wrqu->data.length); iw_handler_get_private()
67 int num = iwp->length; adjust_priv_size()
147 if (!iwp->pointer && iwp->length != 0) ioctl_private_iw_point()
150 if (iwp->length > (descr->set_args & IW_PRIV_SIZE_MASK)) ioctl_private_iw_point()
160 if (IW_IS_SET(cmd) && (iwp->length != 0)) { ioctl_private_iw_point()
172 /* Adjust for the actual length if it's variable, ioctl_private_iw_point()
232 iwp.length = iwp_compat->length; compat_private_call()
239 iwp_compat->length = iwp.length; compat_private_call()
/linux-4.1.27/drivers/net/wireless/prism54/
H A Dislpci_mgt.c47 display_buffer(char *buffer, int length) display_buffer() argument
52 while (length > 0) { display_buffer()
54 length--; display_buffer()
70 pimfor_encode_header(int operation, u32 oid, u32 length, pimfor_header_t *h) pimfor_encode_header() argument
77 h->length = cpu_to_be32(length); pimfor_encode_header()
91 le32_to_cpus(&h->length); pimfor_decode_header()
94 be32_to_cpus(&h->length); pimfor_decode_header()
157 * with arguments data/length.
164 void *data, int length) islpci_mgt_transmit()
176 int frag_len = length + PIMFOR_HEADER_SIZE; islpci_mgt_transmit()
196 pimfor_encode_header(operation, oid, length, (pimfor_header_t *) p); islpci_mgt_transmit()
200 memcpy(p, data, length); islpci_mgt_transmit()
202 memset(p, 0, length); islpci_mgt_transmit()
208 "PIMFOR: op %i, oid 0x%08lx, device %i, flags 0x%x length 0x%x\n", islpci_mgt_transmit()
209 h->operation, oid, h->device_id, h->flags, length); islpci_mgt_transmit()
213 display_buffer(p, length); islpci_mgt_transmit()
335 "PIMFOR: op %i, oid 0x%08x, device %i, flags 0x%x length 0x%x\n", islpci_mgt_receive()
337 header->flags, header->length); islpci_mgt_receive()
342 header->length); islpci_mgt_receive()
354 size = PIMFOR_HEADER_SIZE + header->length; islpci_mgt_receive()
374 "TRAP: oid 0x%x, device %i, flags 0x%x length %i\n", islpci_mgt_receive()
376 header->length); islpci_mgt_receive()
163 islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid, void *data, int length) islpci_mgt_transmit() argument
/linux-4.1.27/drivers/acpi/
H A Dutils.c76 if (!format || !format->pointer || (format->length < 1)) { acpi_extract_package()
86 format_count = (format->length / sizeof(char)) - 1; acpi_extract_package()
133 (element->string.length * sizeof(char)) + acpi_extract_package()
139 sizeof(u8 *) + element->buffer.length; acpi_extract_package()
181 if (buffer->length == ACPI_ALLOCATE_BUFFER) { acpi_extract_package()
185 buffer->length = size_required; acpi_extract_package()
187 if (buffer->length < size_required) { acpi_extract_package()
188 buffer->length = size_required; acpi_extract_package()
190 } else if (buffer->length != size_required || acpi_extract_package()
244 element->string.length); acpi_extract_package()
246 tail += element->string.length * sizeof(char); acpi_extract_package()
255 element->buffer.length); acpi_extract_package()
257 tail += element->buffer.length; acpi_extract_package()
301 buffer.length = sizeof(union acpi_object); acpi_evaluate_integer()
348 if ((buffer.length == 0) || !package) { acpi_evaluate_reference()
423 || output->package.elements[0].buffer.length < ACPI_PLD_REV1_BUFFER_SIZE) { acpi_get_physical_device_location()
430 output->package.elements[0].buffer.length, acpi_get_physical_device_location()
465 params[2].buffer.length = status_buf->length; acpi_evaluate_ost()
468 params[2].buffer.length = 0; acpi_evaluate_ost()
483 .length = ACPI_ALLOCATE_BUFFER, acpi_handle_path()
647 params[0].buffer.length = 16; acpi_evaluate_dsm()
701 for (i = 0; i < obj->buffer.length && i < 8; i++) acpi_check_dsm()
/linux-4.1.27/drivers/gpu/ipu-v3/
H A Dipu-cpmem.c297 ro = rgb->bits_per_pixel - rgb->red.length - rgb->red.offset; ipu_cpmem_set_format_rgb()
298 go = rgb->bits_per_pixel - rgb->green.length - rgb->green.offset; ipu_cpmem_set_format_rgb()
299 bo = rgb->bits_per_pixel - rgb->blue.length - rgb->blue.offset; ipu_cpmem_set_format_rgb()
300 to = rgb->bits_per_pixel - rgb->transp.length - rgb->transp.offset; ipu_cpmem_set_format_rgb()
302 ipu_ch_param_write_field(ch, IPU_FIELD_WID0, rgb->red.length - 1); ipu_cpmem_set_format_rgb()
304 ipu_ch_param_write_field(ch, IPU_FIELD_WID1, rgb->green.length - 1); ipu_cpmem_set_format_rgb()
306 ipu_ch_param_write_field(ch, IPU_FIELD_WID2, rgb->blue.length - 1); ipu_cpmem_set_format_rgb()
309 if (rgb->transp.length) { ipu_cpmem_set_format_rgb()
311 rgb->transp.length - 1); ipu_cpmem_set_format_rgb()
456 .red = { .offset = 16, .length = 8, },
457 .green = { .offset = 8, .length = 8, },
458 .blue = { .offset = 0, .length = 8, },
459 .transp = { .offset = 24, .length = 8, },
464 .red = { .offset = 0, .length = 8, },
465 .green = { .offset = 8, .length = 8, },
466 .blue = { .offset = 16, .length = 8, },
467 .transp = { .offset = 24, .length = 8, },
472 .red = { .offset = 16, .length = 8, },
473 .green = { .offset = 8, .length = 8, },
474 .blue = { .offset = 0, .length = 8, },
475 .transp = { .offset = 0, .length = 0, },
480 .red = { .offset = 0, .length = 8, },
481 .green = { .offset = 8, .length = 8, },
482 .blue = { .offset = 16, .length = 8, },
483 .transp = { .offset = 0, .length = 0, },
488 .red = { .offset = 11, .length = 5, },
489 .green = { .offset = 5, .length = 6, },
490 .blue = { .offset = 0, .length = 5, },
491 .transp = { .offset = 0, .length = 0, },
496 .red = { .offset = 0, .length = 5, },
497 .green = { .offset = 5, .length = 6, },
498 .blue = { .offset = 11, .length = 5, },
499 .transp = { .offset = 0, .length = 0, },
/linux-4.1.27/drivers/net/wireless/ti/wl1251/
H A Drx.c153 u16 length, *fc; wl1251_rx_body() local
156 length = WL1251_RX_ALIGN(desc->length - PLCP_HEADER_LENGTH); wl1251_rx_body()
173 skb = __dev_alloc_skb(length, GFP_KERNEL); wl1251_rx_body()
179 rx_buffer = skb_put(skb, length); wl1251_rx_body()
180 wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length); wl1251_rx_body()
182 /* The actual length doesn't include the target's alignment */ wl1251_rx_body()
183 skb_trim(skb, desc->length - PLCP_HEADER_LENGTH); wl1251_rx_body()
/linux-4.1.27/drivers/of/
H A Dpdt.c111 p->length = special_len; of_pdt_build_one_prop()
120 p->length = of_pdt_prom_ops->getproplen(node, p->name); of_pdt_build_one_prop()
121 if (p->length <= 0) { of_pdt_build_one_prop()
122 p->length = 0; of_pdt_build_one_prop()
126 p->value = prom_early_alloc(p->length + 1); of_pdt_build_one_prop()
128 p->value, p->length); of_pdt_build_one_prop()
130 p->length = 0; of_pdt_build_one_prop()
131 ((unsigned char *)p->value)[p->length] = '\0'; of_pdt_build_one_prop()
/linux-4.1.27/drivers/parisc/
H A Diommu-helpers.h35 sg_virt(startsg), startsg->length iommu_fill_pdir()
70 sg_dma_len(dma_sg) += startsg->length; iommu_fill_pdir()
71 size = startsg->length + dma_offset; iommu_fill_pdir()
74 ioc->msg_pages += startsg->length >> IOVP_SHIFT; iommu_fill_pdir()
119 dma_len = startsg->length; iommu_coalesce_chunks()
134 startsg->length; iommu_coalesce_chunks()
148 if (unlikely(ALIGN(dma_len + dma_offset + startsg->length, IOVP_SIZE) > iommu_coalesce_chunks()
162 dma_len += startsg->length; iommu_coalesce_chunks()
/linux-4.1.27/block/partitions/
H A Datari.h21 __be32 siz; /* length of partition */
32 u32 bsl_cnt; /* length of bad sector list */
/linux-4.1.27/drivers/usb/gadget/function/
H A Dstorage_common.h38 /* const u8 * */ buf, /* unsigned */ length) \
40 if (length < 512) { \
41 DBG(fsg, "%s, length %u:\n", label, length); \
43 16, 1, buf, length, 0); \
52 /* const u8 * */ buf, /* unsigned */ length) do { } while (0)
122 /* Default size of buffer length. */
142 * So we will record the intended request length here.
/linux-4.1.27/fs/ncpfs/
H A Dsymlink.c45 int error, length, len; ncp_symlink_readpage() local
58 0,NCP_MAX_SYMLINK_SIZE,rawlink,&length); ncp_symlink_readpage()
67 if (length<NCP_MIN_SYMLINK_SIZE || ncp_symlink_readpage()
72 length -= 8; ncp_symlink_readpage()
78 error = ncp_vol2io(NCP_SERVER(inode), buf, &len, link, length, 0); ncp_symlink_readpage()
109 int length, err, i, outlen; ncp_symlink() local
144 length = strlen(symname); ncp_symlink()
148 err = ncp_io2vol(NCP_SERVER(dir), rawlink + hdr, &outlen, symname, length, 0); ncp_symlink()
/linux-4.1.27/include/uapi/linux/cifs/
H A Dcifs_mount.h23 #define CIFS_MAX_SHARE_LEN 256 /* reasonable max share name length */
24 #define CIFS_NI_MAXHOST 1024 /* max host name length (256 * 4 bytes) */
/linux-4.1.27/arch/s390/appldata/
H A Dappldata.h13 #define APPLDATA_PROC_NAME_LENGTH 16 /* Max. length of /proc name */
46 u16 length, char *mod_lvl);

Completed in 9778 milliseconds

1234567891011>>