/linux-4.1.27/arch/arm/include/asm/ |
H A D | ide.h | 16 #define __ide_mm_insw(port,addr,len) readsw(port,addr,len) 17 #define __ide_mm_insl(port,addr,len) readsl(port,addr,len) 18 #define __ide_mm_outsw(port,addr,len) writesw(port,addr,len) 19 #define __ide_mm_outsl(port,addr,len) writesl(port,addr,len)
|
H A D | checksum.h | 15 * computes the checksum of a memory block at buff, length len, 26 __wsum csum_partial(const void *buff, int len, __wsum sum); 37 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum); 40 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr); 87 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 90 u32 lenprot = len | proto << 16; csum_tcpudp_nofold() 124 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 127 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 136 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 138 return csum_fold(csum_partial(buff, len, 0)); ip_compute_csum() 143 __csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __be32 len, 147 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, csum_ipv6_magic() argument 150 return csum_fold(__csum_ipv6_magic(saddr, daddr, htonl(len), csum_ipv6_magic()
|
/linux-4.1.27/tools/perf/util/ |
H A D | strbuf.c | 22 sb->alloc = sb->len = 0; strbuf_init() 40 *sz = sb->len; strbuf_detach() 47 if (sb->len + extra + 1 <= sb->len) strbuf_grow() 51 ALLOC_GROW(sb->buf, sb->len + extra + 1, sb->alloc); strbuf_grow() 54 static void strbuf_splice(struct strbuf *sb, size_t pos, size_t len, strbuf_splice() argument 57 if (pos + len < pos) strbuf_splice() 59 if (pos > sb->len) strbuf_splice() 61 if (pos + len > sb->len) strbuf_splice() 62 die("`pos + len' is too far after the end of the buffer"); strbuf_splice() 64 if (dlen >= len) strbuf_splice() 65 strbuf_grow(sb, dlen - len); strbuf_splice() 67 sb->buf + pos + len, strbuf_splice() 68 sb->len - pos - len); strbuf_splice() 70 strbuf_setlen(sb, sb->len + dlen - len); strbuf_splice() 73 void strbuf_remove(struct strbuf *sb, size_t pos, size_t len) strbuf_remove() argument 75 strbuf_splice(sb, pos, len, NULL, 0); strbuf_remove() 78 void strbuf_add(struct strbuf *sb, const void *data, size_t len) strbuf_add() argument 80 strbuf_grow(sb, len); strbuf_add() 81 memcpy(sb->buf + sb->len, data, len); strbuf_add() 82 strbuf_setlen(sb, sb->len + len); strbuf_add() 87 int len; strbuf_addf() local 93 len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); strbuf_addf() 95 if (len < 0) strbuf_addf() 97 if (len > strbuf_avail(sb)) { strbuf_addf() 98 strbuf_grow(sb, len); strbuf_addf() 100 len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); strbuf_addf() 102 if (len > strbuf_avail(sb)) { strbuf_addf() 106 strbuf_setlen(sb, sb->len + len); strbuf_addf() 111 size_t oldlen = sb->len; strbuf_read() 118 cnt = read(fd, sb->buf + sb->len, sb->alloc - sb->len - 1); strbuf_read() 128 sb->len += cnt; strbuf_read() 132 sb->buf[sb->len] = '\0'; strbuf_read() 133 return sb->len - oldlen; strbuf_read()
|
H A D | path.c | 34 size_t len = (ret >= size) ? size - 1 : ret; strlcpy() local 36 memcpy(dest, src, len); strlcpy() 37 dest[len] = '\0'; strlcpy() 65 size_t len; perf_vsnpath() local 67 len = strlen(perf_dir); perf_vsnpath() 68 if (n < len + 1) perf_vsnpath() 70 memcpy(buf, perf_dir, len); perf_vsnpath() 71 if (len && !is_dir_sep(perf_dir[len-1])) perf_vsnpath() 72 buf[len++] = '/'; perf_vsnpath() 73 len += vsnprintf(buf + len, n - len, fmt, args); perf_vsnpath() 74 if (len >= n) perf_vsnpath() 95 unsigned len; mkpath() local 99 len = vsnprintf(pathname, PATH_MAX, fmt, args); mkpath() 101 if (len >= PATH_MAX) mkpath() 111 unsigned len; perf_path() local 113 len = strlen(perf_dir); perf_path() 114 if (len > PATH_MAX-100) perf_path() 116 memcpy(pathname, perf_dir, len); perf_path() 117 if (len && perf_dir[len-1] != '/') perf_path() 118 pathname[len++] = '/'; perf_path() 120 len += vsnprintf(pathname + len, PATH_MAX - len, fmt, args); perf_path() 122 if (len >= PATH_MAX) perf_path() 128 static inline int chomp_trailing_dir_sep(const char *path, int len) chomp_trailing_dir_sep() argument 130 while (len && is_dir_sep(path[len - 1])) chomp_trailing_dir_sep() 131 len--; chomp_trailing_dir_sep() 132 return len; chomp_trailing_dir_sep()
|
/linux-4.1.27/arch/alpha/lib/ |
H A D | srm_puts.c | 9 srm_puts(const char *str, long len) srm_puts() argument 14 return len; srm_puts() 16 for (remaining = len; remaining > 0; remaining -= written) srm_puts() 22 return len; srm_puts()
|
H A D | srm_printk.c | 13 long len, num_lf; srm_printk() local 17 len = vsprintf(buf, fmt, args); srm_printk() 39 srm_puts(buf, num_lf+len); srm_printk() 40 return len; srm_printk()
|
H A D | csum_partial_copy.c | 103 long len, unsigned long checksum, csum_partial_cfu_aligned() 109 while (len >= 0) { csum_partial_cfu_aligned() 115 len -= 8; csum_partial_cfu_aligned() 120 len += 8; csum_partial_cfu_aligned() 122 if (len) { csum_partial_cfu_aligned() 126 mskql(word, len, word); csum_partial_cfu_aligned() 128 mskqh(tmp, len, tmp); csum_partial_cfu_aligned() 145 long len, unsigned long checksum, csum_partial_cfu_dest_aligned() 150 unsigned long lastsrc = 7+len+(unsigned long)src; csum_partial_cfu_dest_aligned() 155 while (len >= 0) { csum_partial_cfu_dest_aligned() 160 len -= 8; csum_partial_cfu_dest_aligned() 171 len += 8; csum_partial_cfu_dest_aligned() 173 if (len) { csum_partial_cfu_dest_aligned() 181 mskql(word, len, word); csum_partial_cfu_dest_aligned() 183 mskqh(tmp, len, tmp); csum_partial_cfu_dest_aligned() 199 long len, unsigned long checksum, csum_partial_cfu_src_aligned() 209 while (len >= 0) { csum_partial_cfu_src_aligned() 211 len -= 8; csum_partial_cfu_src_aligned() 221 len += 8; csum_partial_cfu_src_aligned() 222 if (len) { csum_partial_cfu_src_aligned() 225 mskql(word, len, word); csum_partial_cfu_src_aligned() 226 len -= 8; csum_partial_cfu_src_aligned() 229 len += doff; csum_partial_cfu_src_aligned() 232 if (len >= 0) { csum_partial_cfu_src_aligned() 234 if (!len) goto out; csum_partial_cfu_src_aligned() 238 doff = len; csum_partial_cfu_src_aligned() 257 long len, unsigned long checksum, csum_partial_cfu_unaligned() 267 lastsrc = 7+len+(unsigned long)src; csum_partial_cfu_unaligned() 269 while (len >= 0) { csum_partial_cfu_unaligned() 276 len -= 8; csum_partial_cfu_unaligned() 288 len += doff; csum_partial_cfu_unaligned() 290 if (len >= 0) { csum_partial_cfu_unaligned() 299 mskql(word, len-doff, word); csum_partial_cfu_unaligned() 304 if (len) { csum_partial_cfu_unaligned() 307 mskqh(second_dest, len, second_dest); csum_partial_cfu_unaligned() 320 mskql(word, len-doff, word); csum_partial_cfu_unaligned() 322 mskqh(second_dest, len, second_dest); csum_partial_cfu_unaligned() 333 csum_partial_copy_from_user(const void __user *src, void *dst, int len, csum_partial_copy_from_user() argument 340 if (len) { csum_partial_copy_from_user() 341 if (!access_ok(VERIFY_READ, src, len)) { csum_partial_copy_from_user() 343 memset(dst, 0, len); csum_partial_copy_from_user() 351 len-8, checksum, errp); csum_partial_copy_from_user() 356 soff, len-8, checksum, errp); csum_partial_copy_from_user() 364 doff, len-8, checksum, csum_partial_copy_from_user() 370 soff, doff, len-8, checksum, csum_partial_copy_from_user() 379 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 385 dst, len, sum, NULL); csum_partial_copy_nocheck() 102 csum_partial_cfu_aligned(const unsigned long __user *src, unsigned long *dst, long len, unsigned long checksum, int *errp) csum_partial_cfu_aligned() argument 142 csum_partial_cfu_dest_aligned(const unsigned long __user *src, unsigned long *dst, unsigned long soff, long len, unsigned long checksum, int *errp) csum_partial_cfu_dest_aligned() argument 196 csum_partial_cfu_src_aligned(const unsigned long __user *src, unsigned long *dst, unsigned long doff, long len, unsigned long checksum, unsigned long partial_dest, int *errp) csum_partial_cfu_src_aligned() argument 254 csum_partial_cfu_unaligned(const unsigned long __user * src, unsigned long * dst, unsigned long soff, unsigned long doff, long len, unsigned long checksum, unsigned long partial_dest, int *errp) csum_partial_cfu_unaligned() argument
|
/linux-4.1.27/tools/lib/symbol/ |
H A D | kallsyms.c | 21 int line_len, len; kallsyms__parse() local 31 len = hex2u64(line, &start); kallsyms__parse() 33 len++; kallsyms__parse() 34 if (len + 2 >= line_len) kallsyms__parse() 37 symbol_type = line[len]; kallsyms__parse() 38 len += 2; kallsyms__parse() 39 symbol_name = line + len; kallsyms__parse() 40 len = line_len - len; kallsyms__parse() 42 if (len >= KSYM_NAME_LEN) { kallsyms__parse()
|
/linux-4.1.27/fs/isofs/ |
H A D | joliet.c | 17 uni16_to_x8(unsigned char *ascii, __be16 *uni, int len, struct nls_table *nls) uni16_to_x8() argument 25 while ((ch = get_unaligned(ip)) && len) { uni16_to_x8() 34 len--; uni16_to_x8() 45 unsigned char len = 0; get_joliet_filename() local 51 len = utf16s_to_utf8s((const wchar_t *) de->name, get_joliet_filename() 55 len = uni16_to_x8(outname, (__be16 *) de->name, get_joliet_filename() 58 if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) get_joliet_filename() 59 len -= 2; get_joliet_filename() 65 while (len >= 2 && (outname[len-1] == '.')) get_joliet_filename() 66 len--; get_joliet_filename() 68 return len; get_joliet_filename()
|
H A D | rock.c | 29 int len; member in struct:rock_state 55 rs->len = sizeof(struct iso_directory_record) + de->name_len[0]; setup_rock_ridge() 56 if (rs->len & 1) setup_rock_ridge() 57 (rs->len)++; setup_rock_ridge() 58 rs->chr = (unsigned char *)de + rs->len; setup_rock_ridge() 59 rs->len = *((unsigned char *)de) - rs->len; setup_rock_ridge() 60 if (rs->len < 0) setup_rock_ridge() 61 rs->len = 0; setup_rock_ridge() 64 rs->len -= ISOFS_SB(inode->i_sb)->s_rock_offset; setup_rock_ridge() 66 if (rs->len < 0) setup_rock_ridge() 67 rs->len = 0; setup_rock_ridge() 120 rs->len = rs->cont_size; rock_continue() 140 int len; rock_check_overflow() local 144 len = sizeof(struct SU_SP_s); rock_check_overflow() 147 len = sizeof(struct SU_CE_s); rock_check_overflow() 150 len = sizeof(struct SU_ER_s); rock_check_overflow() 153 len = sizeof(struct RR_RR_s); rock_check_overflow() 156 len = sizeof(struct RR_PX_s); rock_check_overflow() 159 len = sizeof(struct RR_PN_s); rock_check_overflow() 162 len = sizeof(struct RR_SL_s); rock_check_overflow() 165 len = sizeof(struct RR_NM_s); rock_check_overflow() 168 len = sizeof(struct RR_CL_s); rock_check_overflow() 171 len = sizeof(struct RR_PL_s); rock_check_overflow() 174 len = sizeof(struct RR_TF_s); rock_check_overflow() 177 len = sizeof(struct RR_ZF_s); rock_check_overflow() 180 len = 0; rock_check_overflow() 183 len += offsetof(struct rock_ridge, u); rock_check_overflow() 184 if (len > rs->len) { rock_check_overflow() 188 sig, len, rs->len); rock_check_overflow() 207 int len; get_rock_ridge_filename() local 217 while (rs.len > 2) { /* There may be one byte for padding somewhere */ get_rock_ridge_filename() 220 * Ignore rock ridge info if rr->len is out of range, but get_rock_ridge_filename() 224 if (rr->len < 3) get_rock_ridge_filename() 229 rs.chr += rr->len; get_rock_ridge_filename() 230 rs.len -= rr->len; get_rock_ridge_filename() 232 * As above, just ignore the rock ridge info if rr->len get_rock_ridge_filename() 235 if (rs.len < 0) get_rock_ridge_filename() 255 if (rr->len < 5) get_rock_ridge_filename() 272 len = rr->len - 5; get_rock_ridge_filename() 273 if (retnamlen + len >= 254) { get_rock_ridge_filename() 277 p = memchr(rr->u.NM.name, '\0', len); get_rock_ridge_filename() 279 len = p - rr->u.NM.name; get_rock_ridge_filename() 280 memcpy(retname + retnamlen, rr->u.NM.name, len); get_rock_ridge_filename() 281 retnamlen += len; get_rock_ridge_filename() 327 rs.len -= 14; parse_rock_ridge_inode_internal() 328 if (rs.len < 0) parse_rock_ridge_inode_internal() 329 rs.len = 0; parse_rock_ridge_inode_internal() 333 while (rs.len > 2) { /* There may be one byte for padding somewhere */ parse_rock_ridge_inode_internal() 336 * Ignore rock ridge info if rr->len is out of range, but parse_rock_ridge_inode_internal() 340 if (rr->len < 3) parse_rock_ridge_inode_internal() 345 rs.chr += rr->len; parse_rock_ridge_inode_internal() 346 rs.len -= rr->len; parse_rock_ridge_inode_internal() 348 * As above, just ignore the rock ridge info if rr->len parse_rock_ridge_inode_internal() 351 if (rs.len < 0) parse_rock_ridge_inode_internal() 373 if (rr->u.ER.len_id + offsetof(struct rock_ridge, u.ER.data) > rr->len) parse_rock_ridge_inode_internal() 452 slen = rr->len - 5; parse_rock_ridge_inode_internal() 460 slp->len; parse_rock_ridge_inode_internal() 476 slen -= slp->len + 2; parse_rock_ridge_inode_internal() 479 (((char *)slp) + slp->len + 2); parse_rock_ridge_inode_internal() 608 slen = rr->len - 5; get_symlink_chunk() 614 if (slp->len > plimit - rpnt) get_symlink_chunk() 616 memcpy(rpnt, slp->text, slp->len); get_symlink_chunk() 617 rpnt += slp->len; get_symlink_chunk() 640 slen -= slp->len + 2; get_symlink_chunk() 642 slp = (struct SL_component *)((char *)slp + slp->len + 2); get_symlink_chunk() 737 while (rs.len > 2) { /* There may be one byte for padding somewhere */ rock_ridge_symlink_readpage() 739 if (rr->len < 3) rock_ridge_symlink_readpage() 744 rs.chr += rr->len; rock_ridge_symlink_readpage() 745 rs.len -= rr->len; rock_ridge_symlink_readpage() 746 if (rs.len < 0) rock_ridge_symlink_readpage()
|
/linux-4.1.27/drivers/staging/rtl8188eu/core/ |
H A D | rtw_debug.c | 29 int len = 0; proc_get_drv_version() local 31 len += snprintf(page + len, count - len, "%s\n", DRIVERVERSION); proc_get_drv_version() 34 return len; proc_get_drv_version() 51 u32 addr, val, len; proc_set_write_reg() local 59 int num = sscanf(tmp, "%x %x %x", &addr, &val, &len); proc_set_write_reg() 65 switch (len) { proc_set_write_reg() 76 DBG_88E("error write length =%d", len); proc_set_write_reg() 93 int len = 0; proc_get_read_reg() local 97 return len; proc_get_read_reg() 102 len += snprintf(page + len, count - len, "usb_read8(0x%x)=0x%x\n", proc_get_read_addr, usb_read8(padapter, proc_get_read_addr)); proc_get_read_reg() 105 len += snprintf(page + len, count - len, "usb_read16(0x%x)=0x%x\n", proc_get_read_addr, usb_read16(padapter, proc_get_read_addr)); proc_get_read_reg() 108 len += snprintf(page + len, count - len, "usb_read32(0x%x)=0x%x\n", proc_get_read_addr, usb_read32(padapter, proc_get_read_addr)); proc_get_read_reg() 111 len += snprintf(page + len, count - len, "error read length=%d\n", proc_get_read_len); proc_get_read_reg() 116 return len; proc_get_read_reg() 123 u32 addr, len; proc_set_read_reg() local 131 int num = sscanf(tmp, "%x %x", &addr, &len); proc_set_read_reg() 140 proc_get_read_len = len; proc_set_read_reg() 154 int len = 0; proc_get_fwstate() local 156 len += snprintf(page + len, count - len, "fwstate=0x%x\n", get_fwstate(pmlmepriv)); proc_get_fwstate() 159 return len; proc_get_fwstate() 170 int len = 0; proc_get_sec_info() local 172 len += snprintf(page + len, count - len, "auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n", proc_get_sec_info() 177 return len; proc_get_sec_info() 189 int len = 0; proc_get_mlmext_state() local 191 len += snprintf(page + len, count - len, "pmlmeinfo->state=0x%x\n", pmlmeinfo->state); proc_get_mlmext_state() 194 return len; proc_get_mlmext_state() 205 int len = 0; proc_get_qos_option() local 207 len += snprintf(page + len, count - len, "qos_option=%d\n", pmlmepriv->qospriv.qos_option); proc_get_qos_option() 210 return len; proc_get_qos_option() 221 int len = 0; proc_get_ht_option() local 222 len += snprintf(page + len, count - len, "ht_option=%d\n", pmlmepriv->htpriv.ht_option); proc_get_ht_option() 224 return len; proc_get_ht_option() 234 int len = 0; proc_get_rf_info() local 236 len += snprintf(page + len, count - len, "cur_ch=%d, cur_bw=%d, cur_ch_offset=%d\n", proc_get_rf_info() 239 return len; proc_get_rf_info() 253 int len = 0; proc_get_ap_info() local 260 len += snprintf(page + len, count - len, "SSID=%s\n", cur_network->network.Ssid.Ssid); proc_get_ap_info() 261 len += snprintf(page + len, count - len, "sta's macaddr:%pM\n", psta->hwaddr); proc_get_ap_info() 262 len += snprintf(page + len, count - len, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset); proc_get_ap_info() 263 len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self); proc_get_ap_info() 264 len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid); proc_get_ap_info() 265 len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate); proc_get_ap_info() 266 len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi); proc_get_ap_info() 267 len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable); proc_get_ap_info() 268 len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap); proc_get_ap_info() 273 len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", i, preorder_ctrl->indicate_seq); proc_get_ap_info() 276 len += snprintf(page + len, count - len, "can't get sta's macaddr, cur_network's macaddr: %pM\n", cur_network->network.MacAddress); proc_get_ap_info() 280 return len; proc_get_ap_info() 289 int len = 0; proc_get_adapter_state() local 291 len += snprintf(page + len, count - len, "bSurpriseRemoved=%d, bDriverStopped=%d\n", proc_get_adapter_state() 295 return len; proc_get_adapter_state() 306 int len = 0; proc_get_trx_info() local 308 len += snprintf(page + len, count - len, "free_xmitbuf_cnt=%d, free_xmitframe_cnt=%d, free_ext_xmitbuf_cnt=%d, free_recvframe_cnt=%d\n", proc_get_trx_info() 310 len += snprintf(page + len, count - len, "rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt); proc_get_trx_info() 313 return len; proc_get_trx_info() 322 int len = 0; proc_get_mac_reg_dump1() local 325 len += snprintf(page + len, count - len, "\n======= MAC REG =======\n"); proc_get_mac_reg_dump1() 329 len += snprintf(page + len, count - len, "0x%02x", i); proc_get_mac_reg_dump1() 330 len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i)); proc_get_mac_reg_dump1() 332 len += snprintf(page + len, count - len, "\n"); proc_get_mac_reg_dump1() 336 return len; proc_get_mac_reg_dump1() 345 int len = 0; proc_get_mac_reg_dump2() local 348 len += snprintf(page + len, count - len, "\n======= MAC REG =======\n"); proc_get_mac_reg_dump2() 352 len += snprintf(page + len, count - len, "0x%02x", i); proc_get_mac_reg_dump2() 353 len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i)); proc_get_mac_reg_dump2() 355 len += snprintf(page + len, count - len, "\n"); proc_get_mac_reg_dump2() 359 return len; proc_get_mac_reg_dump2() 368 int len = 0; proc_get_mac_reg_dump3() local 371 len += snprintf(page + len, count - len, "\n======= MAC REG =======\n"); proc_get_mac_reg_dump3() 375 len += snprintf(page + len, count - len, "0x%02x", i); proc_get_mac_reg_dump3() 376 len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i)); proc_get_mac_reg_dump3() 378 len += snprintf(page + len, count - len, "\n"); proc_get_mac_reg_dump3() 382 return len; proc_get_mac_reg_dump3() 391 int len = 0; proc_get_bb_reg_dump1() local 394 len += snprintf(page + len, count - len, "\n======= BB REG =======\n"); proc_get_bb_reg_dump1() 397 len += snprintf(page + len, count - len, "0x%02x", i); proc_get_bb_reg_dump1() 398 len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i)); proc_get_bb_reg_dump1() 400 len += snprintf(page + len, count - len, "\n"); proc_get_bb_reg_dump1() 403 return len; proc_get_bb_reg_dump1() 412 int len = 0; proc_get_bb_reg_dump2() local 415 len += snprintf(page + len, count - len, "\n======= BB REG =======\n"); proc_get_bb_reg_dump2() 418 len += snprintf(page + len, count - len, "0x%02x", i); proc_get_bb_reg_dump2() 419 len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i)); proc_get_bb_reg_dump2() 421 len += snprintf(page + len, count - len, "\n"); proc_get_bb_reg_dump2() 424 return len; proc_get_bb_reg_dump2() 433 int len = 0; proc_get_bb_reg_dump3() local 436 len += snprintf(page + len, count - len, "\n======= BB REG =======\n"); proc_get_bb_reg_dump3() 439 len += snprintf(page + len, count - len, "0x%02x", i); proc_get_bb_reg_dump3() 440 len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i)); proc_get_bb_reg_dump3() 442 len += snprintf(page + len, count - len, "\n"); proc_get_bb_reg_dump3() 445 return len; proc_get_bb_reg_dump3() 454 int len = 0; proc_get_rf_reg_dump1() local 458 len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); proc_get_rf_reg_dump1() 460 len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path); proc_get_rf_reg_dump1() 464 len += snprintf(page + len, count - len, "0x%02x ", i); proc_get_rf_reg_dump1() 465 len += snprintf(page + len, count - len, " 0x%08x ", value); proc_get_rf_reg_dump1() 467 len += snprintf(page + len, count - len, "\n"); proc_get_rf_reg_dump1() 470 return len; proc_get_rf_reg_dump1() 479 int len = 0; proc_get_rf_reg_dump2() local 483 len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); proc_get_rf_reg_dump2() 485 len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path); proc_get_rf_reg_dump2() 489 len += snprintf(page + len, count - len, "0x%02x ", i); proc_get_rf_reg_dump2() 490 len += snprintf(page + len, count - len, " 0x%08x ", value); proc_get_rf_reg_dump2() 492 len += snprintf(page + len, count - len, "\n"); proc_get_rf_reg_dump2() 495 return len; proc_get_rf_reg_dump2() 504 int len = 0; proc_get_rf_reg_dump3() local 508 len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); proc_get_rf_reg_dump3() 510 len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path); proc_get_rf_reg_dump3() 514 len += snprintf(page + len, count - len, "0x%02x ", i); proc_get_rf_reg_dump3() 515 len += snprintf(page + len, count - len, " 0x%08x ", value); proc_get_rf_reg_dump3() 517 len += snprintf(page + len, count - len, "\n"); proc_get_rf_reg_dump3() 521 return len; proc_get_rf_reg_dump3() 531 int len = 0; proc_get_rf_reg_dump4() local 535 len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); proc_get_rf_reg_dump4() 537 len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path); proc_get_rf_reg_dump4() 541 len += snprintf(page + len, count - len, "0x%02x ", i); proc_get_rf_reg_dump4() 542 len += snprintf(page + len, count - len, " 0x%08x ", value); proc_get_rf_reg_dump4() 544 len += snprintf(page + len, count - len, "\n"); proc_get_rf_reg_dump4() 547 return len; proc_get_rf_reg_dump4() 558 int len = 0; proc_get_rx_signal() local 560 len = snprintf(page + len, count, proc_get_rx_signal() 574 return len; proc_get_rx_signal() 616 int len = 0; proc_get_ht_enable() local 619 len += snprintf(page + len, count - len, proc_get_ht_enable() 624 return len; proc_get_ht_enable() 657 int len = 0; proc_get_cbw40_enable() local 660 len += snprintf(page + len, count - len, proc_get_cbw40_enable() 666 return len; proc_get_cbw40_enable() 698 int len = 0; proc_get_ampdu_enable() local 701 len += snprintf(page + len, count - len, proc_get_ampdu_enable() 707 return len; proc_get_ampdu_enable() 738 int len = 0; proc_get_two_path_rssi() local 741 len += snprintf(page + len, count - len, proc_get_two_path_rssi() 748 return len; proc_get_two_path_rssi() 759 int len = 0; proc_get_rx_stbc() local 762 len += snprintf(page + len, count - len, proc_get_rx_stbc() 768 return len; proc_get_rx_stbc() 845 int len = 0; proc_get_all_sta_info() local 848 len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap); proc_get_all_sta_info() 861 len += snprintf(page + len, count - len, "sta's macaddr: %pM\n", psta->hwaddr); proc_get_all_sta_info() 862 len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self); proc_get_all_sta_info() 863 len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid); proc_get_all_sta_info() 864 len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate); proc_get_all_sta_info() 865 len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi); proc_get_all_sta_info() 866 len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable); proc_get_all_sta_info() 867 len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap); proc_get_all_sta_info() 868 len += snprintf(page + len, count - len, "sleepq_len=%d\n", psta->sleepq_len); proc_get_all_sta_info() 869 len += snprintf(page + len, count - len, "capability=0x%x\n", psta->capability); proc_get_all_sta_info() 870 len += snprintf(page + len, count - len, "flags=0x%x\n", psta->flags); proc_get_all_sta_info() 871 len += snprintf(page + len, count - len, "wpa_psk=0x%x\n", psta->wpa_psk); proc_get_all_sta_info() 872 len += snprintf(page + len, count - len, "wpa2_group_cipher=0x%x\n", psta->wpa2_group_cipher); proc_get_all_sta_info() 873 len += snprintf(page + len, count - len, "wpa2_pairwise_cipher=0x%x\n", psta->wpa2_pairwise_cipher); proc_get_all_sta_info() 874 len += snprintf(page + len, count - len, "qos_info=0x%x\n", psta->qos_info); proc_get_all_sta_info() 875 len += snprintf(page + len, count - len, "dot118021XPrivacy=0x%x\n", psta->dot118021XPrivacy); proc_get_all_sta_info() 880 len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", j, preorder_ctrl->indicate_seq); proc_get_all_sta_info() 887 return len; proc_get_all_sta_info() 898 int len = 0; proc_get_best_channel() local 938 len += snprintf(page + len, count - len, "The rx cnt of channel %3d = %d\n", proc_get_best_channel() 942 len += snprintf(page + len, count - len, "best_channel_5G = %d\n", best_channel_5G); proc_get_best_channel() 943 len += snprintf(page + len, count - len, "best_channel_24G = %d\n", best_channel_24G); proc_get_best_channel() 946 return len; proc_get_best_channel()
|
/linux-4.1.27/drivers/net/wireless/ath/ath9k/ |
H A D | htc_drv_debug.c | 25 unsigned int len = 0; read_file_tgt_int_stats() local 40 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_int_stats() 44 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_int_stats() 48 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_int_stats() 52 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_int_stats() 56 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_int_stats() 60 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_int_stats() 64 if (len > sizeof(buf)) read_file_tgt_int_stats() 65 len = sizeof(buf); read_file_tgt_int_stats() 67 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_tgt_int_stats() 83 unsigned int len = 0; read_file_tgt_tx_stats() local 98 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 102 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 106 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 110 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 114 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 118 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 122 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 126 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 130 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_tx_stats() 134 if (len > sizeof(buf)) read_file_tgt_tx_stats() 135 len = sizeof(buf); read_file_tgt_tx_stats() 137 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_tgt_tx_stats() 153 unsigned int len = 0; read_file_tgt_rx_stats() local 168 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_rx_stats() 172 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_rx_stats() 176 len += scnprintf(buf + len, sizeof(buf) - len, read_file_tgt_rx_stats() 180 if (len > sizeof(buf)) read_file_tgt_rx_stats() 181 len = sizeof(buf); read_file_tgt_rx_stats() 183 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_tgt_rx_stats() 198 unsigned int len = 0; read_file_xmit() local 200 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 203 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 206 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 209 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 212 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 215 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 219 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 222 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 225 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 228 len += scnprintf(buf + len, sizeof(buf) - len, read_file_xmit() 232 if (len > sizeof(buf)) read_file_xmit() 233 len = sizeof(buf); read_file_xmit() 235 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_xmit() 256 unsigned int len = 0, size = 1500; read_file_skb_rx() local 263 len += scnprintf(buf + len, size - len, read_file_skb_rx() 266 len += scnprintf(buf + len, size - len, read_file_skb_rx() 269 len += scnprintf(buf + len, size - len, read_file_skb_rx() 273 if (len > size) read_file_skb_rx() 274 len = size; read_file_skb_rx() 276 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_skb_rx() 294 unsigned int len; read_file_slot() local 297 len = scnprintf(buf, sizeof(buf), read_file_slot() 303 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_slot() 318 unsigned int len = 0; read_file_queue() local 320 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 323 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 326 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 329 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 332 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 335 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 338 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 342 len += scnprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n", read_file_queue() 346 if (len > sizeof(buf)) read_file_queue() 347 len = sizeof(buf); read_file_queue() 349 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_queue() 366 unsigned int len; read_file_debug() local 368 len = sprintf(buf, "0x%08x\n", common->debug_mask); read_file_debug() 369 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_debug() 379 ssize_t len; write_file_debug() local 381 len = min(count, sizeof(buf) - 1); write_file_debug() 382 if (copy_from_user(buf, user_buf, len)) write_file_debug() 385 buf[len] = '\0'; write_file_debug()
|
H A D | dfs_debug.c | 28 len += scnprintf(buf + len, size - len, "%28s : %10u\n", s, \ 31 len += scnprintf(buf + len, size - len, "%28s : %10u\n", s, \ 40 unsigned int len = 0, size = 8000; read_file_dfs() local 47 len += scnprintf(buf + len, size - len, "DFS support for " read_file_dfs() 54 len += scnprintf(buf + len, size - len, read_file_dfs() 61 len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n"); read_file_dfs() 71 len += scnprintf(buf + len, size - len, "Radar detector statistics " read_file_dfs() 76 len += scnprintf(buf + len, size - len, "Global Pool statistics:\n"); read_file_dfs() 86 if (len > size) read_file_dfs() 87 len = size; read_file_dfs() 89 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_dfs() 103 ssize_t len; write_file_dfs() local 105 len = min(count, sizeof(buf) - 1); write_file_dfs() 106 if (copy_from_user(buf, user_buf, len)) write_file_dfs() 109 buf[len] = '\0'; write_file_dfs()
|
H A D | debug_sta.c | 31 u32 len = 0, size = 4096; read_file_node_aggr() local 41 len = scnprintf(buf, size, "%s\n", read_file_node_aggr() 46 len = scnprintf(buf, size, "Max-AMPDU: %d\n", read_file_node_aggr() 48 len += scnprintf(buf + len, size - len, "MPDU Density: %d\n\n", read_file_node_aggr() 51 len += scnprintf(buf + len, size - len, read_file_node_aggr() 58 len += scnprintf(buf + len, size - len, read_file_node_aggr() 64 len += scnprintf(buf + len, size - len, read_file_node_aggr() 74 len += scnprintf(buf + len, size - len, read_file_node_aggr() 88 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_node_aggr() 167 len += scnprintf(buf + len, size - len, \ 176 len += scnprintf(buf + len, size - len, \ 191 u32 len = 0, size = 4096; read_file_node_recv() local 206 len += scnprintf(buf + len, size - len, read_file_node_recv() 211 len += scnprintf(buf + len, size - len, read_file_node_recv() 220 len += scnprintf(buf + len, size - len, "\n"); read_file_node_recv() 243 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_node_recv()
|
H A D | debug.c | 92 unsigned int len; read_file_debug() local 94 len = sprintf(buf, "0x%08x\n", common->debug_mask); read_file_debug() 95 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_debug() 105 ssize_t len; write_file_debug() local 107 len = min(count, sizeof(buf) - 1); write_file_debug() 108 if (copy_from_user(buf, user_buf, len)) write_file_debug() 111 buf[len] = '\0'; write_file_debug() 138 unsigned int len = 0; read_file_ani() local 167 len += scnprintf(buf + len, size - len, "%15s: %s\n", "ANI", read_file_ani() 174 len += scnprintf(buf + len, size - len, "%15s: %u\n", read_file_ani() 178 if (len > size) read_file_ani() 179 len = size; read_file_ani() 181 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_ani() 195 ssize_t len; write_file_ani() local 197 len = min(count, sizeof(buf) - 1); write_file_ani() 198 if (copy_from_user(buf, user_buf, len)) write_file_ani() 201 buf[len] = '\0'; write_file_ani() 237 unsigned int len; read_file_bt_ant_diversity() local 239 len = sprintf(buf, "%d\n", common->bt_ant_diversity); read_file_bt_ant_diversity() 240 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_bt_ant_diversity() 252 ssize_t len; write_file_bt_ant_diversity() local 254 len = min(count, sizeof(buf) - 1); write_file_bt_ant_diversity() 255 if (copy_from_user(buf, user_buf, len)) write_file_bt_ant_diversity() 261 buf[len] = '\0'; write_file_bt_ant_diversity() 309 unsigned int len = 0; read_file_antenna_diversity() local 322 len += scnprintf(buf + len, size - len, "%s\n", read_file_antenna_diversity() 329 len += scnprintf(buf + len, size - len, "Current MAIN config : %s\n", read_file_antenna_diversity() 331 len += scnprintf(buf + len, size - len, "Current ALT config : %s\n", read_file_antenna_diversity() 333 len += scnprintf(buf + len, size - len, "Average MAIN RSSI : %d\n", read_file_antenna_diversity() 335 len += scnprintf(buf + len, size - len, "Average ALT RSSI : %d\n\n", read_file_antenna_diversity() 339 len += scnprintf(buf + len, size - len, "Packet Receive Cnt:\n"); read_file_antenna_diversity() 340 len += scnprintf(buf + len, size - len, "-------------------\n"); read_file_antenna_diversity() 342 len += scnprintf(buf + len, size - len, "%30s%15s\n", read_file_antenna_diversity() 344 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 348 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 352 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 356 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 360 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 365 len += scnprintf(buf + len, size - len, "\nLNA Config Attempts:\n"); read_file_antenna_diversity() 366 len += scnprintf(buf + len, size - len, "--------------------\n"); read_file_antenna_diversity() 368 len += scnprintf(buf + len, size - len, "%30s%15s\n", read_file_antenna_diversity() 370 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 374 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 378 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 382 len += scnprintf(buf + len, size - len, "%-14s:%15d%15d\n", read_file_antenna_diversity() 388 if (len > size) read_file_antenna_diversity() 389 len = size; read_file_antenna_diversity() 391 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_antenna_diversity() 789 sc->debug.stats.txstats[qnum].tx_bytes_all += bf->bf_mpdu->len; ath_debug_stat_tx() 829 unsigned int len; read_file_regidx() local 831 len = sprintf(buf, "0x%08x\n", sc->debug.regidx); read_file_regidx() 832 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_regidx() 841 ssize_t len; write_file_regidx() local 843 len = min(count, sizeof(buf) - 1); write_file_regidx() 844 if (copy_from_user(buf, user_buf, len)) write_file_regidx() 847 buf[len] = '\0'; write_file_regidx() 869 unsigned int len; read_file_regval() local 875 len = sprintf(buf, "0x%08x\n", regval); read_file_regval() 876 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_regval() 886 ssize_t len; write_file_regval() local 888 len = min(count, sizeof(buf) - 1); write_file_regval() 889 if (copy_from_user(buf, user_buf, len)) write_file_regval() 892 buf[len] = '\0'; write_file_regval() 915 unsigned int len = 0; open_file_regdump() local 929 len += scnprintf(buf + len, regdump_len - len, open_file_regdump() 993 u32 len = 0, size = 1500; read_file_btcoex() local 1002 len = scnprintf(buf, size, "%s\n", read_file_btcoex() 1007 len = ath9k_dump_btcoex(sc, buf, size); read_file_btcoex() 1009 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_btcoex() 1030 unsigned int len; read_file_ackto() local 1032 len = sprintf(buf, "%u %c\n", ah->dynack.ackto, read_file_ackto() 1035 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_ackto() 1052 unsigned int len = 0, size = 32; read_file_wow() local 1060 len += scnprintf(buf + len, size - len, "WOW: %s\n", read_file_wow() 1063 if (len > size) read_file_wow() 1064 len = size; read_file_wow() 1066 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_wow() 1078 ssize_t len; write_file_wow() local 1080 len = min(count, sizeof(buf) - 1); write_file_wow() 1081 if (copy_from_user(buf, user_buf, len)) write_file_wow() 1084 buf[len] = '\0'; write_file_wow() 1114 unsigned int len = 0, size = 32; read_file_tpc() local 1122 len += scnprintf(buf + len, size - len, "%s\n", read_file_tpc() 1125 if (len > size) read_file_tpc() 1126 len = size; read_file_tpc() 1128 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_tpc() 1141 ssize_t len; write_file_tpc() local 1144 len = min(count, sizeof(buf) - 1); write_file_tpc() 1145 if (copy_from_user(buf, user_buf, len)) write_file_tpc() 1148 buf[len] = '\0'; write_file_tpc()
|
/linux-4.1.27/include/trace/events/ |
H A D | printk.h | 10 TP_PROTO(const char *text, size_t len), 12 TP_ARGS(text, len), 15 __dynamic_array(char, msg, len + 1) 19 memcpy(__get_dynamic_array(msg), text, len); 20 ((char *)__get_dynamic_array(msg))[len] = 0;
|
H A D | skb.h | 55 TP_PROTO(const struct sk_buff *skb, int len), 57 TP_ARGS(skb, len), 61 __field( int, len ) 66 __entry->len = len; 69 TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len)
|
H A D | i2c.h | 38 __field(__u16, len ) 39 __dynamic_array(__u8, buf, msg->len) ), 45 __entry->len = msg->len; 46 memcpy(__get_dynamic_array(buf), msg->buf, msg->len); 53 __entry->len, 54 __entry->len, __get_dynamic_array(buf) 71 __field(__u16, len ) 78 __entry->len = msg->len; 85 __entry->len 102 __field(__u16, len ) 103 __dynamic_array(__u8, buf, msg->len) ), 109 __entry->len = msg->len; 110 memcpy(__get_dynamic_array(buf), msg->buf, msg->len); 117 __entry->len, 118 __entry->len, __get_dynamic_array(buf) 164 __field(__u8, len ) 176 __entry->len = 1; 180 __entry->len = 2; 185 __entry->len = data->block[0] + 1; 187 memcpy(__entry->buf, data->block, __entry->len); 193 __entry->len = 0; 211 __entry->len, 212 __entry->len, __entry->buf 272 __field(__u8, len ) 285 __entry->len = 1; 289 __entry->len = 2; 294 __entry->len = data->block[0] + 1; 296 memcpy(__entry->buf, data->block, __entry->len); 301 __entry->len = 0; 319 __entry->len, 320 __entry->len, __entry->buf
|
H A D | net.h | 28 __field( unsigned int, len ) 48 __entry->len = skb->len; 60 TP_printk("dev=%s queue_mapping=%u skbaddr=%p vlan_tagged=%d vlan_proto=0x%04x vlan_tci=0x%04x protocol=0x%04x ip_summed=%d len=%u data_len=%u network_offset=%d transport_offset_valid=%d transport_offset=%d tx_flags=%d gso_size=%d gso_segs=%d gso_type=%#x", 63 __entry->protocol, __entry->ip_summed, __entry->len, 81 __field( unsigned int, len ) 88 __entry->len = skb_len; 93 TP_printk("dev=%s skbaddr=%p len=%u rc=%d", 94 __get_str(name), __entry->skbaddr, __entry->len, __entry->rc) 105 __field( unsigned int, len ) 111 __entry->len = skb->len; 115 TP_printk("dev=%s skbaddr=%p len=%u", 116 __get_str(name), __entry->skbaddr, __entry->len) 158 __field( unsigned int, len ) 184 __entry->len = skb->len; 194 TP_printk("dev=%s napi_id=%#x queue_mapping=%u skbaddr=%p vlan_tagged=%d vlan_proto=0x%04x vlan_tci=0x%04x protocol=0x%04x ip_summed=%d hash=0x%08x l4_hash=%d len=%u data_len=%u truesize=%u mac_header_valid=%d mac_header=%d nr_frags=%d gso_size=%d gso_type=%#x", 198 __entry->hash, __entry->l4_hash, __entry->len,
|
/linux-4.1.27/arch/sparc/include/asm/ |
H A D | mman.h | 7 #define arch_mmap_check(addr,len,flags) sparc_mmap_check(addr,len) 8 int sparc_mmap_check(unsigned long addr, unsigned long len);
|
/linux-4.1.27/drivers/net/wireless/ath/ath5k/ |
H A D | debug.c | 200 unsigned int len = 0; read_file_beacon() local 205 len += snprintf(buf + len, sizeof(buf) - len, read_file_beacon() 210 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n", read_file_beacon() 213 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n\n", read_file_beacon() 217 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", read_file_beacon() 221 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", read_file_beacon() 225 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", read_file_beacon() 229 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", read_file_beacon() 233 len += snprintf(buf + len, sizeof(buf) - len, read_file_beacon() 237 if (len > sizeof(buf)) read_file_beacon() 238 len = sizeof(buf); read_file_beacon() 240 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_beacon() 321 unsigned int len = 0; read_file_debug() local 324 len += snprintf(buf + len, sizeof(buf) - len, read_file_debug() 328 len += snprintf(buf + len, sizeof(buf) - len, read_file_debug() 333 len += snprintf(buf + len, sizeof(buf) - len, read_file_debug() 338 if (len > sizeof(buf)) read_file_debug() 339 len = sizeof(buf); read_file_debug() 341 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_debug() 383 unsigned int len = 0; read_file_antenna() local 387 len += snprintf(buf + len, sizeof(buf) - len, "antenna mode\t%d\n", read_file_antenna() 389 len += snprintf(buf + len, sizeof(buf) - len, "default antenna\t%d\n", read_file_antenna() 391 len += snprintf(buf + len, sizeof(buf) - len, "tx antenna\t%d\n", read_file_antenna() 394 len += snprintf(buf + len, sizeof(buf) - len, "\nANTENNA\t\tRX\tTX\n"); read_file_antenna() 396 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 400 len += snprintf(buf + len, sizeof(buf) - len, "[invalid]\t%d\t%d\n", read_file_antenna() 404 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 408 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 411 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 414 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 417 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 422 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 427 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 432 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 437 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 440 len += snprintf(buf + len, sizeof(buf) - len, read_file_antenna() 443 if (len > sizeof(buf)) read_file_antenna() 444 len = sizeof(buf); read_file_antenna() 446 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_antenna() 496 unsigned int len = 0; read_file_misc() local 499 len += snprintf(buf + len, sizeof(buf) - len, "bssid-mask: %pM\n", read_file_misc() 501 len += snprintf(buf + len, sizeof(buf) - len, "filter-flags: 0x%x ", read_file_misc() 504 len += snprintf(buf + len, sizeof(buf) - len, " UCAST"); read_file_misc() 506 len += snprintf(buf + len, sizeof(buf) - len, " MCAST"); read_file_misc() 508 len += snprintf(buf + len, sizeof(buf) - len, " BCAST"); read_file_misc() 510 len += snprintf(buf + len, sizeof(buf) - len, " CONTROL"); read_file_misc() 512 len += snprintf(buf + len, sizeof(buf) - len, " BEACON"); read_file_misc() 514 len += snprintf(buf + len, sizeof(buf) - len, " PROM"); read_file_misc() 516 len += snprintf(buf + len, sizeof(buf) - len, " XRPOLL"); read_file_misc() 518 len += snprintf(buf + len, sizeof(buf) - len, " PROBEREQ"); read_file_misc() 520 len += snprintf(buf + len, sizeof(buf) - len, " PHYERR-5212"); read_file_misc() 522 len += snprintf(buf + len, sizeof(buf) - len, " RADARERR-5212"); read_file_misc() 524 snprintf(buf + len, sizeof(buf) - len, " PHYERR-5211"); read_file_misc() 526 len += snprintf(buf + len, sizeof(buf) - len, " RADARERR-5211"); read_file_misc() 528 len += snprintf(buf + len, sizeof(buf) - len, "\nopmode: %s (%d)\n", read_file_misc() 531 if (len > sizeof(buf)) read_file_misc() 532 len = sizeof(buf); read_file_misc() 534 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_misc() 552 unsigned int len = 0; read_file_frameerrors() local 555 len += snprintf(buf + len, sizeof(buf) - len, read_file_frameerrors() 557 len += snprintf(buf + len, sizeof(buf) - len, "CRC\t%u\t(%u%%)\n", read_file_frameerrors() 561 len += snprintf(buf + len, sizeof(buf) - len, "PHY\t%u\t(%u%%)\n", read_file_frameerrors() 567 len += snprintf(buf + len, sizeof(buf) - len, read_file_frameerrors() 572 len += snprintf(buf + len, sizeof(buf) - len, "FIFO\t%u\t(%u%%)\n", read_file_frameerrors() 576 len += snprintf(buf + len, sizeof(buf) - len, "decrypt\t%u\t(%u%%)\n", read_file_frameerrors() 580 len += snprintf(buf + len, sizeof(buf) - len, "MIC\t%u\t(%u%%)\n", read_file_frameerrors() 584 len += snprintf(buf + len, sizeof(buf) - len, "process\t%u\t(%u%%)\n", read_file_frameerrors() 588 len += snprintf(buf + len, sizeof(buf) - len, "jumbo\t%u\t(%u%%)\n", read_file_frameerrors() 592 len += snprintf(buf + len, sizeof(buf) - len, "[RX all\t%u]\n", read_file_frameerrors() 594 len += snprintf(buf + len, sizeof(buf) - len, "RX-all-bytes\t%u\n", read_file_frameerrors() 597 len += snprintf(buf + len, sizeof(buf) - len, read_file_frameerrors() 599 len += snprintf(buf + len, sizeof(buf) - len, "retry\t%u\t(%u%%)\n", read_file_frameerrors() 603 len += snprintf(buf + len, sizeof(buf) - len, "FIFO\t%u\t(%u%%)\n", read_file_frameerrors() 607 len += snprintf(buf + len, sizeof(buf) - len, "filter\t%u\t(%u%%)\n", read_file_frameerrors() 611 len += snprintf(buf + len, sizeof(buf) - len, "[TX all\t%u]\n", read_file_frameerrors() 613 len += snprintf(buf + len, sizeof(buf) - len, "TX-all-bytes\t%u\n", read_file_frameerrors() 616 if (len > sizeof(buf)) read_file_frameerrors() 617 len = sizeof(buf); read_file_frameerrors() 619 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_frameerrors() 672 unsigned int len = 0; read_file_ani() local 674 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 678 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 681 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 683 len += snprintf(buf + len, sizeof(buf) - len, "operating mode:\t\t\t"); read_file_ani() 686 len += snprintf(buf + len, sizeof(buf) - len, "OFF\n"); read_file_ani() 689 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 693 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 697 len += snprintf(buf + len, sizeof(buf) - len, "AUTO\n"); read_file_ani() 700 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 704 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 707 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 710 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 713 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 716 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 720 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 723 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 732 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 735 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 738 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 742 len += snprintf(buf + len, sizeof(buf) - len, "profcnt cycles\t\t%u\n", read_file_ani() 744 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 747 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 751 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 755 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 760 len += snprintf(buf + len, sizeof(buf) - len, read_file_ani() 766 if (len > sizeof(buf)) read_file_ani() 767 len = sizeof(buf); read_file_ani() 769 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_ani() 834 unsigned int len = 0; read_file_queue() local 840 len += snprintf(buf + len, sizeof(buf) - len, read_file_queue() 846 len += snprintf(buf + len, sizeof(buf) - len, read_file_queue() 858 len += snprintf(buf + len, sizeof(buf) - len, read_file_queue() 859 " len: %d bufs: %d\n", txq->txq_len, n); read_file_queue() 860 len += snprintf(buf + len, sizeof(buf) - len, read_file_queue() 864 if (len > sizeof(buf)) read_file_queue() 865 len = sizeof(buf); read_file_queue() 867 return simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_queue() 903 int len; member in struct:eeprom_private 955 ep->len = i; open_file_eeprom() 973 return simple_read_from_buffer(user_buf, count, ppos, ep->buf, ep->len); read_file_eeprom()
|
/linux-4.1.27/arch/sh/include/asm/ |
H A D | sram.h | 12 static inline unsigned long sram_alloc(size_t len) sram_alloc() argument 17 return gen_pool_alloc(sram_pool, len); sram_alloc() 20 static inline void sram_free(unsigned long addr, size_t len) sram_free() argument 22 return gen_pool_free(sram_pool, addr, len); sram_free() 27 static inline unsigned long sram_alloc(size_t len) sram_alloc() argument 32 static inline void sram_free(unsigned long addr, size_t len) sram_free() argument
|
H A D | syscalls.h | 6 asmlinkage int old_mmap(unsigned long addr, unsigned long len, 9 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
|
H A D | checksum_32.h | 15 * computes the checksum of a memory block at buff, length len, 26 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum); 37 int len, __wsum sum, 49 int len, __wsum sum) csum_partial_copy_nocheck() 51 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); csum_partial_copy_nocheck() 56 int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() 59 len, sum, err_ptr, NULL); csum_partial_copy_from_user() 118 unsigned short len, csum_tcpudp_nofold() 123 unsigned long len_proto = (proto + len) << 8; csum_tcpudp_nofold() 125 unsigned long len_proto = proto + len; csum_tcpudp_nofold() 145 unsigned short len, csum_tcpudp_magic() 149 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 156 static inline __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 158 return csum_fold(csum_partial(buff, len, 0)); ip_compute_csum() 164 __u32 len, unsigned short proto, csum_ipv6_magic() 191 "r" (htonl(len)), "r" (htonl(proto)), "0" (sum) csum_ipv6_magic() 203 int len, __wsum sum, csum_and_copy_to_user() 206 if (access_ok(VERIFY_WRITE, dst, len)) csum_and_copy_to_user() 208 dst, len, sum, NULL, err_ptr); csum_and_copy_to_user() 210 if (len) csum_and_copy_to_user() 48 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 55 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() argument 117 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument 144 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_magic() argument 162 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum sum) csum_ipv6_magic() argument 201 csum_and_copy_to_user(const void *src, void __user *dst, int len, __wsum sum, int *err_ptr) csum_and_copy_to_user() argument
|
/linux-4.1.27/scripts/dtc/ |
H A D | data.c | 51 while ((d.len + xlen) > newsize) data_grow_for() 59 struct data data_copy_mem(const char *mem, int len) data_copy_mem() argument 63 d = data_grow_for(empty_data, len); data_copy_mem() 65 d.len = len; data_copy_mem() 66 memcpy(d.val, mem, len); data_copy_mem() 71 struct data data_copy_escape_string(const char *s, int len) data_copy_escape_string() argument 80 while (i < len) { data_copy_escape_string() 86 q[d.len++] = c; data_copy_escape_string() 89 q[d.len++] = '\0'; data_copy_escape_string() 97 while (!feof(f) && (d.len < maxlen)) { data_copy_file() 103 chunksize = maxlen - d.len; data_copy_file() 106 ret = fread(d.val + d.len, 1, chunksize, f); data_copy_file() 111 if (d.len + ret < d.len) data_copy_file() 114 d.len += ret; data_copy_file() 120 struct data data_append_data(struct data d, const void *p, int len) data_append_data() argument 122 d = data_grow_for(d, len); data_append_data() 123 memcpy(d.val + d.len, p, len); data_append_data() 124 d.len += len; data_append_data() 129 const void *p, int len) data_insert_at_marker() 131 d = data_grow_for(d, len); data_insert_at_marker() 132 memmove(d.val + m->offset + len, d.val + m->offset, d.len - m->offset); data_insert_at_marker() 133 memcpy(d.val + m->offset, p, len); data_insert_at_marker() 134 d.len += len; data_insert_at_marker() 139 m->offset += len; data_insert_at_marker() 159 d = data_append_markers(data_append_data(d1, d2.val, d2.len), m2); data_merge() 163 m2->offset += d1.len; data_merge() 225 struct data data_append_zeroes(struct data d, int len) data_append_zeroes() argument 227 d = data_grow_for(d, len); data_append_zeroes() 229 memset(d.val + d.len, 0, len); data_append_zeroes() 230 d.len += len; data_append_zeroes() 236 int newlen = ALIGN(d.len, align); data_append_align() 237 return data_append_zeroes(d, newlen - d.len); data_append_align() 245 m->offset = d.len; data_add_marker() 256 int len = d.len; data_is_one_string() local 258 if (len == 0) data_is_one_string() 261 for (i = 0; i < len-1; i++) data_is_one_string() 265 if (d.val[len-1] != '\0') data_is_one_string() 128 data_insert_at_marker(struct data d, struct marker *m, const void *p, int len) data_insert_at_marker() argument
|
H A D | util.c | 41 int len = strlen(s) + 1; xstrdup() local 42 char *dup = xmalloc(len); xstrdup() 44 memcpy(dup, s, len); xstrdup() 53 int len; join_path() local 57 len = lenp + lenn + 2; join_path() 60 len--; join_path() 63 str = xmalloc(len); join_path() 73 int util_is_printable_string(const void *data, int len) util_is_printable_string() argument 79 if (len == 0) util_is_printable_string() 83 if (s[len - 1] != '\0') util_is_printable_string() 86 se = s + len; util_is_printable_string() 201 int utilfdt_read_err_len(const char *filename, char **buffp, off_t *len) utilfdt_read_err_len() argument 242 *len = bufsize; utilfdt_read_err_len() 248 off_t len; utilfdt_read_err() local 249 return utilfdt_read_err_len(filename, buffp, &len); utilfdt_read_err() 252 char *utilfdt_read_len(const char *filename, off_t *len) utilfdt_read_len() argument 255 int ret = utilfdt_read_err_len(filename, &buff, len); utilfdt_read_len() 268 off_t len; utilfdt_read() local 269 return utilfdt_read_len(filename, &len); utilfdt_read() 353 void utilfdt_print_data(const char *data, int len) utilfdt_print_data() argument 360 if (len == 0) utilfdt_print_data() 363 if (util_is_printable_string(data, len)) { utilfdt_print_data() 370 if (s < data + len) utilfdt_print_data() 372 } while (s < data + len); utilfdt_print_data() 374 } else if ((len % 4) == 0) { utilfdt_print_data() 378 for (i = 0; i < len; i += 4) utilfdt_print_data() 380 i < (len - 4) ? " " : ""); utilfdt_print_data() 384 for (i = 0; i < len; i++) utilfdt_print_data() 385 printf("%02x%s", *p++, i < len - 1 ? " " : ""); utilfdt_print_data()
|
/linux-4.1.27/net/ceph/ |
H A D | buffer.c | 11 struct ceph_buffer *ceph_buffer_new(size_t len, gfp_t gfp) ceph_buffer_new() argument 19 b->vec.iov_base = ceph_kvmalloc(len, gfp); ceph_buffer_new() 26 b->alloc_len = len; ceph_buffer_new() 27 b->vec.iov_len = len; ceph_buffer_new() 45 size_t len; ceph_decode_buffer() local 48 len = ceph_decode_32(p); ceph_decode_buffer() 49 dout("decode_buffer len %d\n", (int)len); ceph_decode_buffer() 50 ceph_decode_need(p, end, len, bad); ceph_decode_buffer() 51 *b = ceph_buffer_new(len, GFP_NOFS); ceph_decode_buffer() 54 ceph_decode_copy(p, (*b)->vec.iov_base, len); ceph_decode_buffer()
|
H A D | pagevec.c | 98 loff_t off, size_t len) ceph_copy_user_to_page_vector() 102 int left = len; ceph_copy_user_to_page_vector() 118 return len; ceph_copy_user_to_page_vector() 124 loff_t off, size_t len) ceph_copy_to_page_vector() 128 size_t left = len; ceph_copy_to_page_vector() 147 loff_t off, size_t len) ceph_copy_from_page_vector() 151 size_t left = len; ceph_copy_from_page_vector() 172 void ceph_zero_page_vector_range(int off, int len, struct page **pages) ceph_zero_page_vector_range() argument 178 dout("zero_page_vector_page %u~%u\n", off, len); ceph_zero_page_vector_range() 182 int end = min((int)PAGE_CACHE_SIZE, off + len); ceph_zero_page_vector_range() 186 len -= (end - off); ceph_zero_page_vector_range() 189 while (len >= PAGE_CACHE_SIZE) { ceph_zero_page_vector_range() 190 dout("zeroing %d %p len=%d\n", i, pages[i], len); ceph_zero_page_vector_range() 192 len -= PAGE_CACHE_SIZE; ceph_zero_page_vector_range() 196 if (len) { ceph_zero_page_vector_range() 197 dout("zeroing %d %p tail to %d\n", i, pages[i], (int)len); ceph_zero_page_vector_range() 198 zero_user_segment(pages[i], 0, len); ceph_zero_page_vector_range() 96 ceph_copy_user_to_page_vector(struct page **pages, const void __user *data, loff_t off, size_t len) ceph_copy_user_to_page_vector() argument 122 ceph_copy_to_page_vector(struct page **pages, const void *data, loff_t off, size_t len) ceph_copy_to_page_vector() argument 145 ceph_copy_from_page_vector(struct page **pages, void *data, loff_t off, size_t len) ceph_copy_from_page_vector() argument
|
H A D | ceph_hash.c | 27 __u32 len; /* how many key bytes still need mixing */ ceph_str_hash_rjenkins() local 30 len = length; ceph_str_hash_rjenkins() 36 while (len >= 12) { ceph_str_hash_rjenkins() 45 len = len - 12; ceph_str_hash_rjenkins() 50 switch (len) { /* all the case statements fall through */ ceph_str_hash_rjenkins() 97 unsigned int ceph_str_hash(int type, const char *s, unsigned int len) ceph_str_hash() argument 101 return ceph_str_hash_linux(s, len); ceph_str_hash() 103 return ceph_str_hash_rjenkins(s, len); ceph_str_hash()
|
/linux-4.1.27/tools/testing/selftests/powerpc/copyloops/ |
H A D | validate.c | 17 unsigned long dst_off, unsigned long len, void *redzone, do_one() 29 memcpy(srcp, fill, len); do_one() 31 ret = COPY_LOOP(dstp, srcp, len); do_one() 33 printf("(%p,%p,%ld) returned %ld\n", dstp, srcp, len, ret); do_one() 37 if (memcmp(dstp, srcp, len)) { do_one() 38 printf("(%p,%p,%ld) miscompare\n", dstp, srcp, len); do_one() 40 for (i = 0; i < len; i++) do_one() 43 for (i = 0; i < len; i++) do_one() 51 dstp, srcp, len); do_one() 55 if (memcmp(dstp+len, redzone, dst+BUFLEN-(dstp+len))) { do_one() 57 dstp, srcp, len); do_one() 65 unsigned long len, src_off, dst_off; test_copy_loop() local 84 for (len = 1; len < MAX_LEN; len++) { test_copy_loop() 87 do_one(src, dst, src_off, dst_off, len, test_copy_loop() 16 do_one(char *src, char *dst, unsigned long src_off, unsigned long dst_off, unsigned long len, void *redzone, void *fill) do_one() argument
|
/linux-4.1.27/fs/reiserfs/ |
H A D | hashes.c | 44 u32 keyed_hash(const signed char *msg, int len) keyed_hash() argument 53 /* assert(len >= 0 && len < 256); */ keyed_hash() 55 pad = (u32) len | ((u32) len << 8); keyed_hash() 58 while (len >= 16) { keyed_hash() 72 len -= 16; keyed_hash() 76 if (len >= 12) { keyed_hash() 86 for (i = 12; i < len; i++) { keyed_hash() 90 } else if (len >= 8) { keyed_hash() 97 for (i = 8; i < len; i++) { keyed_hash() 101 } else if (len >= 4) { keyed_hash() 106 for (i = 4; i < len; i++) { keyed_hash() 112 for (i = 0; i < len; i++) { keyed_hash() 128 u32 yura_hash(const signed char *msg, int len) yura_hash() argument 134 for (pow = 1, i = 1; i < len; i++) yura_hash() 137 if (len == 1) yura_hash() 142 for (i = 1; i < len; i++) { yura_hash() 144 for (pow = 1, j = i; j < len - 1; j++) yura_hash() 151 for (pow = 1, j = i; j < len - 1; j++) yura_hash() 158 for (pow = 1, j = i; j < len - 1; j++) yura_hash() 167 u32 r5_hash(const signed char *msg, int len) r5_hash() argument
|
/linux-4.1.27/drivers/pnp/pnpbios/ |
H A D | rsparser.c | 56 int start, int len) pnpbios_parse_allocated_ioresource() 59 int end = start + len - 1; pnpbios_parse_allocated_ioresource() 61 if (len <= 0 || end >= 0x10003) pnpbios_parse_allocated_ioresource() 68 int start, int len) pnpbios_parse_allocated_memresource() 71 int end = start + len - 1; pnpbios_parse_allocated_memresource() 73 if (len <= 0) pnpbios_parse_allocated_memresource() 83 unsigned int len, tag; pnpbios_parse_allocated_resource_data() local 97 len = (p[2] << 8) | p[1]; pnpbios_parse_allocated_resource_data() 100 len = p[0] & 0x07; pnpbios_parse_allocated_resource_data() 107 if (len != 9) pnpbios_parse_allocated_resource_data() 123 if (len != 17) pnpbios_parse_allocated_resource_data() 131 if (len != 9) pnpbios_parse_allocated_resource_data() 139 if (len < 2 || len > 3) pnpbios_parse_allocated_resource_data() 155 if (len != 2) pnpbios_parse_allocated_resource_data() 169 if (len != 7) pnpbios_parse_allocated_resource_data() 181 if (len != 3) pnpbios_parse_allocated_resource_data() 196 tag, len); pnpbios_parse_allocated_resource_data() 202 p += len + 3; pnpbios_parse_allocated_resource_data() 204 p += len + 1; pnpbios_parse_allocated_resource_data() 220 resource_size_t min, max, align, len; pnpbios_parse_mem_option() local 226 len = ((p[11] << 8) | p[10]) << 8; pnpbios_parse_mem_option() 228 pnp_register_mem_resource(dev, option_flags, min, max, align, len, pnpbios_parse_mem_option() 236 resource_size_t min, max, align, len; pnpbios_parse_mem32_option() local 242 len = (p[19] << 24) | (p[18] << 16) | (p[17] << 8) | p[16]; pnpbios_parse_mem32_option() 244 pnp_register_mem_resource(dev, option_flags, min, max, align, len, pnpbios_parse_mem32_option() 252 resource_size_t base, len; pnpbios_parse_fixed_mem32_option() local 256 len = (p[11] << 24) | (p[10] << 16) | (p[9] << 8) | p[8]; pnpbios_parse_fixed_mem32_option() 258 pnp_register_mem_resource(dev, option_flags, base, base, 0, len, flags); pnpbios_parse_fixed_mem32_option() 291 resource_size_t min, max, align, len; pnpbios_parse_port_option() local 297 len = p[7]; pnpbios_parse_port_option() 299 pnp_register_port_resource(dev, option_flags, min, max, align, len, pnpbios_parse_port_option() 307 resource_size_t base, len; pnpbios_parse_fixed_port_option() local 310 len = p[3]; pnpbios_parse_fixed_port_option() 311 pnp_register_port_resource(dev, option_flags, base, base, 0, len, pnpbios_parse_fixed_port_option() 319 unsigned int len, tag; pnpbios_parse_resource_option_data() local 332 len = (p[2] << 8) | p[1]; pnpbios_parse_resource_option_data() 335 len = p[0] & 0x07; pnpbios_parse_resource_option_data() 342 if (len != 9) pnpbios_parse_resource_option_data() 344 pnpbios_parse_mem_option(dev, p, len, option_flags); pnpbios_parse_resource_option_data() 348 if (len != 17) pnpbios_parse_resource_option_data() 350 pnpbios_parse_mem32_option(dev, p, len, option_flags); pnpbios_parse_resource_option_data() 354 if (len != 9) pnpbios_parse_resource_option_data() 356 pnpbios_parse_fixed_mem32_option(dev, p, len, pnpbios_parse_resource_option_data() 361 if (len < 2 || len > 3) pnpbios_parse_resource_option_data() 363 pnpbios_parse_irq_option(dev, p, len, option_flags); pnpbios_parse_resource_option_data() 367 if (len != 2) pnpbios_parse_resource_option_data() 369 pnpbios_parse_dma_option(dev, p, len, option_flags); pnpbios_parse_resource_option_data() 373 if (len != 7) pnpbios_parse_resource_option_data() 375 pnpbios_parse_port_option(dev, p, len, option_flags); pnpbios_parse_resource_option_data() 383 if (len != 3) pnpbios_parse_resource_option_data() 385 pnpbios_parse_fixed_port_option(dev, p, len, pnpbios_parse_resource_option_data() 390 if (len > 1) pnpbios_parse_resource_option_data() 393 if (len > 0) pnpbios_parse_resource_option_data() 399 if (len != 0) pnpbios_parse_resource_option_data() 410 tag, len); pnpbios_parse_resource_option_data() 416 p += len + 3; pnpbios_parse_resource_option_data() 418 p += len + 1; pnpbios_parse_resource_option_data() 434 int len, tag; pnpbios_parse_compatible_ids() local 446 len = (p[2] << 8) | p[1]; pnpbios_parse_compatible_ids() 449 len = p[0] & 0x07; pnpbios_parse_compatible_ids() 457 len >= PNP_NAME_LEN ? PNP_NAME_LEN - 2 : len); pnpbios_parse_compatible_ids() 458 dev->name[len >= pnpbios_parse_compatible_ids() 459 PNP_NAME_LEN ? PNP_NAME_LEN - 1 : len] = '\0'; pnpbios_parse_compatible_ids() 463 if (len != 4) pnpbios_parse_compatible_ids() 480 tag, len); pnpbios_parse_compatible_ids() 486 p += len + 3; pnpbios_parse_compatible_ids() 488 p += len + 1; pnpbios_parse_compatible_ids() 504 unsigned long len; pnpbios_encode_mem() local 508 len = resource_size(res); pnpbios_encode_mem() 511 len = 0; pnpbios_encode_mem() 518 p[10] = (len >> 8) & 0xff; pnpbios_encode_mem() 519 p[11] = ((len >> 8) >> 8) & 0xff; pnpbios_encode_mem() 521 pnp_dbg(&dev->dev, " encode mem %#lx-%#lx\n", base, base + len - 1); pnpbios_encode_mem() 528 unsigned long len; pnpbios_encode_mem32() local 532 len = resource_size(res); pnpbios_encode_mem32() 535 len = 0; pnpbios_encode_mem32() 546 p[16] = len & 0xff; pnpbios_encode_mem32() 547 p[17] = (len >> 8) & 0xff; pnpbios_encode_mem32() 548 p[18] = (len >> 16) & 0xff; pnpbios_encode_mem32() 549 p[19] = (len >> 24) & 0xff; pnpbios_encode_mem32() 551 pnp_dbg(&dev->dev, " encode mem32 %#lx-%#lx\n", base, base + len - 1); pnpbios_encode_mem32() 558 unsigned long len; pnpbios_encode_fixed_mem32() local 562 len = resource_size(res); pnpbios_encode_fixed_mem32() 565 len = 0; pnpbios_encode_fixed_mem32() 572 p[8] = len & 0xff; pnpbios_encode_fixed_mem32() 573 p[9] = (len >> 8) & 0xff; pnpbios_encode_fixed_mem32() 574 p[10] = (len >> 16) & 0xff; pnpbios_encode_fixed_mem32() 575 p[11] = (len >> 24) & 0xff; pnpbios_encode_fixed_mem32() 578 base + len - 1); pnpbios_encode_fixed_mem32() 616 unsigned long len; pnpbios_encode_port() local 620 len = resource_size(res); pnpbios_encode_port() 623 len = 0; pnpbios_encode_port() 630 p[7] = len & 0xff; pnpbios_encode_port() 632 pnp_dbg(&dev->dev, " encode io %#lx-%#lx\n", base, base + len - 1); pnpbios_encode_port() 639 unsigned long len = resource_size(res); pnpbios_encode_fixed_port() local 643 len = resource_size(res); pnpbios_encode_fixed_port() 646 len = 0; pnpbios_encode_fixed_port() 651 p[3] = len & 0xff; pnpbios_encode_fixed_port() 654 base + len - 1); pnpbios_encode_fixed_port() 662 unsigned int len, tag; pnpbios_encode_allocated_resource_data() local 672 len = (p[2] << 8) | p[1]; pnpbios_encode_allocated_resource_data() 675 len = p[0] & 0x07; pnpbios_encode_allocated_resource_data() 682 if (len != 9) pnpbios_encode_allocated_resource_data() 690 if (len != 17) pnpbios_encode_allocated_resource_data() 698 if (len != 9) pnpbios_encode_allocated_resource_data() 706 if (len < 2 || len > 3) pnpbios_encode_allocated_resource_data() 714 if (len != 2) pnpbios_encode_allocated_resource_data() 722 if (len != 7) pnpbios_encode_allocated_resource_data() 734 if (len != 3) pnpbios_encode_allocated_resource_data() 749 tag, len); pnpbios_encode_allocated_resource_data() 755 p += len + 3; pnpbios_encode_allocated_resource_data() 757 p += len + 1; pnpbios_encode_allocated_resource_data() 55 pnpbios_parse_allocated_ioresource(struct pnp_dev *dev, int start, int len) pnpbios_parse_allocated_ioresource() argument 67 pnpbios_parse_allocated_memresource(struct pnp_dev *dev, int start, int len) pnpbios_parse_allocated_memresource() argument
|
/linux-4.1.27/lib/ |
H A D | kfifo.c | 103 unsigned int len, unsigned int off) kfifo_copy_in() 113 len *= esize; kfifo_copy_in() 115 l = min(len, size - off); kfifo_copy_in() 118 memcpy(fifo->data, src + l, len - l); kfifo_copy_in() 127 const void *buf, unsigned int len) __kfifo_in() 132 if (len > l) __kfifo_in() 133 len = l; __kfifo_in() 135 kfifo_copy_in(fifo, buf, len, fifo->in); __kfifo_in() 136 fifo->in += len; __kfifo_in() 137 return len; __kfifo_in() 142 unsigned int len, unsigned int off) kfifo_copy_out() 152 len *= esize; kfifo_copy_out() 154 l = min(len, size - off); kfifo_copy_out() 157 memcpy(dst + l, fifo->data, len - l); kfifo_copy_out() 166 void *buf, unsigned int len) __kfifo_out_peek() 171 if (len > l) __kfifo_out_peek() 172 len = l; __kfifo_out_peek() 174 kfifo_copy_out(fifo, buf, len, fifo->out); __kfifo_out_peek() 175 return len; __kfifo_out_peek() 180 void *buf, unsigned int len) __kfifo_out() 182 len = __kfifo_out_peek(fifo, buf, len); __kfifo_out() 183 fifo->out += len; __kfifo_out() 184 return len; __kfifo_out() 189 const void __user *from, unsigned int len, unsigned int off, kfifo_copy_from_user() 201 len *= esize; kfifo_copy_from_user() 203 l = min(len, size - off); kfifo_copy_from_user() 207 ret = DIV_ROUND_UP(ret + len - l, esize); kfifo_copy_from_user() 209 ret = copy_from_user(fifo->data, from + l, len - l); kfifo_copy_from_user() 218 *copied = len - ret * esize; kfifo_copy_from_user() 224 unsigned long len, unsigned int *copied) __kfifo_from_user() 232 len /= esize; __kfifo_from_user() 235 if (len > l) __kfifo_from_user() 236 len = l; __kfifo_from_user() 238 ret = kfifo_copy_from_user(fifo, from, len, fifo->in, copied); __kfifo_from_user() 240 len -= ret; __kfifo_from_user() 244 fifo->in += len; __kfifo_from_user() 250 unsigned int len, unsigned int off, unsigned int *copied) kfifo_copy_to_user() 261 len *= esize; kfifo_copy_to_user() 263 l = min(len, size - off); kfifo_copy_to_user() 267 ret = DIV_ROUND_UP(ret + len - l, esize); kfifo_copy_to_user() 269 ret = copy_to_user(to + l, fifo->data, len - l); kfifo_copy_to_user() 278 *copied = len - ret * esize; kfifo_copy_to_user() 284 unsigned long len, unsigned int *copied) __kfifo_to_user() 292 len /= esize; __kfifo_to_user() 295 if (len > l) __kfifo_to_user() 296 len = l; __kfifo_to_user() 297 ret = kfifo_copy_to_user(fifo, to, len, fifo->out, copied); __kfifo_to_user() 299 len -= ret; __kfifo_to_user() 303 fifo->out += len; __kfifo_to_user() 309 int nents, unsigned int len) setup_sgl_buf() 319 if (!len) setup_sgl_buf() 327 while (len >= l + PAGE_SIZE - off) { setup_sgl_buf() 339 len -= l - off; setup_sgl_buf() 343 sg_set_page(sgl, page, len, off); setup_sgl_buf() 348 int nents, unsigned int len, unsigned int off) setup_sgl() 359 len *= esize; setup_sgl() 361 l = min(len, size - off); setup_sgl() 364 n += setup_sgl_buf(sgl + n, fifo->data, nents - n, len - l); setup_sgl() 370 struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_in_prepare() 375 if (len > l) __kfifo_dma_in_prepare() 376 len = l; __kfifo_dma_in_prepare() 378 return setup_sgl(fifo, sgl, nents, len, fifo->in); __kfifo_dma_in_prepare() 383 struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_out_prepare() 388 if (len > l) __kfifo_dma_out_prepare() 389 len = l; __kfifo_dma_out_prepare() 391 return setup_sgl(fifo, sgl, nents, len, fifo->out); __kfifo_dma_out_prepare() 395 unsigned int __kfifo_max_r(unsigned int len, size_t recsize) __kfifo_max_r() argument 399 if (len > max) __kfifo_max_r() 401 return len; __kfifo_max_r() 452 unsigned int len, size_t recsize) __kfifo_in_r() 454 if (len + recsize > kfifo_unused(fifo)) __kfifo_in_r() 457 __kfifo_poke_n(fifo, len, recsize); __kfifo_in_r() 459 kfifo_copy_in(fifo, buf, len, fifo->in + recsize); __kfifo_in_r() 460 fifo->in += len + recsize; __kfifo_in_r() 461 return len; __kfifo_in_r() 466 void *buf, unsigned int len, size_t recsize, unsigned int *n) kfifo_out_copy_r() 470 if (len > *n) kfifo_out_copy_r() 471 len = *n; kfifo_out_copy_r() 473 kfifo_copy_out(fifo, buf, len, fifo->out + recsize); kfifo_out_copy_r() 474 return len; kfifo_out_copy_r() 478 unsigned int len, size_t recsize) __kfifo_out_peek_r() 485 return kfifo_out_copy_r(fifo, buf, len, recsize, &n); __kfifo_out_peek_r() 490 unsigned int len, size_t recsize) __kfifo_out_r() 497 len = kfifo_out_copy_r(fifo, buf, len, recsize, &n); __kfifo_out_r() 499 return len; __kfifo_out_r() 513 unsigned long len, unsigned int *copied, size_t recsize) __kfifo_from_user_r() 517 len = __kfifo_max_r(len, recsize); __kfifo_from_user_r() 519 if (len + recsize > kfifo_unused(fifo)) { __kfifo_from_user_r() 524 __kfifo_poke_n(fifo, len, recsize); __kfifo_from_user_r() 526 ret = kfifo_copy_from_user(fifo, from, len, fifo->in + recsize, copied); __kfifo_from_user_r() 531 fifo->in += len + recsize; __kfifo_from_user_r() 537 unsigned long len, unsigned int *copied, size_t recsize) __kfifo_to_user_r() 548 if (len > n) __kfifo_to_user_r() 549 len = n; __kfifo_to_user_r() 551 ret = kfifo_copy_to_user(fifo, to, len, fifo->out + recsize, copied); __kfifo_to_user_r() 562 struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_in_prepare_r() 566 len = __kfifo_max_r(len, recsize); __kfifo_dma_in_prepare_r() 568 if (len + recsize > kfifo_unused(fifo)) __kfifo_dma_in_prepare_r() 571 return setup_sgl(fifo, sgl, nents, len, fifo->in + recsize); __kfifo_dma_in_prepare_r() 576 unsigned int len, size_t recsize) __kfifo_dma_in_finish_r() 578 len = __kfifo_max_r(len, recsize); __kfifo_dma_in_finish_r() 579 __kfifo_poke_n(fifo, len, recsize); __kfifo_dma_in_finish_r() 580 fifo->in += len + recsize; __kfifo_dma_in_finish_r() 585 struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_out_prepare_r() 589 len = __kfifo_max_r(len, recsize); __kfifo_dma_out_prepare_r() 591 if (len + recsize > fifo->in - fifo->out) __kfifo_dma_out_prepare_r() 594 return setup_sgl(fifo, sgl, nents, len, fifo->out + recsize); __kfifo_dma_out_prepare_r() 600 unsigned int len; __kfifo_dma_out_finish_r() local 602 len = __kfifo_peek_n(fifo, recsize); __kfifo_dma_out_finish_r() 603 fifo->out += len + recsize; __kfifo_dma_out_finish_r() 102 kfifo_copy_in(struct __kfifo *fifo, const void *src, unsigned int len, unsigned int off) kfifo_copy_in() argument 126 __kfifo_in(struct __kfifo *fifo, const void *buf, unsigned int len) __kfifo_in() argument 141 kfifo_copy_out(struct __kfifo *fifo, void *dst, unsigned int len, unsigned int off) kfifo_copy_out() argument 165 __kfifo_out_peek(struct __kfifo *fifo, void *buf, unsigned int len) __kfifo_out_peek() argument 179 __kfifo_out(struct __kfifo *fifo, void *buf, unsigned int len) __kfifo_out() argument 188 kfifo_copy_from_user(struct __kfifo *fifo, const void __user *from, unsigned int len, unsigned int off, unsigned int *copied) kfifo_copy_from_user() argument 223 __kfifo_from_user(struct __kfifo *fifo, const void __user *from, unsigned long len, unsigned int *copied) __kfifo_from_user() argument 249 kfifo_copy_to_user(struct __kfifo *fifo, void __user *to, unsigned int len, unsigned int off, unsigned int *copied) kfifo_copy_to_user() argument 283 __kfifo_to_user(struct __kfifo *fifo, void __user *to, unsigned long len, unsigned int *copied) __kfifo_to_user() argument 308 setup_sgl_buf(struct scatterlist *sgl, void *buf, int nents, unsigned int len) setup_sgl_buf() argument 347 setup_sgl(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, unsigned int off) setup_sgl() argument 369 __kfifo_dma_in_prepare(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_in_prepare() argument 382 __kfifo_dma_out_prepare(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_out_prepare() argument 451 __kfifo_in_r(struct __kfifo *fifo, const void *buf, unsigned int len, size_t recsize) __kfifo_in_r() argument 465 kfifo_out_copy_r(struct __kfifo *fifo, void *buf, unsigned int len, size_t recsize, unsigned int *n) kfifo_out_copy_r() argument 477 __kfifo_out_peek_r(struct __kfifo *fifo, void *buf, unsigned int len, size_t recsize) __kfifo_out_peek_r() argument 489 __kfifo_out_r(struct __kfifo *fifo, void *buf, unsigned int len, size_t recsize) __kfifo_out_r() argument 512 __kfifo_from_user_r(struct __kfifo *fifo, const void __user *from, unsigned long len, unsigned int *copied, size_t recsize) __kfifo_from_user_r() argument 536 __kfifo_to_user_r(struct __kfifo *fifo, void __user *to, unsigned long len, unsigned int *copied, size_t recsize) __kfifo_to_user_r() argument 561 __kfifo_dma_in_prepare_r(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_in_prepare_r() argument 575 __kfifo_dma_in_finish_r(struct __kfifo *fifo, unsigned int len, size_t recsize) __kfifo_dma_in_finish_r() argument 584 __kfifo_dma_out_prepare_r(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_out_prepare_r() argument
|
H A D | kasprintf.c | 16 unsigned int len; kvasprintf() local 21 len = vsnprintf(NULL, 0, fmt, aq); kvasprintf() 24 p = kmalloc_track_caller(len+1, gfp); kvasprintf() 28 vsnprintf(p, len+1, fmt, ap); kvasprintf()
|
H A D | seq_buf.c | 22 * @len: The length to see if it can fit in the current buffer 25 * to fit the amount of new data according to @len. 27 static bool seq_buf_can_fit(struct seq_buf *s, size_t len) seq_buf_can_fit() argument 29 return s->len + len <= s->size; seq_buf_can_fit() 41 unsigned int len = seq_buf_used(s); seq_buf_print_seq() local 43 return seq_write(m, s->buffer, len); seq_buf_print_seq() 58 int len; seq_buf_vprintf() local 62 if (s->len < s->size) { seq_buf_vprintf() 63 len = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); seq_buf_vprintf() 64 if (s->len + len < s->size) { seq_buf_vprintf() 65 s->len += len; seq_buf_vprintf() 114 unsigned int len = seq_buf_buffer_left(s); seq_buf_bprintf() local 119 if (s->len < s->size) { seq_buf_bprintf() 120 ret = bstr_printf(s->buffer + s->len, len, fmt, binary); seq_buf_bprintf() 121 if (s->len + ret < s->size) { seq_buf_bprintf() 122 s->len += ret; seq_buf_bprintf() 142 unsigned int len = strlen(str); seq_buf_puts() local 146 if (seq_buf_can_fit(s, len)) { seq_buf_puts() 147 memcpy(s->buffer + s->len, str, len); seq_buf_puts() 148 s->len += len; seq_buf_puts() 169 s->buffer[s->len++] = c; seq_buf_putc() 180 * @len: The length of the raw memory to copy (in bytes) 188 int seq_buf_putmem(struct seq_buf *s, const void *mem, unsigned int len) seq_buf_putmem() argument 192 if (seq_buf_can_fit(s, len)) { seq_buf_putmem() 193 memcpy(s->buffer + s->len, mem, len); seq_buf_putmem() 194 s->len += len; seq_buf_putmem() 208 * @len: The length of the raw memory to copy (in bytes) 217 unsigned int len) 226 while (len) { 227 start_len = min(len, HEX_CHARS - 1); 236 if (WARN_ON_ONCE(j == 0 || j/2 > len)) 240 len -= j / 2; 290 * the content in the buffer (@s->len), which ever comes first. 297 * sequence (@s->len == @s->readpos). 303 int len; seq_buf_to_user() local 309 if (s->len <= s->readpos) seq_buf_to_user() 312 len = seq_buf_used(s) - s->readpos; seq_buf_to_user() 313 if (cnt > len) seq_buf_to_user() 314 cnt = len; seq_buf_to_user() 216 seq_buf_putmem_hex(struct seq_buf *s, const void *mem, unsigned int len) seq_buf_putmem_hex() argument
|
H A D | checksum.c | 50 static unsigned int do_csum(const unsigned char *buff, int len) do_csum() argument 55 if (len <= 0) do_csum() 64 len--; do_csum() 67 if (len >= 2) { do_csum() 70 len -= 2; do_csum() 73 if (len >= 4) { do_csum() 74 const unsigned char *end = buff + ((unsigned)len & ~3); do_csum() 86 if (len & 2) { do_csum() 91 if (len & 1) do_csum() 118 * computes the checksum of a memory block at buff, length len, 129 __wsum csum_partial(const void *buff, int len, __wsum wsum) csum_partial() argument 132 unsigned int result = do_csum(buff, len); csum_partial() 146 __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 148 return (__force __sum16)~do_csum(buff, len); ip_compute_csum() 156 csum_partial_copy_from_user(const void __user *src, void *dst, int len, csum_partial_copy_from_user() argument 161 missing = __copy_from_user(dst, src, len); csum_partial_copy_from_user() 163 memset(dst + len - missing, 0, missing); csum_partial_copy_from_user() 168 return csum_partial(dst, len, sum); csum_partial_copy_from_user() 176 csum_partial_copy(const void *src, void *dst, int len, __wsum sum) csum_partial_copy() argument 178 memcpy(dst, src, len); csum_partial_copy() 179 return csum_partial(dst, len, sum); csum_partial_copy() 194 unsigned short len, csum_tcpudp_nofold() 203 s += proto + len; csum_tcpudp_nofold() 205 s += (proto + len) << 8; csum_tcpudp_nofold() 193 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument
|
H A D | asn1_decoder.c | 60 size_t dp = *_dp, len, n; asn1_find_indefinite_length() local 93 len = data[dp++]; asn1_find_indefinite_length() 94 if (len <= 0x7f) { asn1_find_indefinite_length() 95 dp += len; asn1_find_indefinite_length() 99 if (unlikely(len == ASN1_INDEFINITE_LENGTH)) { asn1_find_indefinite_length() 107 n = len - 0x80; asn1_find_indefinite_length() 112 for (len = 0; n > 0; n--) { asn1_find_indefinite_length() 113 len <<= 8; asn1_find_indefinite_length() 114 len |= data[dp++]; asn1_find_indefinite_length() 116 dp += len; asn1_find_indefinite_length() 123 *_errmsg = "Indefinite len primitive not permitted"; asn1_find_indefinite_length() 132 *_errmsg = "Missing EOC in indefinite len cons"; asn1_find_indefinite_length() 174 size_t pc = 0, dp = 0, tdp = 0, len = 0; asn1_ber_decoder() local 255 len = data[dp++]; asn1_ber_decoder() 256 if (len > 0x7f) { asn1_ber_decoder() 257 if (unlikely(len == ASN1_INDEFINITE_LENGTH)) { asn1_ber_decoder() 265 int n = len - 0x80; asn1_ber_decoder() 271 for (len = 0; n > 0; n--) { asn1_ber_decoder() 272 len <<= 8; asn1_ber_decoder() 273 len |= data[dp++]; asn1_ber_decoder() 275 if (unlikely(len > datalen - dp)) asn1_ber_decoder() 290 datalen = dp + len; asn1_ber_decoder() 298 tag, len, flags & FLAG_CONS ? " CONS" : ""); asn1_ber_decoder() 306 ret = actions[machine[pc + 1]](context, hdr, tag, data + dp, len); asn1_ber_decoder() 314 ret = actions[machine[pc + 2]](context, hdr, tag, data + dp, len); asn1_ber_decoder() 328 data, datalen, &dp, &len, &errmsg); asn1_ber_decoder() 332 dp += len; asn1_ber_decoder() 334 pr_debug("- LEAF: %zu\n", len); asn1_ber_decoder() 378 len = datalen; asn1_ber_decoder() 381 tdp, dp, len, datalen); asn1_ber_decoder() 384 datalen = len; asn1_ber_decoder() 399 len = dp - tdp - 2; asn1_ber_decoder() 401 if (dp < len && (op & ASN1_OP_END__OF)) { asn1_ber_decoder() 402 datalen = len; asn1_ber_decoder() 408 if (dp != len) asn1_ber_decoder() 410 len -= tdp; asn1_ber_decoder() 411 pr_debug("- cons len l=%zu d=%zu\n", len, dp - tdp); asn1_ber_decoder() 420 ret = actions[act](context, hdr, 0, data + tdp, len); asn1_ber_decoder() 426 ret = actions[machine[pc + 1]](context, hdr, tag, data + tdp, len); asn1_ber_decoder() 466 errmsg = "Missing EOC in indefinite len cons"; asn1_ber_decoder() 475 errmsg = "Indefinite len primitive not permitted"; asn1_ber_decoder() 484 errmsg, pc, dp, optag, tag, len); asn1_ber_decoder()
|
/linux-4.1.27/arch/s390/include/asm/ |
H A D | pci_debug.h | 19 static inline void zpci_err_hex(void *addr, int len) zpci_err_hex() argument 21 while (len > 0) { zpci_err_hex() 22 debug_event(pci_debug_err_id, 0, (void *) addr, len); zpci_err_hex() 23 len -= pci_debug_err_id->buf_size; zpci_err_hex()
|
H A D | mman.h | 12 int s390_mmap_check(unsigned long addr, unsigned long len, unsigned long flags); 13 #define arch_mmap_check(addr, len, flags) s390_mmap_check(addr, len, flags)
|
H A D | checksum.h | 17 * computes the checksum of a memory block at buff, length len, 29 csum_partial(const void *buff, int len, __wsum sum) csum_partial() argument 32 register unsigned long reg3 asm("3") = (unsigned long) len; csum_partial() 51 int len, __wsum sum, csum_partial_copy_from_user() 54 if (unlikely(copy_from_user(dst, src, len))) csum_partial_copy_from_user() 56 return csum_partial(dst, len, sum); csum_partial_copy_from_user() 61 csum_partial_copy_nocheck (const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 63 memcpy(dst,src,len); csum_partial_copy_nocheck() 64 return csum_partial(dst, len, sum); csum_partial_copy_nocheck() 95 unsigned short len, unsigned short proto, csum_tcpudp_nofold() 108 csum += len + proto; csum_tcpudp_nofold() 109 if (csum < len + proto) csum_tcpudp_nofold() 122 unsigned short len, unsigned short proto, csum_tcpudp_magic() 125 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 133 static inline __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 135 return csum_fold(csum_partial(buff, len, 0)); ip_compute_csum() 50 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() argument 94 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument 121 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_magic() argument
|
/linux-4.1.27/arch/arm/include/uapi/asm/ |
H A D | mman.h | 3 #define arch_mmap_check(addr, len, flags) \
|
/linux-4.1.27/tools/usb/usbip/libsrc/ |
H A D | sysfs_utils.h | 6 size_t len);
|
H A D | sysfs_utils.c | 10 size_t len) write_sysfs_attribute() 21 length = write(fd, new_value, len); write_sysfs_attribute() 9 write_sysfs_attribute(const char *attr_path, const char *new_value, size_t len) write_sysfs_attribute() argument
|
/linux-4.1.27/arch/sparc/prom/ |
H A D | console_64.c | 15 static int __prom_console_write_buf(const char *buf, int len) __prom_console_write_buf() argument 25 args[5] = (unsigned int) len; __prom_console_write_buf() 36 void prom_console_write_buf(const char *buf, int len) prom_console_write_buf() argument 38 while (len) { prom_console_write_buf() 39 int n = __prom_console_write_buf(buf, len); prom_console_write_buf() 42 len -= n; prom_console_write_buf() 43 buf += len; prom_console_write_buf()
|
/linux-4.1.27/drivers/pnp/ |
H A D | support.c | 107 int len = 0, i; dbg_pnp_show_option() local 114 len += scnprintf(buf + len, sizeof(buf) - len, dbg_pnp_show_option() 119 len += scnprintf(buf + len, sizeof(buf) - len, dbg_pnp_show_option() 125 len += scnprintf(buf + len, sizeof(buf) - len, "io min %#llx " dbg_pnp_show_option() 134 len += scnprintf(buf + len, sizeof(buf) - len, "mem min %#llx " dbg_pnp_show_option() 143 len += scnprintf(buf + len, sizeof(buf) - len, "irq"); dbg_pnp_show_option() 145 len += scnprintf(buf + len, sizeof(buf) - len, dbg_pnp_show_option() 150 len += scnprintf(buf + len, dbg_pnp_show_option() 151 sizeof(buf) - len, dbg_pnp_show_option() 154 len += scnprintf(buf + len, sizeof(buf) - len, " flags %#x", dbg_pnp_show_option() 157 len += scnprintf(buf + len, sizeof(buf) - len, dbg_pnp_show_option() 162 len += scnprintf(buf + len, sizeof(buf) - len, "dma"); dbg_pnp_show_option() 164 len += scnprintf(buf + len, sizeof(buf) - len, dbg_pnp_show_option() 169 len += scnprintf(buf + len, dbg_pnp_show_option() 170 sizeof(buf) - len, dbg_pnp_show_option() 173 len += scnprintf(buf + len, sizeof(buf) - len, " (bitmask %#x) " dbg_pnp_show_option()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/include/nvkm/core/ |
H A D | option.h | 5 const char *nvkm_stropt(const char *optstr, const char *opt, int *len); 11 strncasecmpz(const char *str, const char *cmp, size_t len) strncasecmpz() argument 13 if (strlen(cmp) != len) strncasecmpz() 14 return len; strncasecmpz() 15 return strncasecmp(str, cmp, len); strncasecmpz()
|
/linux-4.1.27/drivers/staging/fbtft/ |
H A D | fbtft-io.c | 7 int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len) fbtft_write_spi() argument 11 .len = len, fbtft_write_spi() 15 fbtft_par_dbg_hex(DEBUG_WRITE, par, par->info->device, u8, buf, len, fbtft_write_spi() 16 "%s(len=%d): ", __func__, len); fbtft_write_spi() 38 * @len: Length of buffer (must be divisible by 8) 43 int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len) fbtft_write_spi_emulate_9() argument 47 size_t size = len / 2; fbtft_write_spi_emulate_9() 52 fbtft_par_dbg_hex(DEBUG_WRITE, par, par->info->device, u8, buf, len, fbtft_write_spi_emulate_9() 53 "%s(len=%d): ", __func__, len); fbtft_write_spi_emulate_9() 60 if ((len % 8) != 0) { fbtft_write_spi_emulate_9() 62 "error: len=%zu must be divisible by 8\n", len); fbtft_write_spi_emulate_9() 88 int fbtft_read_spi(struct fbtft_par *par, void *buf, size_t len) fbtft_read_spi() argument 95 .len = len, fbtft_read_spi() 106 if (len > 32) { fbtft_read_spi() 108 "len=%zu can't be larger than 32 when using 'startbyte'\n", fbtft_read_spi() 109 len); fbtft_read_spi() 115 txbuf, len, "%s(len=%d) txbuf => ", __func__, len); fbtft_read_spi() 121 fbtft_par_dbg_hex(DEBUG_READ, par, par->info->device, u8, buf, len, fbtft_read_spi() 122 "%s(len=%d) buf <= ", __func__, len); fbtft_read_spi() 132 int fbtft_write_gpio8_wr(struct fbtft_par *par, void *buf, size_t len) fbtft_write_gpio8_wr() argument 140 fbtft_par_dbg_hex(DEBUG_WRITE, par, par->info->device, u8, buf, len, fbtft_write_gpio8_wr() 141 "%s(len=%d): ", __func__, len); fbtft_write_gpio8_wr() 143 while (len--) { fbtft_write_gpio8_wr() 182 int fbtft_write_gpio16_wr(struct fbtft_par *par, void *buf, size_t len) fbtft_write_gpio16_wr() argument 190 fbtft_par_dbg_hex(DEBUG_WRITE, par, par->info->device, u8, buf, len, fbtft_write_gpio16_wr() 191 "%s(len=%d): ", __func__, len); fbtft_write_gpio16_wr() 193 while (len) { fbtft_write_gpio16_wr() 226 len -= 2; fbtft_write_gpio16_wr() 233 int fbtft_write_gpio16_wr_latched(struct fbtft_par *par, void *buf, size_t len) fbtft_write_gpio16_wr_latched() argument
|
H A D | fbtft-bus.c | 12 * void (*write_reg)(struct fbtft_par *par, int len, ...); 17 void func(struct fbtft_par *par, int len, ...) \ 25 va_start(args, len); \ 26 for (i = 0; i < len; i++) { \ 30 fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, type, buf, len, "%s: ", __func__); \ 33 va_start(args, len); \ 50 len--; \ 55 if (len) { \ 56 i = len; \ 62 ret = par->fbtftops.write(par, par->buf, len * (sizeof(type)+offset)); \ 77 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) define_fbtft_write_reg() 85 va_start(args, len); define_fbtft_write_reg() 86 for (i = 0; i < len; i++) define_fbtft_write_reg() 90 par->info->device, u8, buf, len, "%s: ", __func__); define_fbtft_write_reg() 92 if (len <= 0) define_fbtft_write_reg() 98 pad = (len % 4) ? 4 - (len % 4) : 0; define_fbtft_write_reg() 103 va_start(args, len); define_fbtft_write_reg() 105 i = len - 1; define_fbtft_write_reg() 111 ret = par->fbtftops.write(par, par->buf, (len + pad) * sizeof(u16)); define_fbtft_write_reg() 130 int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len) fbtft_write_vmem16_bus8() argument 141 fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n", fbtft_write_vmem16_bus8() 142 __func__, offset, len); fbtft_write_vmem16_bus8() 144 remain = len / 2; fbtft_write_vmem16_bus8() 152 return par->fbtftops.write(par, vmem16, len); fbtft_write_vmem16_bus8() 155 tx_array_size = par->txbuf.len / 2; fbtft_write_vmem16_bus8() 185 int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len) fbtft_write_vmem16_bus9() argument 195 fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n", fbtft_write_vmem16_bus9() 196 __func__, offset, len); fbtft_write_vmem16_bus9() 203 remain = len; fbtft_write_vmem16_bus9() 206 tx_array_size = par->txbuf.len / 2; fbtft_write_vmem16_bus9() 233 int fbtft_write_vmem8_bus8(struct fbtft_par *par, size_t offset, size_t len) fbtft_write_vmem8_bus8() argument 241 int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len) fbtft_write_vmem16_bus16() argument 245 fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n", fbtft_write_vmem16_bus16() 246 __func__, offset, len); fbtft_write_vmem16_bus16() 254 return par->fbtftops.write(par, vmem16, len); fbtft_write_vmem16_bus16()
|
/linux-4.1.27/net/sunrpc/ |
H A D | socklib.c | 24 * @len: number of bytes to copy 29 size_t xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len) xdr_skb_read_bits() argument 31 if (len > desc->count) xdr_skb_read_bits() 32 len = desc->count; xdr_skb_read_bits() 33 if (unlikely(skb_copy_bits(desc->skb, desc->offset, to, len))) xdr_skb_read_bits() 35 desc->count -= len; xdr_skb_read_bits() 36 desc->offset += len; xdr_skb_read_bits() 37 return len; xdr_skb_read_bits() 45 * @len: number of bytes to copy 49 static size_t xdr_skb_read_and_csum_bits(struct xdr_skb_reader *desc, void *to, size_t len) xdr_skb_read_and_csum_bits() argument 54 if (len > desc->count) xdr_skb_read_and_csum_bits() 55 len = desc->count; xdr_skb_read_and_csum_bits() 57 csum2 = skb_copy_and_csum_bits(desc->skb, pos, to, len, 0); xdr_skb_read_and_csum_bits() 59 desc->count -= len; xdr_skb_read_and_csum_bits() 60 desc->offset += len; xdr_skb_read_and_csum_bits() 61 return len; xdr_skb_read_and_csum_bits() 75 unsigned int len, pglen = xdr->page_len; xdr_partial_copy_from_skb() local 79 len = xdr->head[0].iov_len; xdr_partial_copy_from_skb() 80 if (base < len) { xdr_partial_copy_from_skb() 81 len -= base; xdr_partial_copy_from_skb() 82 ret = copy_actor(desc, (char *)xdr->head[0].iov_base + base, len); xdr_partial_copy_from_skb() 84 if (ret != len || !desc->count) xdr_partial_copy_from_skb() 88 base -= len; xdr_partial_copy_from_skb() 116 len = PAGE_CACHE_SIZE; xdr_partial_copy_from_skb() 119 len -= base; xdr_partial_copy_from_skb() 120 if (pglen < len) xdr_partial_copy_from_skb() 121 len = pglen; xdr_partial_copy_from_skb() 122 ret = copy_actor(desc, kaddr + base, len); xdr_partial_copy_from_skb() 125 if (pglen < len) xdr_partial_copy_from_skb() 126 len = pglen; xdr_partial_copy_from_skb() 127 ret = copy_actor(desc, kaddr, len); xdr_partial_copy_from_skb() 132 if (ret != len || !desc->count) xdr_partial_copy_from_skb() 135 } while ((pglen -= len) != 0); xdr_partial_copy_from_skb() 137 len = xdr->tail[0].iov_len; xdr_partial_copy_from_skb() 138 if (base < len) xdr_partial_copy_from_skb() 139 copied += copy_actor(desc, (char *)xdr->tail[0].iov_base + base, len - base); xdr_partial_copy_from_skb() 159 desc.count = skb->len - desc.offset; csum_partial_copy_to_xdr() 167 if (desc.offset != skb->len) { csum_partial_copy_to_xdr() 169 csum2 = skb_checksum(skb, desc.offset, skb->len - desc.offset, 0); csum_partial_copy_to_xdr()
|
H A D | xdr.c | 25 unsigned int quadlen = XDR_QUADLEN(obj->len); xdr_encode_netobj() 28 *p++ = cpu_to_be32(obj->len); xdr_encode_netobj() 29 memcpy(p, obj->data, obj->len); xdr_encode_netobj() 30 return p + XDR_QUADLEN(obj->len); xdr_encode_netobj() 37 unsigned int len; xdr_decode_netobj() local 39 if ((len = be32_to_cpu(*p++)) > XDR_MAX_NETOBJ) xdr_decode_netobj() 41 obj->len = len; xdr_decode_netobj() 43 return p + XDR_QUADLEN(len); xdr_decode_netobj() 103 u32 len; xdr_decode_string_inplace() local 105 len = be32_to_cpu(*p++); xdr_decode_string_inplace() 106 if (len > maxlen) xdr_decode_string_inplace() 108 *lenp = len; xdr_decode_string_inplace() 110 return p + XDR_QUADLEN(len); xdr_decode_string_inplace() 117 * @len: length of string, in bytes 121 xdr_terminate_string(struct xdr_buf *buf, const u32 len) xdr_terminate_string() argument 126 kaddr[buf->page_base + len] = '\0'; xdr_terminate_string() 133 struct page **pages, unsigned int base, unsigned int len) xdr_inline_pages() 144 xdr->page_len = len; xdr_inline_pages() 149 xdr->buflen += len; xdr_inline_pages() 162 * @len: number of bytes to copy 173 size_t pgfrom_base, size_t len) _shift_data_right_pages() 181 pgto_base += len; _shift_data_right_pages() 182 pgfrom_base += len; _shift_data_right_pages() 201 copy = len; _shift_data_right_pages() 219 } while ((len -= copy) != 0); _shift_data_right_pages() 227 * @len: length 233 _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len) _copy_to_pages() argument 244 if (copy > len) _copy_to_pages() 245 copy = len; _copy_to_pages() 251 len -= copy; _copy_to_pages() 252 if (len == 0) _copy_to_pages() 271 * @len: length 277 _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len) _copy_from_pages() argument 288 if (copy > len) _copy_from_pages() 289 copy = len; _copy_from_pages() 302 } while ((len -= copy) != 0); _copy_from_pages() 309 * @len: bytes to remove from buf->head[0] 312 * 'len' bytes. The extra data is not lost, but is instead 316 xdr_shrink_bufhead(struct xdr_buf *buf, size_t len) xdr_shrink_bufhead() argument 325 WARN_ON_ONCE(len > head->iov_len); xdr_shrink_bufhead() 326 if (len > head->iov_len) xdr_shrink_bufhead() 327 len = head->iov_len; xdr_shrink_bufhead() 331 if (tail->iov_len > len) { xdr_shrink_bufhead() 332 copy = tail->iov_len - len; xdr_shrink_bufhead() 333 memmove((char *)tail->iov_base + len, xdr_shrink_bufhead() 337 copy = len; xdr_shrink_bufhead() 340 offs = len - copy; xdr_shrink_bufhead() 348 buf->page_base + pglen + offs - len, xdr_shrink_bufhead() 351 if (len > pglen) { xdr_shrink_bufhead() 352 offs = copy = len - pglen; xdr_shrink_bufhead() 363 if (pglen > len) xdr_shrink_bufhead() 365 buf->page_base + len, xdr_shrink_bufhead() 367 pglen - len); xdr_shrink_bufhead() 368 copy = len; xdr_shrink_bufhead() 369 if (len > pglen) xdr_shrink_bufhead() 372 (char *)head->iov_base + head->iov_len - len, xdr_shrink_bufhead() 375 head->iov_len -= len; xdr_shrink_bufhead() 376 buf->buflen -= len; xdr_shrink_bufhead() 378 if (buf->len > buf->buflen) xdr_shrink_bufhead() 379 buf->len = buf->buflen; xdr_shrink_bufhead() 385 * @len: bytes to remove from buf->pages 388 * 'len' bytes. The extra data is not lost, but is instead 392 xdr_shrink_pagelen(struct xdr_buf *buf, size_t len) xdr_shrink_pagelen() argument 400 BUG_ON (len > pglen); xdr_shrink_pagelen() 408 if (len < free_space) xdr_shrink_pagelen() 409 free_space = len; xdr_shrink_pagelen() 412 copy = len; xdr_shrink_pagelen() 413 if (tail->iov_len > len) { xdr_shrink_pagelen() 414 char *p = (char *)tail->iov_base + len; xdr_shrink_pagelen() 415 memmove(p, tail->iov_base, tail->iov_len - len); xdr_shrink_pagelen() 420 buf->pages, buf->page_base + pglen - len, xdr_shrink_pagelen() 423 buf->page_len -= len; xdr_shrink_pagelen() 424 buf->buflen -= len; xdr_shrink_pagelen() 426 if (buf->len > buf->buflen) xdr_shrink_pagelen() 427 buf->len = buf->buflen; xdr_shrink_pagelen() 431 xdr_shift_buf(struct xdr_buf *buf, size_t len) xdr_shift_buf() argument 433 xdr_shrink_bufhead(buf, len); xdr_shift_buf() 443 return (unsigned int)(XDR_QUADLEN(xdr->buf->len) - xdr->nwords) << 2; xdr_stream_pos() 474 size_t len; xdr_init_encode() local 477 len = (char *)p - (char *)xdr->p; xdr_init_encode() 479 buf->len += len; xdr_init_encode() 480 iov->iov_len += len; xdr_init_encode() 521 if (xdr->buf->len + nbytes > xdr->buf->buflen) xdr_get_next_encode_buffer() 546 space_left = xdr->buf->buflen - xdr->buf->len; xdr_get_next_encode_buffer() 549 xdr->buf->len += nbytes; xdr_get_next_encode_buffer() 579 xdr->buf->len += nbytes; xdr_reserve_space() 587 * @len: new length of buffer 589 * Truncates the xdr stream, so that xdr->buf->len == len, 590 * and xdr->p points at offset len from the start of the buffer, and 603 void xdr_truncate_encode(struct xdr_stream *xdr, size_t len) xdr_truncate_encode() argument 611 if (len > buf->len) { xdr_truncate_encode() 617 fraglen = min_t(int, buf->len - len, tail->iov_len); xdr_truncate_encode() 619 buf->len -= fraglen; xdr_truncate_encode() 627 fraglen = min_t(int, buf->len - len, buf->page_len); xdr_truncate_encode() 629 buf->len -= fraglen; xdr_truncate_encode() 647 head->iov_len = len; xdr_truncate_encode() 648 buf->len = len; xdr_truncate_encode() 670 int end_offset = buf->len + left_in_this_buf; xdr_restrict_buflen() 672 if (newbuflen < 0 || newbuflen < buf->len) xdr_restrict_buflen() 688 * @len: length of data in bytes 692 unsigned int len) xdr_write_pages() 698 buf->page_len = len; xdr_write_pages() 704 if (len & 3) { xdr_write_pages() 705 unsigned int pad = 4 - (len & 3); xdr_write_pages() 708 iov->iov_base = (char *)xdr->p + (len & 3); xdr_write_pages() 710 len += pad; xdr_write_pages() 713 buf->buflen += len; xdr_write_pages() 714 buf->len += len; xdr_write_pages() 719 unsigned int len) xdr_set_iov() 721 if (len > iov->iov_len) xdr_set_iov() 722 len = iov->iov_len; xdr_set_iov() 724 xdr->end = (__be32*)(iov->iov_base + len); xdr_set_iov() 730 unsigned int base, unsigned int len) xdr_set_page_base() 742 if (len > maxlen) xdr_set_page_base() 743 len = maxlen; xdr_set_page_base() 754 pgend = pgoff + len; xdr_set_page_base() 770 xdr_set_iov(xdr, xdr->buf->tail, xdr->buf->len); xdr_set_next_page() 779 xdr_set_iov(xdr, xdr->buf->tail, xdr->buf->len); xdr_set_next_buffer() 795 xdr->nwords = XDR_QUADLEN(buf->len); xdr_init_decode() 797 xdr_set_iov(xdr, buf->head, buf->len); xdr_init_decode() 799 xdr_set_page_base(xdr, 0, buf->len); xdr_init_decode() 812 * @len: length in bytes of buffer in pages 815 struct page **pages, unsigned int len) xdr_init_decode_pages() 819 buf->page_len = len; xdr_init_decode_pages() 820 buf->buflen = len; xdr_init_decode_pages() 821 buf->len = len; xdr_init_decode_pages() 902 static unsigned int xdr_align_pages(struct xdr_stream *xdr, unsigned int len) xdr_align_pages() argument 906 unsigned int nwords = XDR_QUADLEN(len); xdr_align_pages() 915 xdr->nwords = XDR_QUADLEN(buf->len - cur); xdr_align_pages() 920 len = nwords << 2; xdr_align_pages() 922 if (buf->page_len <= len) xdr_align_pages() 923 len = buf->page_len; xdr_align_pages() 926 xdr_shrink_pagelen(buf, buf->page_len - len); xdr_align_pages() 927 xdr->nwords = XDR_QUADLEN(buf->len - cur); xdr_align_pages() 929 return len; xdr_align_pages() 935 * @len: number of bytes of page data 938 * into the page list. Any data that lies beyond current position + "len" 943 unsigned int xdr_read_pages(struct xdr_stream *xdr, unsigned int len) xdr_read_pages() argument 951 len = xdr_align_pages(xdr, len); xdr_read_pages() 952 if (len == 0) xdr_read_pages() 954 nwords = XDR_QUADLEN(len); xdr_read_pages() 955 padding = (nwords << 2) - len; xdr_read_pages() 970 return len; xdr_read_pages() 977 * @len: number of bytes of page data 980 * into the page list. Any data that lies beyond current position + "len" 984 void xdr_enter_page(struct xdr_stream *xdr, unsigned int len) xdr_enter_page() argument 986 len = xdr_align_pages(xdr, len); xdr_enter_page() 991 if (len != 0) xdr_enter_page() 992 xdr_set_page_base(xdr, 0, len); xdr_enter_page() 1004 buf->buflen = buf->len = iov->iov_len; xdr_buf_from_iov() 1013 * @len: length of range in bytes 1016 * length @len starting at offset @base. 1024 unsigned int base, unsigned int len) xdr_buf_subsegment() 1026 subbuf->buflen = subbuf->len = len; xdr_buf_subsegment() 1029 subbuf->head[0].iov_len = min_t(unsigned int, len, xdr_buf_subsegment() 1031 len -= subbuf->head[0].iov_len; xdr_buf_subsegment() 1039 subbuf->page_len = min(buf->page_len - base, len); xdr_buf_subsegment() 1043 len -= subbuf->page_len; xdr_buf_subsegment() 1052 subbuf->tail[0].iov_len = min_t(unsigned int, len, xdr_buf_subsegment() 1054 len -= subbuf->tail[0].iov_len; xdr_buf_subsegment() 1061 if (base || len) xdr_buf_subsegment() 1068 * xdr_buf_trim - lop at most "len" bytes off the end of "buf" 1070 * @len: number of bytes to reduce "buf" by 1077 void xdr_buf_trim(struct xdr_buf *buf, unsigned int len) xdr_buf_trim() argument 1080 unsigned int trim = len; xdr_buf_trim() 1104 buf->len -= (len - trim); xdr_buf_trim() 1108 static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len) __read_bytes_from_xdr_buf() argument 1112 this_len = min_t(unsigned int, len, subbuf->head[0].iov_len); __read_bytes_from_xdr_buf() 1114 len -= this_len; __read_bytes_from_xdr_buf() 1116 this_len = min_t(unsigned int, len, subbuf->page_len); __read_bytes_from_xdr_buf() 1119 len -= this_len; __read_bytes_from_xdr_buf() 1121 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); __read_bytes_from_xdr_buf() 1125 /* obj is assumed to point to allocated memory of size at least len: */ read_bytes_from_xdr_buf() 1126 int read_bytes_from_xdr_buf(struct xdr_buf *buf, unsigned int base, void *obj, unsigned int len) read_bytes_from_xdr_buf() argument 1131 status = xdr_buf_subsegment(buf, &subbuf, base, len); read_bytes_from_xdr_buf() 1134 __read_bytes_from_xdr_buf(&subbuf, obj, len); read_bytes_from_xdr_buf() 1139 static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len) __write_bytes_to_xdr_buf() argument 1143 this_len = min_t(unsigned int, len, subbuf->head[0].iov_len); __write_bytes_to_xdr_buf() 1145 len -= this_len; __write_bytes_to_xdr_buf() 1147 this_len = min_t(unsigned int, len, subbuf->page_len); __write_bytes_to_xdr_buf() 1150 len -= this_len; __write_bytes_to_xdr_buf() 1152 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); __write_bytes_to_xdr_buf() 1156 /* obj is assumed to point to allocated memory of size at least len: */ write_bytes_to_xdr_buf() 1157 int write_bytes_to_xdr_buf(struct xdr_buf *buf, unsigned int base, void *obj, unsigned int len) write_bytes_to_xdr_buf() argument 1162 status = xdr_buf_subsegment(buf, &subbuf, base, len); write_bytes_to_xdr_buf() 1165 __write_bytes_to_xdr_buf(&subbuf, obj, len); write_bytes_to_xdr_buf() 1201 if (xdr_decode_word(buf, offset, &obj->len)) xdr_buf_read_netobj() 1203 if (xdr_buf_subsegment(buf, &subbuf, offset + 4, obj->len)) xdr_buf_read_netobj() 1208 if (subbuf.head[0].iov_len == obj->len) xdr_buf_read_netobj() 1212 if (subbuf.tail[0].iov_len == obj->len) xdr_buf_read_netobj() 1220 if (obj->len > buf->buflen - buf->len) xdr_buf_read_netobj() 1226 __read_bytes_from_xdr_buf(&subbuf, obj->data, obj->len); xdr_buf_read_netobj() 1248 desc->elem_size > buf->len) xdr_xcode_array2() 1430 if (base >= buf->len) xdr_decode_array2() 1450 xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, xdr_process_buf() argument 1463 if (thislen > len) xdr_process_buf() 1464 thislen = len; xdr_process_buf() 1470 len -= thislen; xdr_process_buf() 1472 if (len == 0) xdr_process_buf() 1479 if (page_len > len) xdr_process_buf() 1480 page_len = len; xdr_process_buf() 1481 len -= page_len; xdr_process_buf() 1499 if (len == 0) xdr_process_buf() 1503 if (thislen > len) xdr_process_buf() 1504 thislen = len; xdr_process_buf() 1507 len -= thislen; xdr_process_buf() 1509 if (len != 0) xdr_process_buf() 132 xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset, struct page **pages, unsigned int base, unsigned int len) xdr_inline_pages() argument 172 _shift_data_right_pages(struct page **pages, size_t pgto_base, size_t pgfrom_base, size_t len) _shift_data_right_pages() argument 691 xdr_write_pages(struct xdr_stream *xdr, struct page **pages, unsigned int base, unsigned int len) xdr_write_pages() argument 718 xdr_set_iov(struct xdr_stream *xdr, struct kvec *iov, unsigned int len) xdr_set_iov() argument 729 xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) xdr_set_page_base() argument 814 xdr_init_decode_pages(struct xdr_stream *xdr, struct xdr_buf *buf, struct page **pages, unsigned int len) xdr_init_decode_pages() argument 1023 xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf, unsigned int base, unsigned int len) xdr_buf_subsegment() argument
|
/linux-4.1.27/arch/sparc/lib/ |
H A D | bitext.c | 20 * @len: requested string length 27 int bit_map_string_get(struct bit_map *t, int len, int align) bit_map_string_get() argument 48 if (len <= 0 || len > t->size) bit_map_string_get() 53 if (len < t->last_size) bit_map_string_get() 65 if (count + len > t->size) { bit_map_string_get() 68 "bitmap out: size %d used %d off %d len %d align %d count %d\n", bit_map_string_get() 69 t->size, t->used, offset, len, align, count); bit_map_string_get() 73 if (offset + len > t->size) { bit_map_string_get() 82 if (i == len) { bit_map_string_get() 83 bitmap_set(t->map, offset, len); bit_map_string_get() 87 t->first_free + len); bit_map_string_get() 88 if ((t->last_off = offset + len) >= t->size) bit_map_string_get() 90 t->used += len; bit_map_string_get() 91 t->last_size = len; bit_map_string_get() 102 void bit_map_clear(struct bit_map *t, int offset, int len) bit_map_clear() argument 106 if (t->used < len) bit_map_clear() 109 for (i = 0; i < len; i++) { bit_map_clear() 116 t->used -= len; bit_map_clear()
|
/linux-4.1.27/drivers/net/wireless/ath/ath6kl/ |
H A D | debug.c | 124 const void *buf, size_t len) ath6kl_dbg_dump() 130 print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len); ath6kl_dbg_dump() 135 buf, len); ath6kl_dbg_dump() 278 unsigned int len = 0, buf_len = 1500; read_file_war_stats() local 285 len += scnprintf(buf + len, buf_len - len, "\n"); read_file_war_stats() 286 len += scnprintf(buf + len, buf_len - len, "%25s\n", read_file_war_stats() 288 len += scnprintf(buf + len, buf_len - len, "%25s\n\n", read_file_war_stats() 290 len += scnprintf(buf + len, buf_len - len, "%20s %10u\n", read_file_war_stats() 293 if (WARN_ON(len > buf_len)) read_file_war_stats() 294 len = buf_len; read_file_war_stats() 296 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_war_stats() 309 void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len) ath6kl_debug_fwlog_event() argument 315 if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE)) ath6kl_debug_fwlog_event() 326 slot->length = cpu_to_le32(len); ath6kl_debug_fwlog_event() 327 memcpy(slot->payload, buf, len); ath6kl_debug_fwlog_event() 330 memset(slot->payload + len, 0, ATH6KL_FWLOG_PAYLOAD_SIZE - len); ath6kl_debug_fwlog_event() 377 size_t len = 0; ath6kl_fwlog_read() local 390 if (skb->len > count - len) { ath6kl_fwlog_read() 397 memcpy(buf + len, skb->data, skb->len); ath6kl_fwlog_read() 398 len += skb->len; ath6kl_fwlog_read() 405 /* FIXME: what to do if len == 0? */ ath6kl_fwlog_read() 407 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_fwlog_read() 430 size_t len = 0, not_copied; ath6kl_fwlog_block_read() local 457 if (skb->len > count - len) { ath6kl_fwlog_block_read() 464 memcpy(buf + len, skb->data, skb->len); ath6kl_fwlog_block_read() 465 len += skb->len; ath6kl_fwlog_block_read() 472 /* FIXME: what to do if len == 0? */ ath6kl_fwlog_block_read() 474 not_copied = copy_to_user(user_buf, buf, len); ath6kl_fwlog_block_read() 480 *ppos = *ppos + len; ath6kl_fwlog_block_read() 482 ret_cnt = len; ath6kl_fwlog_block_read() 503 int len; ath6kl_fwlog_mask_read() local 505 len = snprintf(buf, sizeof(buf), "0x%x\n", ar->debug.fwlog_mask); ath6kl_fwlog_mask_read() 507 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_fwlog_mask_read() 545 unsigned int len = 0, buf_len = 1500; read_file_tgt_stats() local 584 len += scnprintf(buf + len, buf_len - len, "\n"); read_file_tgt_stats() 585 len += scnprintf(buf + len, buf_len - len, "%25s\n", read_file_tgt_stats() 587 len += scnprintf(buf + len, buf_len - len, "%25s\n\n", read_file_tgt_stats() 589 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 591 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 593 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 595 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 597 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 600 len += scnprintf(buf + len, buf_len - len, read_file_tgt_stats() 603 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 605 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 607 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 609 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 611 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 613 len += scnprintf(buf + len, buf_len - len, "%25s %10llu\n\n", read_file_tgt_stats() 617 len += scnprintf(buf + len, buf_len - len, "%25s\n", read_file_tgt_stats() 619 len += scnprintf(buf + len, buf_len - len, "%25s\n", read_file_tgt_stats() 622 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 624 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", read_file_tgt_stats() 626 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 628 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 630 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 632 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 634 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 636 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 638 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 640 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 642 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 644 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 646 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 648 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 650 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n\n", read_file_tgt_stats() 653 len += scnprintf(buf + len, buf_len - len, "%25s\n", read_file_tgt_stats() 655 len += scnprintf(buf + len, buf_len - len, "%25s\n", read_file_tgt_stats() 657 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 659 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 661 len += scnprintf(buf + len, buf_len - len, "%20s %10llu\n", read_file_tgt_stats() 663 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", read_file_tgt_stats() 665 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", read_file_tgt_stats() 667 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", read_file_tgt_stats() 669 len += scnprintf(buf + len, buf_len - len, "%20s %10d\n", read_file_tgt_stats() 672 if (len > buf_len) read_file_tgt_stats() 673 len = buf_len; read_file_tgt_stats() 675 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_tgt_stats() 689 (len += scnprintf(buf + len, buf_len - len, fmt_str, \ 702 unsigned int buf_len, len = 0; read_file_credit_dist_stats() local 711 len += scnprintf(buf + len, buf_len - len, "%25s%5d\n", read_file_credit_dist_stats() 714 len += scnprintf(buf + len, buf_len - len, "%25s%5d\n", read_file_credit_dist_stats() 718 len += scnprintf(buf + len, buf_len - len, read_file_credit_dist_stats() 734 len += scnprintf(buf + len, buf_len - len, "%12d\n", read_file_credit_dist_stats() 738 if (len > buf_len) read_file_credit_dist_stats() 739 len = buf_len; read_file_credit_dist_stats() 741 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); read_file_credit_dist_stats() 754 unsigned int buf_len, unsigned int len, print_endpoint_stat() 761 len += scnprintf(buf + len, buf_len - len, "%s:", name); print_endpoint_stat() 765 len += scnprintf(buf + len, buf_len - len, " %u", *counter); print_endpoint_stat() 767 len += scnprintf(buf + len, buf_len - len, "\n"); print_endpoint_stat() 769 return len; print_endpoint_stat() 779 unsigned int buf_len, len = 0; ath6kl_endpoint_stats_read() local 790 len = print_endpoint_stat(target, buf, buf_len, len, \ ath6kl_endpoint_stats_read() 819 if (len > buf_len) ath6kl_endpoint_stats_read() 820 len = buf_len; ath6kl_endpoint_stats_read() 822 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_endpoint_stats_read() 888 unsigned int len = 0; ath6kl_regread_read() local 891 len += scnprintf(buf + len, sizeof(buf) - len, "0x%x\n", ath6kl_regread_read() 894 len += scnprintf(buf + len, sizeof(buf) - len, ath6kl_regread_read() 897 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_regread_read() 934 unsigned int len = 0, n_reg; ath6kl_regdump_open() local 962 len += scnprintf(buf + len, reg_len - len, ath6kl_regdump_open() 968 len += scnprintf(buf + len, reg_len - len, ath6kl_regdump_open() 978 len += scnprintf(buf + len, reg_len - len, ath6kl_regdump_open() 1038 unsigned int len; ath6kl_lrssi_roam_read() local 1040 len = snprintf(buf, sizeof(buf), "%u\n", ar->lrssi_roam_threshold); ath6kl_lrssi_roam_read() 1042 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_lrssi_roam_read() 1059 unsigned int len = 0; ath6kl_regwrite_read() local 1061 len = scnprintf(buf, sizeof(buf), "Addr: 0x%x Val: 0x%x\n", ath6kl_regwrite_read() 1064 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_regwrite_read() 1074 unsigned int len = 0; ath6kl_regwrite_write() local 1077 len = min(count, sizeof(buf) - 1); ath6kl_regwrite_write() 1078 if (copy_from_user(buf, user_buf, len)) ath6kl_regwrite_write() 1081 buf[len] = '\0'; ath6kl_regwrite_write() 1116 size_t len) ath6kl_debug_roam_tbl_event() 1121 if (len < sizeof(*tbl)) ath6kl_debug_roam_tbl_event() 1127 len) ath6kl_debug_roam_tbl_event() 1131 ar->debug.roam_tbl_len < (unsigned int) len) { ath6kl_debug_roam_tbl_event() 1133 ar->debug.roam_tbl = kmalloc(len, GFP_ATOMIC); ath6kl_debug_roam_tbl_event() 1138 memcpy(ar->debug.roam_tbl, buf, len); ath6kl_debug_roam_tbl_event() 1139 ar->debug.roam_tbl_len = len; ath6kl_debug_roam_tbl_event() 1158 unsigned int len, buf_len; ath6kl_roam_table_read() local 1189 len = 0; ath6kl_roam_table_read() 1190 len += scnprintf(buf + len, buf_len - len, ath6kl_roam_table_read() 1197 len += scnprintf(buf + len, buf_len - len, ath6kl_roam_table_read() 1204 if (len > buf_len) ath6kl_roam_table_read() 1205 len = buf_len; ath6kl_roam_table_read() 1207 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_roam_table_read() 1227 size_t len; ath6kl_force_roam_write() local 1230 len = min(count, sizeof(buf) - 1); ath6kl_force_roam_write() 1231 if (copy_from_user(buf, user_buf, len)) ath6kl_force_roam_write() 1233 buf[len] = '\0'; ath6kl_force_roam_write() 1259 size_t len; ath6kl_roam_mode_write() local 1262 len = min(count, sizeof(buf) - 1); ath6kl_roam_mode_write() 1263 if (copy_from_user(buf, user_buf, len)) ath6kl_roam_mode_write() 1265 buf[len] = '\0'; ath6kl_roam_mode_write() 1266 if (len > 0 && buf[len - 1] == '\n') ath6kl_roam_mode_write() 1267 buf[len - 1] = '\0'; ath6kl_roam_mode_write() 1302 int len; ath6kl_keepalive_read() local 1304 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.keepalive); ath6kl_keepalive_read() 1306 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_keepalive_read() 1347 int len; ath6kl_disconnect_timeout_read() local 1349 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.disc_timeout); ath6kl_disconnect_timeout_read() 1351 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_disconnect_timeout_read() 1388 ssize_t len; ath6kl_create_qos_write() local 1398 len = min(count, sizeof(buf) - 1); ath6kl_create_qos_write() 1399 if (copy_from_user(buf, user_buf, len)) ath6kl_create_qos_write() 1401 buf[len] = '\0'; ath6kl_create_qos_write() 1566 ssize_t len; ath6kl_delete_qos_write() local 1575 len = min(count, sizeof(buf) - 1); ath6kl_delete_qos_write() 1576 if (copy_from_user(buf, user_buf, len)) ath6kl_delete_qos_write() 1578 buf[len] = '\0'; ath6kl_delete_qos_write() 1614 ssize_t len; ath6kl_bgscan_int_write() local 1620 len = min(count, sizeof(buf) - 1); ath6kl_bgscan_int_write() 1621 if (copy_from_user(buf, user_buf, len)) ath6kl_bgscan_int_write() 1624 buf[len] = '\0'; ath6kl_bgscan_int_write() 1654 ssize_t len; ath6kl_listen_int_write() local 1660 len = min(count, sizeof(buf) - 1); ath6kl_listen_int_write() 1661 if (copy_from_user(buf, user_buf, len)) ath6kl_listen_int_write() 1664 buf[len] = '\0'; ath6kl_listen_int_write() 1685 int len; ath6kl_listen_int_read() local 1691 len = scnprintf(buf, sizeof(buf), "%u\n", vif->listen_intvl_t); ath6kl_listen_int_read() 1693 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath6kl_listen_int_read() 1710 unsigned int len = 0; ath6kl_power_params_write() local 1715 len = min(count, sizeof(buf) - 1); ath6kl_power_params_write() 1716 if (copy_from_user(buf, user_buf, len)) ath6kl_power_params_write() 1718 buf[len] = '\0'; ath6kl_power_params_write() 122 ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, const char *msg, const char *prefix, const void *buf, size_t len) ath6kl_dbg_dump() argument 753 print_endpoint_stat(struct htc_target *target, char *buf, unsigned int buf_len, unsigned int len, int offset, const char *name) print_endpoint_stat() argument 1115 ath6kl_debug_roam_tbl_event(struct ath6kl *ar, const void *buf, size_t len) ath6kl_debug_roam_tbl_event() argument
|
/linux-4.1.27/arch/x86/um/asm/ |
H A D | checksum_32.h | 8 static inline __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 10 return csum_fold (csum_partial(buff, len, 0)); ip_compute_csum() 16 __u32 len, unsigned short proto, csum_ipv6_magic() 33 "r"(htonl(len)), "r"(htonl(proto)), "0"(sum)); csum_ipv6_magic() 44 int len, __wsum sum, int *err_ptr) csum_and_copy_to_user() 46 if (access_ok(VERIFY_WRITE, dst, len)) { csum_and_copy_to_user() 47 if (copy_to_user(dst, src, len)) { csum_and_copy_to_user() 52 return csum_partial(src, len, sum); csum_and_copy_to_user() 55 if (len) csum_and_copy_to_user() 14 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum sum) csum_ipv6_magic() argument 42 csum_and_copy_to_user(const void *src, void __user *dst, int len, __wsum sum, int *err_ptr) csum_and_copy_to_user() argument
|
H A D | checksum_64.h | 17 extern __sum16 ip_compute_csum(const void *buff, int len);
|
/linux-4.1.27/arch/arm/lib/ |
H A D | csumpartial.S | 16 * Function: __u32 csum_partial(const char *src, int len, __u32 sum) 17 * Params : r0 = buffer, r1 = len, r2 = checksum 22 len .req r1 label 37 .Lless8: teq len, #0 @ check for zero count 44 subne len, len, #1 47 .Lless4: tst len, #6 55 sub len, len, #2 59 sub len, len, #2 67 tst len, #6 70 .Lless8_byte: tst len, #1 @ odd number of bytes 82 subne len, len, #1 88 subne len, len, #2 92 subne len, len, #2 104 cmp len, #8 @ Ensure that we have at least 114 1: bics ip, len, #31 133 3: tst len, #0x1c @ should not change C 137 sub len, len, #4 139 tst len, #0x1c
|
H A D | csumpartialcopygeneric.S | 14 * csum_partial_copy_xxx(const char *src, char *dst, int len, int sum, ) 15 * r0 = src, r1 = dst, r2 = len, r3 = sum 23 len .req r2 label 40 sub len, len, #1 47 sub len, len, #2 58 .Lless8: teq len, #0 @ check for zero count 67 sub len, len, #1 70 tst len, #6 74 sub len, len, #2 80 tst len, #6 83 tst len, #1 93 cmp len, #8 @ Ensure that we have at least 111 bics ip, len, #15 124 2: ands ip, len, #12 139 4: ands len, len, #3 142 tst len, #2 150 .Lexit: tst len, #1 176 bics ip, len, #15 195 2: ands ip, len, #12 214 4: ands len, len, #3 217 tst len, #2 228 bics ip, len, #15 247 2: ands ip, len, #12 266 4: ands len, len, #3 269 tst len, #2 275 tst len, #1 282 bics ip, len, #15 301 2: ands ip, len, #12 320 4: ands len, len, #3 323 tst len, #2
|
/linux-4.1.27/arch/mn10300/lib/ |
H A D | checksum.c | 36 __wsum csum_partial(const void *buff, int len, __wsum sum) csum_partial() argument 40 result = do_csum(buff, len); csum_partial() 48 __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 50 return ~from32to16(do_csum(buff, len)); ip_compute_csum() 54 __wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum) csum_partial_copy() argument 56 copy_from_user(dst, src, len); csum_partial_copy() 57 return csum_partial(dst, len, sum); csum_partial_copy() 62 int len, __wsum sum) csum_partial_copy_nocheck() 64 sum = csum_partial(src, len, sum); csum_partial_copy_nocheck() 65 memcpy(dst, src, len); csum_partial_copy_nocheck() 71 int len, __wsum sum, csum_partial_copy_from_user() 76 missing = copy_from_user(dst, src, len); csum_partial_copy_from_user() 78 memset(dst + len - missing, 0, missing); csum_partial_copy_from_user() 82 return csum_partial(dst, len, sum); csum_partial_copy_from_user() 87 int len, __wsum sum, csum_and_copy_to_user() 92 missing = copy_to_user(dst, src, len); csum_and_copy_to_user() 94 memset(dst + len - missing, 0, missing); csum_and_copy_to_user() 98 return csum_partial(src, len, sum); csum_and_copy_to_user() 61 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 70 csum_partial_copy_from_user(const void *src, void *dst, int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() argument 86 csum_and_copy_to_user(const void *src, void *dst, int len, __wsum sum, int *err_ptr) csum_and_copy_to_user() argument
|
/linux-4.1.27/fs/hpfs/ |
H A D | name.c | 41 int hpfs_chk_name(const unsigned char *name, unsigned *len) hpfs_chk_name() argument 44 if (*len > 254) return -ENAMETOOLONG; hpfs_chk_name() 45 hpfs_adjust_length(name, len); hpfs_chk_name() 46 if (!*len) return -EINVAL; hpfs_chk_name() 47 for (i = 0; i < *len; i++) if (not_allowed_char(name[i])) return -EINVAL; hpfs_chk_name() 48 if (*len == 1) if (name[0] == '.') return -EINVAL; hpfs_chk_name() 49 if (*len == 2) if (name[0] == '.' && name[1] == '.') return -EINVAL; hpfs_chk_name() 54 unsigned len, int lc, int lng) hpfs_translate_name() 58 if (hpfs_sb(s)->sb_chk >= 2) if (hpfs_is_name_long(from, len) != lng) { hpfs_translate_name() 60 for (i = 0; i < len; i++) hpfs_translate_name() 66 if (!(to = kmalloc(len, GFP_KERNEL))) { hpfs_translate_name() 70 for (i = 0; i < len; i++) to[i] = locase(hpfs_sb(s)->sb_cp_table,from[i]); hpfs_translate_name() 92 int hpfs_is_name_long(const unsigned char *name, unsigned len) hpfs_is_name_long() argument 95 for (i = 0; i < len && name[i] != '.'; i++) hpfs_is_name_long() 98 if (i == len) return 0; hpfs_is_name_long() 99 for (j = i + 1; j < len; j++) hpfs_is_name_long() 106 void hpfs_adjust_length(const unsigned char *name, unsigned *len) hpfs_adjust_length() argument 108 if (!*len) return; hpfs_adjust_length() 109 if (*len == 1 && name[0] == '.') return; hpfs_adjust_length() 110 if (*len == 2 && name[0] == '.' && name[1] == '.') return; hpfs_adjust_length() 111 while (*len && (name[*len - 1] == '.' || name[*len - 1] == ' ')) hpfs_adjust_length() 112 (*len)--; hpfs_adjust_length() 53 hpfs_translate_name(struct super_block *s, unsigned char *from, unsigned len, int lc, int lng) hpfs_translate_name() argument
|
H A D | ea.c | 14 void hpfs_ea_ext_remove(struct super_block *s, secno a, int ano, unsigned len) hpfs_ea_ext_remove() argument 17 while (pos < len) { hpfs_ea_ext_remove() 20 if (pos + 4 > len) { hpfs_ea_ext_remove() 21 hpfs_error(s, "EAs don't end correctly, %s %08x, len %08x", hpfs_ea_ext_remove() 22 ano ? "anode" : "sectors", a, len); hpfs_ea_ext_remove() 38 if (!ano) hpfs_free_sectors(s, a, (len+511) >> 9); hpfs_ea_ext_remove() 77 int ano, len; hpfs_read_ea() local 93 len = le32_to_cpu(fnode->ea_size_l); hpfs_read_ea() 96 while (pos < len) { hpfs_read_ea() 98 if (pos + 4 > len) { hpfs_read_ea() 99 hpfs_error(s, "EAs don't end correctly, %s %08x, len %08x", hpfs_read_ea() 100 ano ? "anode" : "sectors", a, len); hpfs_read_ea() 133 int ano, len; hpfs_get_ea() local 150 len = le32_to_cpu(fnode->ea_size_l); hpfs_get_ea() 153 while (pos < len) { hpfs_get_ea() 156 if (pos + 4 > len) { hpfs_get_ea() 157 hpfs_error(s, "EAs don't end correctly, %s %08x, len %08x", hpfs_get_ea() 158 ano ? "anode" : "sectors", a, len); hpfs_get_ea() 195 int ano, len; hpfs_set_ea() local 211 len = le32_to_cpu(fnode->ea_size_l); hpfs_set_ea() 214 while (pos < len) { hpfs_set_ea() 217 if (pos + 4 > len) { hpfs_set_ea() 218 hpfs_error(s, "EAs don't end correctly, %s %08x, len %08x", hpfs_set_ea() 219 ano ? "anode" : "sectors", a, len); hpfs_set_ea() 284 len = (le32_to_cpu(fnode->ea_size_l) + 511) >> 9; hpfs_set_ea() 286 while (((pos + 511) >> 9) > len) { hpfs_set_ea() 287 if (!len) { hpfs_set_ea() 292 len++; hpfs_set_ea() 294 if (hpfs_alloc_if_possible(s, le32_to_cpu(fnode->ea_secno) + len)) { hpfs_set_ea() 295 len++; hpfs_set_ea() 310 anode->u.external[0].length = cpu_to_le32(len); hpfs_set_ea() 319 for (i = 0; i < len; i++) { hpfs_set_ea() 322 if (!(b1 = hpfs_map_sector(s, le32_to_cpu(fnode->ea_secno) + i, &bh1, len - i - 1))) { hpfs_set_ea() 336 hpfs_free_sectors(s, le32_to_cpu(fnode->ea_secno), len); hpfs_set_ea() 338 len = (pos + 511) >> 9; hpfs_set_ea() 343 0, len) != -1) { hpfs_set_ea() 344 len++; hpfs_set_ea() 364 else hpfs_free_sectors(s, le32_to_cpu(fnode->ea_secno) + ((le32_to_cpu(fnode->ea_size_l) + 511) >> 9), len - ((le32_to_cpu(fnode->ea_size_l) + 511) >> 9)); hpfs_set_ea()
|
/linux-4.1.27/Documentation/spi/ |
H A D | spidev_fdx.c | 17 static void do_read(int fd, int len) do_read() argument 23 if (len < 2) do_read() 24 len = 2; do_read() 25 else if (len > sizeof(buf)) do_read() 26 len = sizeof(buf); do_read() 29 status = read(fd, buf, len); do_read() 34 if (status != len) { do_read() 39 printf("read(%2d, %2d): %02x %02x,", len, status, do_read() 48 static void do_msg(int fd, int len) do_msg() argument 57 if (len > sizeof buf) do_msg() 58 len = sizeof buf; do_msg() 62 xfer[0].len = 1; do_msg() 65 xfer[1].len = len; do_msg() 73 printf("response(%2d, %2d): ", len, status); do_msg() 74 for (bp = buf; len; len--) do_msg()
|
/linux-4.1.27/fs/cachefiles/ |
H A D | key.c | 42 int loop, len, max, seg, mark, print; cachefiles_cook_key() local 85 len = 0; cachefiles_cook_key() 89 len = 5; cachefiles_cook_key() 90 mark = len - 1; cachefiles_cook_key() 96 key[len + 1] = cachefiles_charmap[acc & 63]; cachefiles_cook_key() 98 key[len] = cachefiles_charmap[acc & 63]; cachefiles_cook_key() 99 len += 2; cachefiles_cook_key() 104 key[len++] = '\0'; cachefiles_cook_key() 105 mark = len; cachefiles_cook_key() 106 key[len++] = '+'; cachefiles_cook_key() 110 key[len++] = *raw++; cachefiles_cook_key() 111 ASSERT(len < max); cachefiles_cook_key() 123 key[len++] = '\0'; cachefiles_cook_key() 124 mark = len; cachefiles_cook_key() 125 key[len++] = '+'; cachefiles_cook_key() 135 key[len++] = cachefiles_charmap[acc & 63]; cachefiles_cook_key() 137 key[len++] = cachefiles_charmap[acc & 63]; cachefiles_cook_key() 139 key[len++] = cachefiles_charmap[acc & 63]; cachefiles_cook_key() 141 key[len++] = cachefiles_charmap[acc & 63]; cachefiles_cook_key() 143 ASSERT(len < max); cachefiles_cook_key() 154 key[len++] = 0; cachefiles_cook_key() 155 key[len] = 0; cachefiles_cook_key() 157 _leave(" = %p %d", key, len); cachefiles_cook_key()
|
/linux-4.1.27/arch/um/drivers/ |
H A D | mconsole_user.c | 81 int len; mconsole_get_request() local 84 req->len = recvfrom(fd, &req->request, sizeof(req->request), 0, mconsole_get_request() 86 if (req->len < 0) mconsole_get_request() 93 len = MIN(sizeof(req->request.data) - 1, mconsole_get_request() 95 memmove(req->request.data, &req->request, len); mconsole_get_request() 96 req->request.data[len] = '\0'; mconsole_get_request() 100 req->request.len = len; mconsole_get_request() 107 if (req->request.len >= MCONSOLE_MAX_DATA) { mconsole_get_request() 116 req->request.data[req->request.len] = '\0'; mconsole_get_request() 135 int len, n; mconsole_reply_len() local 143 len = MIN(total, MCONSOLE_MAX_DATA - 1); mconsole_reply_len() 145 if (len == total) reply.more = more; mconsole_reply_len() 148 memcpy(reply.data, str, len); mconsole_reply_len() 149 reply.data[len] = '\0'; mconsole_reply_len() 150 total -= len; mconsole_reply_len() 151 str += len; mconsole_reply_len() 152 reply.len = len + 1; mconsole_reply_len() 154 len = sizeof(reply) + reply.len - sizeof(reply.data); mconsole_reply_len() 156 n = sendto(req->originating_fd, &reply, len, 0, mconsole_reply_len() 179 int mconsole_notify(char *sock_name, int type, const void *data, int len) mconsole_notify() argument 205 len = (len > sizeof(packet.data)) ? sizeof(packet.data) : len; mconsole_notify() 206 packet.len = len; mconsole_notify() 207 memcpy(packet.data, data, len); mconsole_notify() 210 len = sizeof(packet) + packet.len - sizeof(packet.data); mconsole_notify() 211 n = sendto(notify_sock, &packet, len, 0, (struct sockaddr *) &target, mconsole_notify()
|
H A D | pcap_user.c | 95 int len; member in struct:pcap_handler_data 101 int len; handler() local 105 len = hdata->len < header->caplen ? hdata->len : header->caplen; handler() 106 memcpy(hdata->buffer, packet, len); handler() 107 hdata->len = len; handler() 110 int pcap_user_read(int fd, void *buffer, int len, struct pcap_data *pri) pcap_user_read() argument 114 .len = len }); pcap_user_read() 125 return hdata.len; pcap_user_read()
|
H A D | slip.h | 17 extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri); 18 extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri);
|
/linux-4.1.27/arch/arm/crypto/ |
H A D | sha1.h | 8 unsigned int len); 11 unsigned int len, u8 *out);
|
H A D | sha256_glue.h | 9 unsigned int len); 12 unsigned int len, u8 *hash);
|
H A D | sha1-ce-glue.c | 31 unsigned int len) sha1_ce_update() 36 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE) sha1_ce_update() 37 return sha1_update_arm(desc, data, len); sha1_ce_update() 40 sha1_base_do_update(desc, data, len, sha1_ce_transform); sha1_ce_update() 47 unsigned int len, u8 *out) sha1_ce_finup() 50 return sha1_finup_arm(desc, data, len, out); sha1_ce_finup() 53 if (len) sha1_ce_finup() 54 sha1_base_do_update(desc, data, len, sha1_ce_transform); sha1_ce_finup() 30 sha1_ce_update(struct shash_desc *desc, const u8 *data, unsigned int len) sha1_ce_update() argument 46 sha1_ce_finup(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *out) sha1_ce_finup() argument
|
/linux-4.1.27/drivers/media/common/b2c2/ |
H A D | flexcop-eeprom.c | 10 static int eeprom_write(struct adapter *adapter, u16 addr, u8 *buf, u16 len) 12 return flex_i2c_write(adapter, 0x20000000, 0x50, addr, buf, len); 16 u32 len, u8 *wbuf, u8 *rbuf, int retries) 21 if (eeprom_write(adapter, addr, wbuf, len) == len) { 22 if (eeprom_lrc_read(adapter, addr, len, rbuf, retries) == 1) 31 static int eeprom_writeKey(struct adapter *adapter, u8 *key, u32 len) 36 if (len != 16) 39 memcpy(wbuf, key, len); 47 static int eeprom_readKey(struct adapter *adapter, u8 *key, u32 len) 51 if (len != 16) 57 memcpy(key, buf, len); 90 u16 addr, u8 *buf, u16 len) 92 return fc->i2c_request(fc,FC_READ,FC_I2C_PORT_EEPROM,0x50,addr,buf,len); 97 static u8 calc_lrc(u8 *buf, int len) calc_lrc() argument 101 for (i = 0; i < len; i++) calc_lrc() 107 flexcop_access_op_t op, u16 addr, u8 *buf, u16 len, int retries) flexcop_eeprom_request() 113 addr & 0xff, buf, len); flexcop_eeprom_request() 121 u8 *buf, u16 len, int retries) flexcop_eeprom_lrc_read() 123 int ret = flexcop_eeprom_request(fc, FC_READ, addr, buf, len, retries); flexcop_eeprom_lrc_read() 125 if (calc_lrc(buf, len - 1) != buf[len - 1]) flexcop_eeprom_lrc_read() 106 flexcop_eeprom_request(struct flexcop_device *fc, flexcop_access_op_t op, u16 addr, u8 *buf, u16 len, int retries) flexcop_eeprom_request() argument 120 flexcop_eeprom_lrc_read(struct flexcop_device *fc, u16 addr, u8 *buf, u16 len, int retries) flexcop_eeprom_lrc_read() argument
|
/linux-4.1.27/include/net/ |
H A D | udplite.h | 20 int len, int odd, struct sk_buff *skb) udplite_getfrag() 23 return copy_from_iter(to, len, &msg->msg_iter) != len ? -EFAULT : 0; udplite_getfrag() 48 cscov = ntohs(uh->len); udplite_checksum_init() 52 else if (cscov < 8 || cscov > skb->len) { udplite_checksum_init() 57 cscov, skb->len); udplite_checksum_init() 60 } else if (cscov < skb->len) { udplite_checksum_init() 74 int cscov = up->len; udplite_csum_outgoing() 82 if (up->pcslen < up->len) { udplite_csum_outgoing() 85 udp_hdr(skb)->len = htons(up->pcslen); udplite_csum_outgoing() 88 * NOTE: Causes for the error case `up->pcslen > up->len': udplite_csum_outgoing() 103 const int len = skb->len - off; udplite_csum_outgoing() local 105 csum = skb_checksum(skb, off, (cscov > len)? len : cscov, csum); udplite_csum_outgoing() 107 if ((cscov -= len) <= 0) udplite_csum_outgoing() 118 int len = skb->len - off; udplite_csum() local 120 if ((up->pcflag & UDPLITE_SEND_CC) && up->pcslen < len) { udplite_csum() 122 len = up->pcslen; udplite_csum() 123 udp_hdr(skb)->len = htons(up->pcslen); udplite_csum() 127 return skb_checksum(skb, off, len, 0); udplite_csum() 19 udplite_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb) udplite_getfrag() argument
|
/linux-4.1.27/drivers/iio/common/st_sensors/ |
H A D | st_sensors_buffer.c | 28 int i, n = 0, len; st_sensors_get_buffer_element() local 36 len = -ENOMEM; st_sensors_get_buffer_element() 48 len = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev, st_sensors_get_buffer_element() 53 len = sdata->tf->read_multiple_byte(&sdata->tb, st_sensors_get_buffer_element() 61 len = -ENOMEM; st_sensors_get_buffer_element() 65 len = sdata->tf->read_multiple_byte(&sdata->tb, st_sensors_get_buffer_element() 69 if (len < 0) { st_sensors_get_buffer_element() 81 len = byte_for_channel * n; st_sensors_get_buffer_element() 85 len = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev, st_sensors_get_buffer_element() 90 len = -EINVAL; st_sensors_get_buffer_element() 93 if (len != byte_for_channel * n) { st_sensors_get_buffer_element() 94 len = -EIO; st_sensors_get_buffer_element() 101 return len; st_sensors_get_buffer_element() 107 int len; st_sensors_trigger_handler() local 112 len = st_sensors_get_buffer_element(indio_dev, sdata->buffer_data); st_sensors_trigger_handler() 113 if (len < 0) st_sensors_trigger_handler()
|
H A D | st_sensors_spi.c | 30 struct device *dev, u8 reg_addr, int len, u8 *data, bool multiread_bit) st_sensors_spi_read() 38 .len = 1, st_sensors_spi_read() 43 .len = len, st_sensors_spi_read() 48 if ((multiread_bit) && (len > 1)) st_sensors_spi_read() 57 memcpy(data, tb->rx_buf, len); st_sensors_spi_read() 59 return len; st_sensors_spi_read() 74 u8 reg_addr, int len, u8 *data, bool multiread_bit) st_sensors_spi_read_multiple_byte() 76 return st_sensors_spi_read(tb, dev, reg_addr, len, data, multiread_bit); st_sensors_spi_read_multiple_byte() 87 .len = 2, st_sensors_spi_write_byte() 29 st_sensors_spi_read(struct st_sensor_transfer_buffer *tb, struct device *dev, u8 reg_addr, int len, u8 *data, bool multiread_bit) st_sensors_spi_read() argument 72 st_sensors_spi_read_multiple_byte( struct st_sensor_transfer_buffer *tb, struct device *dev, u8 reg_addr, int len, u8 *data, bool multiread_bit) st_sensors_spi_read_multiple_byte() argument
|
/linux-4.1.27/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ |
H A D | vmap.h | 6 u16 nvbios_vmap_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 7 u16 nvbios_vmap_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, 18 u16 nvbios_vmap_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len); 19 u16 nvbios_vmap_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len,
|
H A D | volt.h | 11 u16 nvbios_volt_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 12 u16 nvbios_volt_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, 20 u16 nvbios_volt_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len); 21 u16 nvbios_volt_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len,
|
H A D | timing.h | 6 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz); 8 u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 10 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ramcfg *);
|
H A D | M0205.h | 8 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz); 10 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz, 18 u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 20 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_M0205E *);
|
H A D | dp.h | 12 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, 15 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, 27 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_dpcfg *); 30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_dpcfg *);
|
H A D | rammap.h | 6 u8 *cnt, u8 *len, u8 *snr, u8 *ssz); 9 u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 11 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ramcfg *); 13 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ramcfg *);
|
H A D | xpio.h | 15 u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 17 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_xpio *);
|
H A D | perf.h | 4 u8 *cnt, u8 *len, u8 *snr, u8 *ssz); 19 u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 21 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_perfE *); 32 u8 *ver, u8 *hdr, u8 cnt, u8 len); 34 u8 *ver, u8 *hdr, u8 cnt, u8 len, struct nvbios_perfS *);
|
/linux-4.1.27/include/uapi/linux/tc_ematch/ |
H A D | tc_em_nbyte.h | 9 __u16 len:12; member in struct:tcf_em_nbyte
|
/linux-4.1.27/arch/avr32/mach-at32ap/include/mach/ |
H A D | sram.h | 17 static inline unsigned long sram_alloc(size_t len) sram_alloc() argument 22 return gen_pool_alloc(sram_pool, len); sram_alloc() 25 static inline void sram_free(unsigned long addr, size_t len) sram_free() argument 27 return gen_pool_free(sram_pool, addr, len); sram_free()
|
/linux-4.1.27/arch/um/kernel/skas/ |
H A D | uaccess.c | 59 static int do_op_one_page(unsigned long addr, int len, int is_write, do_op_one_page() argument 60 int (*op)(unsigned long addr, int len, void *arg), void *arg) do_op_one_page() 79 n = (*op)(addr, len, arg); do_op_one_page() 90 static int buffer_op(unsigned long addr, int len, int is_write, buffer_op() argument 95 size = min(PAGE_ALIGN(addr) - addr, (unsigned long) len); buffer_op() 96 remain = len; buffer_op() 133 static int copy_chunk_from_user(unsigned long from, int len, void *arg) copy_chunk_from_user() argument 137 memcpy((void *) to, (void *) from, len); copy_chunk_from_user() 138 *to_ptr += len; copy_chunk_from_user() 155 static int copy_chunk_to_user(unsigned long to, int len, void *arg) copy_chunk_to_user() argument 159 memcpy((void *) to, (void *) from, len); copy_chunk_to_user() 160 *from_ptr += len; copy_chunk_to_user() 177 static int strncpy_chunk_from_user(unsigned long from, int len, void *arg) strncpy_chunk_from_user() argument 182 strncpy(to, (void *) from, len); strncpy_chunk_from_user() 183 n = strnlen(to, len); strncpy_chunk_from_user() 186 if (n < len) strncpy_chunk_from_user() 212 static int clear_chunk(unsigned long addr, int len, void *unused) clear_chunk() argument 214 memset((void *) addr, 0, len); clear_chunk() 218 int __clear_user(void __user *mem, int len) __clear_user() argument 220 return buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL); __clear_user() 223 int clear_user(void __user *mem, int len) clear_user() argument 226 memset((__force void*)mem, 0, len); clear_user() 230 return access_ok(VERIFY_WRITE, mem, len) ? clear_user() 231 buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL) : len; clear_user() 235 static int strnlen_chunk(unsigned long str, int len, void *arg) strnlen_chunk() argument 239 n = strnlen((void *) str, len); strnlen_chunk() 242 if (n < len) strnlen_chunk() 247 int strnlen_user(const void __user *str, int len) strnlen_user() argument 252 return strnlen((__force char*)str, len) + 1; strnlen_user() 254 n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count); strnlen_user()
|
/linux-4.1.27/drivers/s390/cio/ |
H A D | qdio_debug.h | 34 static inline void DBF_HEX(void *addr, int len) DBF_HEX() argument 36 while (len > 0) { DBF_HEX() 37 debug_event(qdio_dbf_setup, DBF_ERR, addr, len); DBF_HEX() 38 len -= qdio_dbf_setup->buf_size; DBF_HEX() 50 static inline void DBF_ERROR_HEX(void *addr, int len) DBF_ERROR_HEX() argument 52 while (len > 0) { DBF_ERROR_HEX() 53 debug_event(qdio_dbf_error, DBF_ERR, addr, len); DBF_ERROR_HEX() 54 len -= qdio_dbf_error->buf_size; DBF_ERROR_HEX() 69 int len, int level) DBF_DEV_HEX() 71 while (len > 0) { DBF_DEV_HEX() 72 debug_event(dev->debug_area, level, addr, len); DBF_DEV_HEX() 73 len -= dev->debug_area->buf_size; DBF_DEV_HEX() 68 DBF_DEV_HEX(struct qdio_irq *dev, void *addr, int len, int level) DBF_DEV_HEX() argument
|
/linux-4.1.27/arch/sh/lib/ |
H A D | io.c | 17 void __raw_readsl(const void __iomem *addr, void *datap, int len) __raw_readsl() argument 21 for (data = datap; (len != 0) && (((u32)data & 0x1f) != 0); len--) __raw_readsl() 24 if (likely(len >= (0x20 >> 2))) { __raw_readsl() 47 "cmp/hi %1, %2 ! T if 32 > len \n\t" __raw_readsl() 54 : "=&r" (data), "=&r" (len), __raw_readsl() 57 : "r"(addr), "0" (data), "1" (len) __raw_readsl() 61 for (; len != 0; len--) __raw_readsl() 66 void __raw_writesl(void __iomem *addr, const void *data, int len) __raw_writesl() argument 68 if (likely(len != 0)) { __raw_writesl() 78 : "0" (data), "r" (len), "r"(addr) __raw_writesl()
|
/linux-4.1.27/fs/f2fs/ |
H A D | hash.c | 45 static void str2hashbuf(const unsigned char *msg, size_t len, str2hashbuf() argument 51 pad = (__u32)len | ((__u32)len << 8); str2hashbuf() 55 if (len > num * 4) str2hashbuf() 56 len = num * 4; str2hashbuf() 57 for (i = 0; i < len; i++) { str2hashbuf() 80 size_t len = name_info->len; f2fs_dentry_hash() local 82 if ((len <= 2) && (name[0] == '.') && f2fs_dentry_hash() 94 str2hashbuf(p, len, in, 4); f2fs_dentry_hash() 97 if (len <= 16) f2fs_dentry_hash() 99 len -= 16; f2fs_dentry_hash()
|
/linux-4.1.27/include/linux/ceph/ |
H A D | ceph_hash.h | 7 extern unsigned ceph_str_hash_linux(const char *s, unsigned len); 8 extern unsigned ceph_str_hash_rjenkins(const char *s, unsigned len); 10 extern unsigned ceph_str_hash(int type, const char *s, unsigned len);
|
H A D | decode.h | 108 u32 len; ceph_extract_encoded_string() local 112 ceph_decode_32_safe(&sp, end, len, bad); ceph_extract_encoded_string() 113 if (!ceph_has_room(&sp, end, len)) ceph_extract_encoded_string() 116 buf = kmalloc(len + 1, gfp); ceph_extract_encoded_string() 120 if (len) ceph_extract_encoded_string() 121 memcpy(buf, sp, len); ceph_extract_encoded_string() 122 buf[len] = '\0'; ceph_extract_encoded_string() 124 *p = (char *) *p + sizeof (u32) + len; ceph_extract_encoded_string() 126 *lenp = (size_t) len; ceph_extract_encoded_string() 188 static inline void ceph_encode_copy(void **p, const void *s, int len) ceph_encode_copy() argument 190 memcpy(*p, s, len); ceph_encode_copy() 191 *p += len; ceph_encode_copy() 200 u32 len = path ? strlen(path) : 0; ceph_encode_filepath() local 201 BUG_ON(*p + 1 + sizeof(ino) + sizeof(len) + len > end); ceph_encode_filepath() 204 ceph_encode_32(p, len); ceph_encode_filepath() 205 if (len) ceph_encode_filepath() 206 memcpy(*p, path, len); ceph_encode_filepath() 207 *p += len; ceph_encode_filepath() 211 const char *s, u32 len) ceph_encode_string() 213 BUG_ON(*p + sizeof(len) + len > end); ceph_encode_string() 214 ceph_encode_32(p, len); ceph_encode_string() 215 if (len) ceph_encode_string() 216 memcpy(*p, s, len); ceph_encode_string() 217 *p += len; ceph_encode_string() 210 ceph_encode_string(void **p, void *end, const char *s, u32 len) ceph_encode_string() argument
|
/linux-4.1.27/net/dccp/ |
H A D | options.c | 26 u64 dccp_decode_value_var(const u8 *bf, const u8 len) dccp_decode_value_var() argument 30 if (len >= DCCP_OPTVAL_MAXLEN) dccp_decode_value_var() 32 if (len > 4) dccp_decode_value_var() 34 if (len > 3) dccp_decode_value_var() 36 if (len > 2) dccp_decode_value_var() 38 if (len > 1) dccp_decode_value_var() 40 if (len > 0) dccp_decode_value_var() 62 unsigned char opt, len; dccp_parse_options() local 71 opt = len = 0; dccp_parse_options() 74 len = 0; dccp_parse_options() 82 len = *opt_ptr++; dccp_parse_options() 83 if (len < 2) dccp_parse_options() 86 * Remove the type and len fields, leaving dccp_parse_options() 89 len -= 2; dccp_parse_options() 91 opt_ptr += len; dccp_parse_options() 116 if (len > 6) dccp_parse_options() 119 opt_recv->dccpor_ndp = dccp_decode_value_var(value, len); dccp_parse_options() 126 if (len == 0) dccp_parse_options() 129 *value, value + 1, len - 1); dccp_parse_options() 134 if (len != 4) dccp_parse_options() 163 if (len != 4 && len != 6 && len != 8) dccp_parse_options() 169 dccp_pr_debug("%s rx opt: TIMESTAMP_ECHO=%u, len=%d, " dccp_parse_options() 172 len + 2, dccp_parse_options() 178 if (len == 4) { /* no elapsed time included */ dccp_parse_options() 183 if (len == 6) { /* 2-byte elapsed time */ dccp_parse_options() 201 if (len == 2) { dccp_parse_options() 204 } else if (len == 4) { dccp_parse_options() 219 pkt_type, opt, value, len)) dccp_parse_options() 234 pkt_type, opt, value, len)) dccp_parse_options() 238 DCCP_CRIT("DCCP(%p): option %d(len=%d) not " dccp_parse_options() 239 "implemented, ignoring", sk, opt, len); dccp_parse_options() 259 DCCP_WARN("DCCP(%p): Option %d (len=%d) error=%u\n", sk, opt, len, rc); dccp_parse_options() 262 DCCP_SKB_CB(skb)->dccpd_reset_data[1] = len > 0 ? value[0] : 0; dccp_parse_options() 263 DCCP_SKB_CB(skb)->dccpd_reset_data[2] = len > 1 ? value[1] : 0; dccp_parse_options() 269 void dccp_encode_value_var(const u64 value, u8 *to, const u8 len) dccp_encode_value_var() argument 271 if (len >= DCCP_OPTVAL_MAXLEN) dccp_encode_value_var() 273 if (len > 4) dccp_encode_value_var() 275 if (len > 3) dccp_encode_value_var() 277 if (len > 2) dccp_encode_value_var() 279 if (len > 1) dccp_encode_value_var() 281 if (len > 0) dccp_encode_value_var() 293 const void *value, const unsigned char len) dccp_insert_option() 297 if (DCCP_SKB_CB(skb)->dccpd_opt_len + len + 2 > DCCP_MAX_OPT_LEN) dccp_insert_option() 300 DCCP_SKB_CB(skb)->dccpd_opt_len += len + 2; dccp_insert_option() 302 to = skb_push(skb, len + 2); dccp_insert_option() 304 *to++ = len + 2; dccp_insert_option() 306 memcpy(to, value, len); dccp_insert_option() 325 const int len = ndp_len + 2; dccp_insert_option_ndp() local 327 if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN) dccp_insert_option_ndp() 330 DCCP_SKB_CB(skb)->dccpd_opt_len += len; dccp_insert_option_ndp() 332 ptr = skb_push(skb, len); dccp_insert_option_ndp() 334 *ptr++ = len; dccp_insert_option_ndp() 361 u32 elapsed_time, elapsed_time_len, len; dccp_insert_option_timestamp_echo() local 374 len = 6 + elapsed_time_len; dccp_insert_option_timestamp_echo() 376 if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN) dccp_insert_option_timestamp_echo() 379 DCCP_SKB_CB(skb)->dccpd_opt_len += len; dccp_insert_option_timestamp_echo() 381 to = skb_push(skb, len); dccp_insert_option_timestamp_echo() 383 *to++ = len; dccp_insert_option_timestamp_echo() 407 u16 len = buflen + 2 * nr_opts; dccp_insert_option_ackvec() local 412 if (dcb->dccpd_opt_len + len > DCCP_MAX_OPT_LEN) { dccp_insert_option_ackvec() 413 DCCP_WARN("Lacking space for %u bytes on %s packet\n", len, dccp_insert_option_ackvec() 422 if (len > DCCPAV_MIN_OPTLEN && dccp_insert_option_ackvec() 423 len + dcb->dccpd_opt_len + skb->len > dp->dccps_mss_cache) { dccp_insert_option_ackvec() 425 "MPS=%u ==> reduce payload size?\n", len, skb->len, dccp_insert_option_ackvec() 430 dcb->dccpd_opt_len += len; dccp_insert_option_ackvec() 432 to = skb_push(skb, len); dccp_insert_option_ackvec() 433 len = buflen; dccp_insert_option_ackvec() 438 int copylen = len; dccp_insert_option_ackvec() 440 if (len > DCCP_SINGLE_OPT_MAXLEN) dccp_insert_option_ackvec() 458 len -= tailsize; dccp_insert_option_ackvec() 466 len -= copylen; dccp_insert_option_ackvec() 496 * @len: true length of @val in bytes (excluding first element repetition) 505 u8 *val, u8 len, bool repeat_first) dccp_insert_fn_opt() 510 if (len > (DCCP_SINGLE_OPT_MAXLEN - 2)) { dccp_insert_fn_opt() 511 DCCP_WARN("length %u for feature %u too large\n", len, feat); dccp_insert_fn_opt() 515 if (unlikely(val == NULL || len == 0)) dccp_insert_fn_opt() 516 len = repeat_first = false; dccp_insert_fn_opt() 517 tot_len = 3 + repeat_first + len; dccp_insert_fn_opt() 532 if (len) dccp_insert_fn_opt() 533 memcpy(to, val, len); dccp_insert_fn_opt() 292 dccp_insert_option(struct sk_buff *skb, const unsigned char option, const void *value, const unsigned char len) dccp_insert_option() argument 504 dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat, u8 *val, u8 len, bool repeat_first) dccp_insert_fn_opt() argument
|
/linux-4.1.27/drivers/net/wireless/ath/ath10k/ |
H A D | debug.c | 60 __le32 len; member in struct:ath10k_dump_file_data 186 unsigned int len = 0, buf_len = 4096; ath10k_read_wmi_services() local 198 if (len > buf_len) ath10k_read_wmi_services() 199 len = buf_len; ath10k_read_wmi_services() 208 len += scnprintf(buf + len, buf_len - len, ath10k_read_wmi_services() 215 len += scnprintf(buf + len, buf_len - len, ath10k_read_wmi_services() 221 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_read_wmi_services() 430 unsigned int len = 0; ath10k_fw_stats_fill() local 451 len += scnprintf(buf + len, buf_len - len, "\n"); ath10k_fw_stats_fill() 452 len += scnprintf(buf + len, buf_len - len, "%30s\n", ath10k_fw_stats_fill() 454 len += scnprintf(buf + len, buf_len - len, "%30s\n\n", ath10k_fw_stats_fill() 457 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 459 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 461 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 463 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 465 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 467 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 469 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 471 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 473 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 475 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 477 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 479 len += scnprintf(buf + len, buf_len - len, "%30s %10u\n", ath10k_fw_stats_fill() 482 len += scnprintf(buf + len, buf_len - len, "\n"); ath10k_fw_stats_fill() 483 len += scnprintf(buf + len, buf_len - len, "%30s\n", ath10k_fw_stats_fill() 485 len += scnprintf(buf + len, buf_len - len, "%30s\n\n", ath10k_fw_stats_fill() 488 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 490 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 492 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 494 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 496 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 498 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 500 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 502 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 504 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 506 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 508 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 510 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 512 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 514 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 516 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 518 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 521 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 524 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 526 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 528 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 530 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 532 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 535 len += scnprintf(buf + len, buf_len - len, "\n"); ath10k_fw_stats_fill() 536 len += scnprintf(buf + len, buf_len - len, "%30s\n", ath10k_fw_stats_fill() 538 len += scnprintf(buf + len, buf_len - len, "%30s\n\n", ath10k_fw_stats_fill() 541 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 544 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 546 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 548 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 550 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 552 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 554 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 556 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 558 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 560 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 562 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 564 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 566 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 568 len += scnprintf(buf + len, buf_len - len, "%30s %10d\n", ath10k_fw_stats_fill() 571 len += scnprintf(buf + len, buf_len - len, "\n"); ath10k_fw_stats_fill() 572 len += scnprintf(buf + len, buf_len - len, "%30s (%zu)\n", ath10k_fw_stats_fill() 574 len += scnprintf(buf + len, buf_len - len, "%30s\n\n", ath10k_fw_stats_fill() 578 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 580 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 582 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 584 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 586 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 588 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 590 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 592 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 594 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 598 len += scnprintf(buf + len, buf_len - len, ath10k_fw_stats_fill() 604 len += scnprintf(buf + len, buf_len - len, ath10k_fw_stats_fill() 610 len += scnprintf(buf + len, buf_len - len, ath10k_fw_stats_fill() 616 len += scnprintf(buf + len, buf_len - len, ath10k_fw_stats_fill() 622 len += scnprintf(buf + len, buf_len - len, ath10k_fw_stats_fill() 627 len += scnprintf(buf + len, buf_len - len, "\n"); ath10k_fw_stats_fill() 630 len += scnprintf(buf + len, buf_len - len, "\n"); ath10k_fw_stats_fill() 631 len += scnprintf(buf + len, buf_len - len, "%30s (%zu)\n", ath10k_fw_stats_fill() 633 len += scnprintf(buf + len, buf_len - len, "%30s\n\n", ath10k_fw_stats_fill() 637 len += scnprintf(buf + len, buf_len - len, "%30s %pM\n", ath10k_fw_stats_fill() 639 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 641 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 643 len += scnprintf(buf + len, buf_len - len, "%30s %u\n", ath10k_fw_stats_fill() 645 len += scnprintf(buf + len, buf_len - len, "\n"); ath10k_fw_stats_fill() 651 if (len >= buf_len) ath10k_fw_stats_fill() 652 buf[len - 1] = 0; ath10k_fw_stats_fill() 654 buf[len] = 0; ath10k_fw_stats_fill() 707 unsigned int len = strlen(buf); ath10k_fw_stats_read() local 709 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_fw_stats_read() 725 int ret, len, buf_len; ath10k_debug_fw_reset_stats_read() local 735 len = 0; ath10k_debug_fw_reset_stats_read() 736 len += scnprintf(buf + len, buf_len - len, ath10k_debug_fw_reset_stats_read() 738 len += scnprintf(buf + len, buf_len - len, ath10k_debug_fw_reset_stats_read() 741 len += scnprintf(buf + len, buf_len - len, ath10k_debug_fw_reset_stats_read() 747 ret = simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_debug_fw_reset_stats_read() 876 unsigned int len; ath10k_read_chip_id() local 879 len = scnprintf(buf, sizeof(buf), "0x%08x\n", ar->chip_id); ath10k_read_chip_id() 881 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_read_chip_id() 912 unsigned int len, sofar = 0; ath10k_build_dump_file() local 915 len = hdr_len; ath10k_build_dump_file() 916 len += sizeof(*dump_tlv) + sizeof(crash_data->registers); ath10k_build_dump_file() 923 buf = vzalloc(len); ath10k_build_dump_file() 938 dump_data->len = cpu_to_le32(len); ath10k_build_dump_file() 1004 le32_to_cpu(dump_file->len)); ath10k_fw_crash_dump_read() 1029 unsigned int len = 0; ath10k_reg_addr_read() local 1036 len += scnprintf(buf + len, sizeof(buf) - len, "0x%x\n", reg_addr); ath10k_reg_addr_read() 1038 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_reg_addr_read() 1077 unsigned int len; ath10k_reg_value_read() local 1092 len = scnprintf(buf, sizeof(buf), "0x%08x:0x%08x\n", reg_addr, reg_val); ath10k_reg_value_read() 1094 ret = simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_reg_value_read() 1300 unsigned int len; ath10k_read_htt_stats_mask() local 1302 len = scnprintf(buf, sizeof(buf), "%lu\n", ar->debug.htt_stats_mask); ath10k_read_htt_stats_mask() 1304 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_read_htt_stats_mask() 1354 unsigned int len; ath10k_read_htt_max_amsdu_ampdu() local 1366 len = scnprintf(buf, sizeof(buf), "%u %u\n", amsdu, ampdu); ath10k_read_htt_max_amsdu_ampdu() 1368 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_read_htt_max_amsdu_ampdu() 1418 unsigned int len; ath10k_read_fw_dbglog() local 1421 len = scnprintf(buf, sizeof(buf), "0x%08x %u\n", ath10k_read_fw_dbglog() 1424 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_read_fw_dbglog() 1724 unsigned int len; ath10k_read_nf_cal_period() local 1727 len = scnprintf(buf, sizeof(buf), "%d\n", ath10k_read_nf_cal_period() 1730 return simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_read_nf_cal_period() 1870 len += scnprintf(buf + len, size - len, "%-28s : %10u\n", s, \ 1874 len += scnprintf(buf + len, size - len, "%-28s : %10u\n", s, \ 1880 int retval = 0, len = 0; ath10k_read_dfs_stats() local 1890 len += scnprintf(buf + len, size - len, "DFS not enabled\n"); ath10k_read_dfs_stats() 1897 len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n"); ath10k_read_dfs_stats() 1905 len += scnprintf(buf + len, size - len, "Global Pool statistics:\n"); ath10k_read_dfs_stats() 1915 if (len > size) ath10k_read_dfs_stats() 1916 len = size; ath10k_read_dfs_stats() 1918 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); ath10k_read_dfs_stats() 1983 int len = 0; ath10k_read_pktlog_filter() local 1986 len = scnprintf(buf, sizeof(buf) - len, "%08x\n", ath10k_read_pktlog_filter() 1990 return simple_read_from_buffer(ubuf, count, ppos, buf, len); ath10k_read_pktlog_filter() 2130 const void *buf, size_t len) ath10k_dbg_dump() 2140 for (ptr = buf; (ptr - buf) < len; ptr += 16) { ath10k_dbg_dump() 2147 hex_dump_to_buffer(ptr, len - (ptr - buf), 16, 1, ath10k_dbg_dump() 2156 buf, len); ath10k_dbg_dump() 2127 ath10k_dbg_dump(struct ath10k *ar, enum ath10k_debug_mask mask, const char *msg, const char *prefix, const void *buf, size_t len) ath10k_dbg_dump() argument
|
H A D | trace.h | 174 "%s %s id %d len %zu ret %d", 205 "%s %s id %d len %zu", 233 "%s %s len %zu", 260 "%s %s len %zu", 355 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 357 TP_ARGS(ar, data, len), 362 __field(size_t, len) 369 __entry->len = ath10k_frm_hdr_len(data); 370 memcpy(__get_dynamic_array(data), data, __entry->len); 374 "%s %s len %zu\n", 377 __entry->len 382 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 384 TP_ARGS(ar, data, len), 389 __field(size_t, len) 390 __dynamic_array(u8, payload, (len - ath10k_frm_hdr_len(data))) 396 __entry->len = len - ath10k_frm_hdr_len(data); 398 data + ath10k_frm_hdr_len(data), __entry->len); 402 "%s %s len %zu\n", 405 __entry->len 410 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 411 TP_ARGS(ar, data, len) 415 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 416 TP_ARGS(ar, data, len) 420 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 421 TP_ARGS(ar, data, len) 425 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 426 TP_ARGS(ar, data, len) 430 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 432 TP_ARGS(ar, data, len), 437 __field(u16, len) 438 __dynamic_array(u8, rxdesc, len) 444 __entry->len = len; 445 memcpy(__get_dynamic_array(rxdesc), data, len); 449 "%s %s rxdesc len %d", 452 __entry->len 461 u16 len, 464 TP_ARGS(ar, type, timestamp, code, len, data), 472 __field(u16, len) 473 __dynamic_array(u8, data, len) 482 __entry->len = len; 483 memcpy(__get_dynamic_array(data), data, len); 487 "%s %s diag container type %hhu timestamp %u code %u len %d", 493 __entry->len 498 TP_PROTO(struct ath10k *ar, const void *data, size_t len), 500 TP_ARGS(ar, data, len), 505 __field(u16, len) 506 __dynamic_array(u8, data, len) 512 __entry->len = len; 513 memcpy(__get_dynamic_array(data), data, len); 517 "%s %s tlv diag len %d", 520 __entry->len
|
H A D | wmi-tlv.h | 951 #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \ 952 ((svc_id) < (len) && \ 956 #define SVCMAP(x, y, len) \ 958 if (WMI_SERVICE_IS_ENABLED((in), (x), (len))) \ 963 wmi_tlv_svc_map(const __le32 *in, unsigned long *out, size_t len) wmi_tlv_svc_map() argument 966 WMI_SERVICE_BEACON_OFFLOAD, len); wmi_tlv_svc_map() 968 WMI_SERVICE_SCAN_OFFLOAD, len); wmi_tlv_svc_map() 970 WMI_SERVICE_ROAM_SCAN_OFFLOAD, len); wmi_tlv_svc_map() 972 WMI_SERVICE_BCN_MISS_OFFLOAD, len); wmi_tlv_svc_map() 974 WMI_SERVICE_STA_PWRSAVE, len); wmi_tlv_svc_map() 976 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len); wmi_tlv_svc_map() 978 WMI_SERVICE_AP_UAPSD, len); wmi_tlv_svc_map() 980 WMI_SERVICE_AP_DFS, len); wmi_tlv_svc_map() 982 WMI_SERVICE_11AC, len); wmi_tlv_svc_map() 984 WMI_SERVICE_BLOCKACK, len); wmi_tlv_svc_map() 986 WMI_SERVICE_PHYERR, len); wmi_tlv_svc_map() 988 WMI_SERVICE_BCN_FILTER, len); wmi_tlv_svc_map() 990 WMI_SERVICE_RTT, len); wmi_tlv_svc_map() 992 WMI_SERVICE_WOW, len); wmi_tlv_svc_map() 994 WMI_SERVICE_RATECTRL_CACHE, len); wmi_tlv_svc_map() 996 WMI_SERVICE_IRAM_TIDS, len); wmi_tlv_svc_map() 998 WMI_SERVICE_ARPNS_OFFLOAD, len); wmi_tlv_svc_map() 1000 WMI_SERVICE_NLO, len); wmi_tlv_svc_map() 1002 WMI_SERVICE_GTK_OFFLOAD, len); wmi_tlv_svc_map() 1004 WMI_SERVICE_SCAN_SCH, len); wmi_tlv_svc_map() 1006 WMI_SERVICE_CSA_OFFLOAD, len); wmi_tlv_svc_map() 1008 WMI_SERVICE_CHATTER, len); wmi_tlv_svc_map() 1010 WMI_SERVICE_COEX_FREQAVOID, len); wmi_tlv_svc_map() 1012 WMI_SERVICE_PACKET_POWER_SAVE, len); wmi_tlv_svc_map() 1014 WMI_SERVICE_FORCE_FW_HANG, len); wmi_tlv_svc_map() 1016 WMI_SERVICE_GPIO, len); wmi_tlv_svc_map() 1018 WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, len); wmi_tlv_svc_map() 1020 WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len); wmi_tlv_svc_map() 1022 WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len); wmi_tlv_svc_map() 1024 WMI_SERVICE_STA_KEEP_ALIVE, len); wmi_tlv_svc_map() 1026 WMI_SERVICE_TX_ENCAP, len); wmi_tlv_svc_map() 1028 WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, len); wmi_tlv_svc_map() 1030 WMI_SERVICE_EARLY_RX, len); wmi_tlv_svc_map() 1032 WMI_SERVICE_STA_SMPS, len); wmi_tlv_svc_map() 1034 WMI_SERVICE_FWTEST, len); wmi_tlv_svc_map() 1036 WMI_SERVICE_STA_WMMAC, len); wmi_tlv_svc_map() 1038 WMI_SERVICE_TDLS, len); wmi_tlv_svc_map() 1040 WMI_SERVICE_BURST, len); wmi_tlv_svc_map() 1042 WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE, len); wmi_tlv_svc_map() 1044 WMI_SERVICE_ADAPTIVE_OCS, len); wmi_tlv_svc_map() 1046 WMI_SERVICE_BA_SSN_SUPPORT, len); wmi_tlv_svc_map() 1048 WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE, len); wmi_tlv_svc_map() 1050 WMI_SERVICE_WLAN_HB, len); wmi_tlv_svc_map() 1052 WMI_SERVICE_LTE_ANT_SHARE_SUPPORT, len); wmi_tlv_svc_map() 1054 WMI_SERVICE_BATCH_SCAN, len); wmi_tlv_svc_map() 1056 WMI_SERVICE_QPOWER, len); wmi_tlv_svc_map() 1058 WMI_SERVICE_PLMREQ, len); wmi_tlv_svc_map() 1060 WMI_SERVICE_THERMAL_MGMT, len); wmi_tlv_svc_map() 1062 WMI_SERVICE_RMC, len); wmi_tlv_svc_map() 1064 WMI_SERVICE_MHF_OFFLOAD, len); wmi_tlv_svc_map() 1066 WMI_SERVICE_COEX_SAR, len); wmi_tlv_svc_map() 1068 WMI_SERVICE_BCN_TXRATE_OVERRIDE, len); wmi_tlv_svc_map() 1070 WMI_SERVICE_NAN, len); wmi_tlv_svc_map() 1072 WMI_SERVICE_L1SS_STAT, len); wmi_tlv_svc_map() 1074 WMI_SERVICE_ESTIMATE_LINKSPEED, len); wmi_tlv_svc_map() 1076 WMI_SERVICE_OBSS_SCAN, len); wmi_tlv_svc_map() 1078 WMI_SERVICE_TDLS_OFFCHAN, len); wmi_tlv_svc_map() 1080 WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, len); wmi_tlv_svc_map() 1082 WMI_SERVICE_TDLS_UAPSD_SLEEP_STA, len); wmi_tlv_svc_map() 1084 WMI_SERVICE_IBSS_PWRSAVE, len); wmi_tlv_svc_map() 1086 WMI_SERVICE_LPASS, len); wmi_tlv_svc_map() 1088 WMI_SERVICE_EXTSCAN, len); wmi_tlv_svc_map() 1090 WMI_SERVICE_D0WOW, len); wmi_tlv_svc_map() 1092 WMI_SERVICE_HSOFFLOAD, len); wmi_tlv_svc_map() 1094 WMI_SERVICE_ROAM_HO_OFFLOAD, len); wmi_tlv_svc_map() 1096 WMI_SERVICE_RX_FULL_REORDER, len); wmi_tlv_svc_map() 1098 WMI_SERVICE_DHCP_OFFLOAD, len); wmi_tlv_svc_map() 1100 WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT, len); wmi_tlv_svc_map() 1102 WMI_SERVICE_MDNS_OFFLOAD, len); wmi_tlv_svc_map() 1104 WMI_SERVICE_SAP_AUTH_OFFLOAD, len); wmi_tlv_svc_map() 1110 __le16 len; member in struct:wmi_tlv 1431 __le16 len; member in struct:wmi_tlv_diag_item
|
/linux-4.1.27/arch/arm/kvm/ |
H A D | mmio.c | 26 static void mmio_write_buf(char *buf, unsigned int len, unsigned long data) mmio_write_buf() argument 36 switch (len) { mmio_write_buf() 55 memcpy(buf, datap, len); mmio_write_buf() 58 static unsigned long mmio_read_buf(char *buf, unsigned int len) mmio_read_buf() argument 67 switch (len) { mmio_read_buf() 72 memcpy(&tmp.hword, buf, len); mmio_read_buf() 76 memcpy(&tmp.word, buf, len); mmio_read_buf() 80 memcpy(&tmp.dword, buf, len); mmio_read_buf() 99 unsigned int len; kvm_handle_mmio_return() local 103 len = run->mmio.len; kvm_handle_mmio_return() 104 if (len > sizeof(unsigned long)) kvm_handle_mmio_return() 107 data = mmio_read_buf(run->mmio.data, len); kvm_handle_mmio_return() 110 len < sizeof(unsigned long)) { kvm_handle_mmio_return() 111 mask = 1U << ((len * 8) - 1); kvm_handle_mmio_return() 115 trace_kvm_mmio(KVM_TRACE_MMIO_READ, len, run->mmio.phys_addr, kvm_handle_mmio_return() 117 data = vcpu_data_host_to_guest(vcpu, data, len); kvm_handle_mmio_return() 124 static int decode_hsr(struct kvm_vcpu *vcpu, bool *is_write, int *len) decode_hsr() argument 150 *len = access_size; decode_hsr() 169 int len; io_mem_abort() local 178 ret = decode_hsr(vcpu, &is_write, &len); io_mem_abort() 189 data = vcpu_data_guest_to_host(vcpu, *vcpu_reg(vcpu, rt), len); io_mem_abort() 191 trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, len, fault_ipa, data); io_mem_abort() 192 mmio_write_buf(data_buf, len, data); io_mem_abort() 194 ret = kvm_io_bus_write(vcpu, KVM_MMIO_BUS, fault_ipa, len, io_mem_abort() 197 trace_kvm_mmio(KVM_TRACE_MMIO_READ_UNSATISFIED, len, io_mem_abort() 200 ret = kvm_io_bus_read(vcpu, KVM_MMIO_BUS, fault_ipa, len, io_mem_abort() 207 run->mmio.len = len; io_mem_abort() 208 memcpy(run->mmio.data, data_buf, len); io_mem_abort()
|
/linux-4.1.27/tools/lib/traceevent/ |
H A D | trace-seq.c | 57 s->len = 0; trace_seq_init() 76 s->len = 0; trace_seq_reset() 127 int len; trace_seq_printf() local 133 len = (s->buffer_size - 1) - s->len; trace_seq_printf() 136 ret = vsnprintf(s->buffer + s->len, len, fmt, ap); trace_seq_printf() 139 if (ret >= len) { trace_seq_printf() 144 s->len += ret; trace_seq_printf() 163 int len; trace_seq_vprintf() local 169 len = (s->buffer_size - 1) - s->len; trace_seq_vprintf() 171 ret = vsnprintf(s->buffer + s->len, len, fmt, args); trace_seq_vprintf() 173 if (ret >= len) { trace_seq_vprintf() 178 s->len += ret; trace_seq_vprintf() 180 return len; trace_seq_vprintf() 195 int len; trace_seq_puts() local 199 len = strlen(str); trace_seq_puts() 201 while (len > ((s->buffer_size - 1) - s->len)) trace_seq_puts() 206 memcpy(s->buffer + s->len, str, len); trace_seq_puts() 207 s->len += len; trace_seq_puts() 209 return len; trace_seq_puts() 216 while (s->len >= (s->buffer_size - 1)) trace_seq_putc() 221 s->buffer[s->len++] = c; trace_seq_putc() 231 s->buffer[s->len] = 0; trace_seq_terminate() 240 return fprintf(fp, "%.*s", s->len, s->buffer); trace_seq_do_fprintf()
|
/linux-4.1.27/drivers/s390/char/ |
H A D | hmcdrv_cache.c | 25 * @len: size of @content cache (0 if caching disabled) 42 size_t len; member in struct:hmcdrv_cache_entry 50 .len = 0, 64 ssize_t len; hmcdrv_cache_get() local 80 len = hmcdrv_cache_file.fsize - ftp->ofs; hmcdrv_cache_get() 82 if (len > ftp->len) hmcdrv_cache_get() 83 len = ftp->len; hmcdrv_cache_get() 91 ((pos + len) <= hmcdrv_cache_file.len)) { hmcdrv_cache_get() 95 len); hmcdrv_cache_get() 97 hmcdrv_cache_file.fname, len, hmcdrv_cache_get() 100 return len; hmcdrv_cache_get() 116 ssize_t len; hmcdrv_cache_do() local 119 * (hmcdrv_cache_file.len > 0), is large enough to handle the hmcdrv_cache_do() 120 * request (hmcdrv_cache_file.len >= ftp->len) and there is a need hmcdrv_cache_do() 121 * to do so (ftp->len > 0) hmcdrv_cache_do() 123 if ((ftp->len > 0) && (hmcdrv_cache_file.len >= ftp->len)) { hmcdrv_cache_do() 131 cftp.len = hmcdrv_cache_file.len; /* buffer data */ hmcdrv_cache_do() 133 len = func(&cftp, &hmcdrv_cache_file.fsize); /* now do */ hmcdrv_cache_do() 135 if (len > 0) { hmcdrv_cache_do() 137 len, ftp->fname); hmcdrv_cache_do() 139 if (len > ftp->len) hmcdrv_cache_do() 140 len = ftp->len; hmcdrv_cache_do() 145 memcpy(ftp->buf, hmcdrv_cache_file.content, len); hmcdrv_cache_do() 148 len = func(ftp, &hmcdrv_cache_file.fsize); hmcdrv_cache_do() 152 if (len > 0) { hmcdrv_cache_do() 163 return len; hmcdrv_cache_do() 179 ssize_t len; hmcdrv_cache_cmd() local 185 len = hmcdrv_cache_get(ftp); hmcdrv_cache_cmd() 187 if (len >= 0) /* got it from cache ? */ hmcdrv_cache_cmd() 188 return len; /* yes */ hmcdrv_cache_cmd() 190 len = hmcdrv_cache_do(ftp, func); hmcdrv_cache_cmd() 192 if (len >= 0) hmcdrv_cache_cmd() 193 return len; hmcdrv_cache_cmd() 196 len = func(ftp, NULL); /* simply do original command */ hmcdrv_cache_cmd() 206 return len; hmcdrv_cache_cmd() 233 hmcdrv_cache_file.len = cachesize; hmcdrv_cache_startup() 251 hmcdrv_cache_file.len = 0; /* no cache */ hmcdrv_cache_shutdown()
|
/linux-4.1.27/arch/powerpc/lib/ |
H A D | checksum_wrappers_64.c | 27 int len, __wsum sum, int *err_ptr) csum_and_copy_from_user() 35 if (!len) { csum_and_copy_from_user() 40 if (unlikely((len < 0) || !access_ok(VERIFY_READ, src, len))) { csum_and_copy_from_user() 47 len, sum, err_ptr, NULL); csum_and_copy_from_user() 50 int missing = __copy_from_user(dst, src, len); csum_and_copy_from_user() 53 memset(dst + len - missing, 0, missing); csum_and_copy_from_user() 59 csum = csum_partial(dst, len, sum); csum_and_copy_from_user() 67 __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len, csum_and_copy_to_user() argument 76 if (!len) { csum_and_copy_to_user() 81 if (unlikely((len < 0) || !access_ok(VERIFY_WRITE, dst, len))) { csum_and_copy_to_user() 88 len, sum, NULL, err_ptr); csum_and_copy_to_user() 91 csum = csum_partial(src, len, sum); csum_and_copy_to_user() 93 if (copy_to_user(dst, src, len)) { csum_and_copy_to_user() 26 csum_and_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr) csum_and_copy_from_user() argument
|
/linux-4.1.27/arch/frv/kernel/ |
H A D | sysctl.c | 55 int len; procctl_frv_cachemode() local 57 len = *lenp; procctl_frv_cachemode() 61 if (len <= 1 || len > sizeof(buff) - 1) procctl_frv_cachemode() 64 if (copy_from_user(buff, buffer, len) != 0) procctl_frv_cachemode() 67 if (buff[len - 1] == '\n') procctl_frv_cachemode() 68 buff[len - 1] = '\0'; procctl_frv_cachemode() 70 buff[len] = '\0'; procctl_frv_cachemode() 98 len = sizeof(frv_cache_wthru); procctl_frv_cachemode() 103 len = sizeof(frv_cache_wback); procctl_frv_cachemode() 107 if (len > *lenp) procctl_frv_cachemode() 108 len = *lenp; procctl_frv_cachemode() 110 if (copy_to_user(buffer, buff, len) != 0) procctl_frv_cachemode() 113 *lenp = len; procctl_frv_cachemode() 114 *ppos = len; procctl_frv_cachemode() 130 int len; procctl_frv_pin_cxnr() local 132 len = *lenp; procctl_frv_pin_cxnr() 136 if (len <= 1 || len > sizeof(buff) - 1) procctl_frv_pin_cxnr() 139 if (copy_from_user(buff, buffer, len) != 0) procctl_frv_pin_cxnr() 142 if (buff[len - 1] == '\n') procctl_frv_pin_cxnr() 143 buff[len - 1] = '\0'; procctl_frv_pin_cxnr() 145 buff[len] = '\0'; procctl_frv_pin_cxnr() 160 len = snprintf(buff, sizeof(buff), "%d\n", cxn_pinned); procctl_frv_pin_cxnr() 161 if (len > *lenp) procctl_frv_pin_cxnr() 162 len = *lenp; procctl_frv_pin_cxnr() 164 if (copy_to_user(buffer, buff, len) != 0) procctl_frv_pin_cxnr() 167 *lenp = len; procctl_frv_pin_cxnr() 168 *ppos = len; procctl_frv_pin_cxnr()
|
/linux-4.1.27/drivers/pci/ |
H A D | vpd.c | 11 int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt) pci_vpd_find_tag() argument 15 for (i = off; i < len; ) { pci_vpd_find_tag() 20 if (i + PCI_VPD_LRDT_TAG_SIZE > len) pci_vpd_find_tag() 47 unsigned int len, const char *kw) pci_vpd_find_info_keyword() 51 for (i = off; i + PCI_VPD_INFO_FLD_HDR_SIZE <= off + len;) { pci_vpd_find_info_keyword() 46 pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, unsigned int len, const char *kw) pci_vpd_find_info_keyword() argument
|
/linux-4.1.27/arch/x86/boot/ |
H A D | mca.c | 21 u16 len; query_mca() local 31 len = rdfs16(oreg.bx); query_mca() 33 if (len > sizeof(boot_params.sys_desc_table)) query_mca() 34 len = sizeof(boot_params.sys_desc_table); query_mca() 36 copy_from_fs(&boot_params.sys_desc_table, oreg.bx, len); query_mca()
|
H A D | string.h | 9 void *memcpy(void *dst, const void *src, size_t len); 10 void *memset(void *dst, int c, size_t len); 11 int memcmp(const void *s1, const void *s2, size_t len);
|
/linux-4.1.27/fs/nfsd/ |
H A D | blocklayoutxdr.c | 19 int len = sizeof(__be32) + 5 * sizeof(__be64) + sizeof(__be32); nfsd4_block_encode_layoutget() local 22 p = xdr_reserve_space(xdr, sizeof(__be32) + len); nfsd4_block_encode_layoutget() 26 *p++ = cpu_to_be32(len); nfsd4_block_encode_layoutget() 32 p = xdr_encode_hyper(p, b->len); nfsd4_block_encode_layoutget() 42 int len; nfsd4_block_encode_volume() local 46 len = 4 + 4 + 8 + 4 + b->simple.sig_len; nfsd4_block_encode_volume() 47 p = xdr_reserve_space(xdr, len); nfsd4_block_encode_volume() 60 return len; nfsd4_block_encode_volume() 68 int len = sizeof(__be32), ret, i; nfsd4_block_encode_getdeviceinfo() local 71 p = xdr_reserve_space(xdr, len + sizeof(__be32)); nfsd4_block_encode_getdeviceinfo() 79 len += ret; nfsd4_block_encode_getdeviceinfo() 86 *p++ = cpu_to_be32(len); nfsd4_block_encode_getdeviceinfo() 92 nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, nfsd4_block_decode_layoutupdate() argument 98 if (len < sizeof(u32)) { nfsd4_block_decode_layoutupdate() 99 dprintk("%s: extent array too small: %u\n", __func__, len); nfsd4_block_decode_layoutupdate() 105 if (len != expected) { nfsd4_block_decode_layoutupdate() 107 __func__, len, expected); nfsd4_block_decode_layoutupdate() 129 p = xdr_decode_hyper(p, &bex.len); nfsd4_block_decode_layoutupdate() 130 if (bex.len & (block_size - 1)) { nfsd4_block_decode_layoutupdate() 149 iomaps[i].length = bex.len; nfsd4_block_decode_layoutupdate()
|
/linux-4.1.27/drivers/media/usb/dvb-usb/ |
H A D | digitv.h | 20 * <cmdbyte> VV <len> B0 B1 B2 B3 23 * <cmdbyte> VV <len> R0 R1 R2 R3 25 * whereas 0 < len <= 4 39 * VV = 0; B* = PLL data; len = 4; 42 * VV = 0; B* = 0; len = 4; R* = key 45 * VV = 0; B* = key; len = 4; 48 * VV = 0; B[0] = 0x01, len = 4
|
/linux-4.1.27/drivers/parisc/ |
H A D | eisa_enumerator.c | 84 int len; configure_memory() local 89 len=0; configure_memory() 92 c = get_8(buf+len); configure_memory() 98 res->start = mem_parent->start + get_24(buf+len+2); configure_memory() 99 res->end = res->start + get_16(buf+len+5)*1024; configure_memory() 109 len+=7; configure_memory() 116 return len; configure_memory() 122 int len; configure_irq() local 126 len=0; configure_irq() 129 c = get_8(buf+len); configure_irq() 138 len+=2; configure_irq() 147 return len; configure_irq() 153 int len; configure_dma() local 157 len=0; configure_dma() 160 c = get_8(buf+len); configure_dma() 163 len+=2; configure_dma() 169 return len; configure_dma() 175 int len; configure_port() local 181 len=0; configure_port() 184 c = get_8(buf+len); configure_port() 188 res->start = get_16(buf+len+1); configure_port() 189 res->end = get_16(buf+len+1)+(c&HPEE_PORT_SIZE_MASK)+1; configure_port() 199 len+=3; configure_port() 205 return len; configure_port() 216 int len=0; configure_port_init() local 219 while (len<HPEE_PORT_INIT_MAX_LEN) { configure_port_init() 221 c = get_8(buf+len); configure_port_init() 228 outb((inb(get_16(buf+len+1) & configure_port_init() 229 get_8(buf+len+3)) | configure_port_init() 230 get_8(buf+len+4)), get_16(buf+len+1)); configure_port_init() 233 outb(get_8(buf+len+3), get_16(buf+len+1)); configure_port_init() 241 outw((inw(get_16(buf+len+1)) & configure_port_init() 242 get_16(buf+len+3)) | configure_port_init() 243 get_16(buf+len+5), configure_port_init() 244 get_16(buf+len+1)); configure_port_init() 246 outw(cpu_to_le16(get_16(buf+len+3)), get_16(buf+len+1)); configure_port_init() 253 outl((inl(get_16(buf+len+1) & configure_port_init() 254 get_32(buf+len+3)) | configure_port_init() 255 get_32(buf+len+7)), get_16(buf+len+1)); configure_port_init() 257 outl(cpu_to_le32(get_32(buf+len+3)), get_16(buf+len+1)); configure_port_init() 270 len+=s+3; configure_port_init() 276 return len; configure_port_init() 281 int len; configure_choise() local 287 len = get_8(buf); configure_choise() 288 *info=get_8(buf+len+1); configure_choise() 290 return len+2; configure_choise() 295 int len; configure_type_string() local 298 len = get_8(buf); configure_type_string() 299 if (len > 80) { configure_type_string() 300 printk(KERN_ERR "eisa_enumerator: type info field too long (%d, max is 80)\n", len); configure_type_string() 303 return 1+len; configure_type_string()
|
/linux-4.1.27/drivers/parport/ |
H A D | procfs.c | 40 int len = 0; do_active_device() local 52 len += sprintf(buffer, "%s\n", dev->name); do_active_device() 56 if(!len) { do_active_device() 57 len += sprintf(buffer, "%s\n", "none"); do_active_device() 60 if (len > *lenp) do_active_device() 61 len = *lenp; do_active_device() 63 *lenp = len; do_active_device() 65 *ppos += len; do_active_device() 67 return copy_to_user(result, buffer, len) ? -EFAULT : 0; do_active_device() 77 int len = 0; do_autoprobe() local 88 len += sprintf (buffer + len, "CLASS:%s;\n", str); do_autoprobe() 91 len += sprintf (buffer + len, "MODEL:%s;\n", str); do_autoprobe() 94 len += sprintf (buffer + len, "MANUFACTURER:%s;\n", str); do_autoprobe() 97 len += sprintf (buffer + len, "DESCRIPTION:%s;\n", str); do_autoprobe() 100 len += sprintf (buffer + len, "COMMAND SET:%s;\n", str); do_autoprobe() 102 if (len > *lenp) do_autoprobe() 103 len = *lenp; do_autoprobe() 105 *lenp = len; do_autoprobe() 107 *ppos += len; do_autoprobe() 109 return copy_to_user (result, buffer, len) ? -EFAULT : 0; do_autoprobe() 119 int len = 0; do_hardware_base_addr() local 129 len += sprintf (buffer, "%lu\t%lu\n", port->base, port->base_hi); do_hardware_base_addr() 131 if (len > *lenp) do_hardware_base_addr() 132 len = *lenp; do_hardware_base_addr() 134 *lenp = len; do_hardware_base_addr() 136 *ppos += len; do_hardware_base_addr() 138 return copy_to_user(result, buffer, len) ? -EFAULT : 0; do_hardware_base_addr() 147 int len = 0; do_hardware_irq() local 157 len += sprintf (buffer, "%d\n", port->irq); do_hardware_irq() 159 if (len > *lenp) do_hardware_irq() 160 len = *lenp; do_hardware_irq() 162 *lenp = len; do_hardware_irq() 164 *ppos += len; do_hardware_irq() 166 return copy_to_user(result, buffer, len) ? -EFAULT : 0; do_hardware_irq() 175 int len = 0; do_hardware_dma() local 185 len += sprintf (buffer, "%d\n", port->dma); do_hardware_dma() 187 if (len > *lenp) do_hardware_dma() 188 len = *lenp; do_hardware_dma() 190 *lenp = len; do_hardware_dma() 192 *ppos += len; do_hardware_dma() 194 return copy_to_user(result, buffer, len) ? -EFAULT : 0; do_hardware_dma() 203 int len = 0; do_hardware_modes() local 214 #define printmode(x) {if(port->modes&PARPORT_MODE_##x){len+=sprintf(buffer+len,"%s%s",f?",":"",#x);f++;}} do_hardware_modes() 224 buffer[len++] = '\n'; do_hardware_modes() 226 if (len > *lenp) do_hardware_modes() 227 len = *lenp; do_hardware_modes() 229 *lenp = len; do_hardware_modes() 231 *ppos += len; do_hardware_modes() 233 return copy_to_user(result, buffer, len) ? -EFAULT : 0; do_hardware_modes()
|
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/linux/ |
H A D | linux-sysctl.c | 98 int len; proc_memory_alloc() local 107 len = snprintf(buf, sizeof(buf), "%llu\n", obd_memory_sum()); proc_memory_alloc() 108 if (len > *lenp) proc_memory_alloc() 109 len = *lenp; proc_memory_alloc() 110 buf[len] = '\0'; proc_memory_alloc() 111 if (copy_to_user(buffer, buf, len)) proc_memory_alloc() 113 *lenp = len; proc_memory_alloc() 122 int len; proc_pages_alloc() local 131 len = snprintf(buf, sizeof(buf), "%llu\n", obd_pages_sum()); proc_pages_alloc() 132 if (len > *lenp) proc_pages_alloc() 133 len = *lenp; proc_pages_alloc() 134 buf[len] = '\0'; proc_pages_alloc() 135 if (copy_to_user(buffer, buf, len)) proc_pages_alloc() 137 *lenp = len; proc_pages_alloc() 146 int len; proc_mem_max() local 155 len = snprintf(buf, sizeof(buf), "%llu\n", obd_memory_max()); proc_mem_max() 156 if (len > *lenp) proc_mem_max() 157 len = *lenp; proc_mem_max() 158 buf[len] = '\0'; proc_mem_max() 159 if (copy_to_user(buffer, buf, len)) proc_mem_max() 161 *lenp = len; proc_mem_max() 170 int len; proc_pages_max() local 179 len = snprintf(buf, sizeof(buf), "%llu\n", obd_pages_max()); proc_pages_max() 180 if (len > *lenp) proc_pages_max() 181 len = *lenp; proc_pages_max() 182 buf[len] = '\0'; proc_pages_max() 183 if (copy_to_user(buffer, buf, len)) proc_pages_max() 185 *lenp = len; proc_pages_max() 215 int len; proc_max_dirty_pages_in_mb() local 217 len = lprocfs_read_frac_helper(buf, sizeof(buf), proc_max_dirty_pages_in_mb() 220 if (len > *lenp) proc_max_dirty_pages_in_mb() 221 len = *lenp; proc_max_dirty_pages_in_mb() 222 buf[len] = '\0'; proc_max_dirty_pages_in_mb() 223 if (copy_to_user(buffer, buf, len)) proc_max_dirty_pages_in_mb() 225 *lenp = len; proc_max_dirty_pages_in_mb() 246 int len; proc_alloc_fail_rate() local 248 len = lprocfs_read_frac_helper(buf, 21, proc_alloc_fail_rate() 251 if (len > *lenp) proc_alloc_fail_rate() 252 len = *lenp; proc_alloc_fail_rate() 253 buf[len] = '\0'; proc_alloc_fail_rate() 254 if (copy_to_user(buffer, buf, len)) proc_alloc_fail_rate() 256 *lenp = len; proc_alloc_fail_rate()
|
/linux-4.1.27/arch/m68k/sun3/ |
H A D | sun3dvma.c | 24 extern void dvma_unmap_iommu(unsigned long baddr, int len); 73 printk("dvma entry: %08lx len %08lx\n", print_use() 152 static inline unsigned long get_baddr(int len, unsigned long align) get_baddr() argument 173 newlen = len + ((hole->end - len) & (align-1)); get_baddr() 175 newlen = len; get_baddr() 206 unsigned long len; free_baddr() local 212 len = dvma_entry_use(baddr); free_baddr() 215 dvma_unmap_iommu(baddr, len); free_baddr() 219 dvma_free_bytes += len; free_baddr() 226 hole->end += len; free_baddr() 227 hole->size += len; free_baddr() 229 } else if(hole->start == (baddr + len)) { free_baddr() 231 hole->size += len; free_baddr() 240 hole->end = baddr + len; free_baddr() 241 hole->size = len; free_baddr() 280 unsigned long dvma_map_align(unsigned long kaddr, int len, int align) dvma_map_align() argument 286 if(!len) dvma_map_align() 287 len = 0x800; dvma_map_align() 289 if(!kaddr || !len) { dvma_map_align() 290 // printk("error: kaddr %lx len %x\n", kaddr, len); dvma_map_align() 297 len, kaddr); dvma_map_align() 301 len += off; dvma_map_align() 302 len = ((len + (DVMA_PAGE_SIZE-1)) & DVMA_PAGE_MASK); dvma_map_align() 309 baddr = get_baddr(len, align); dvma_map_align() 312 if(!dvma_map_iommu(kaddr, baddr, len)) dvma_map_align() 315 printk("dvma_map failed kaddr %lx baddr %lx len %x\n", kaddr, baddr, len); dvma_map_align() 337 void *dvma_malloc_align(unsigned long len, unsigned long align) dvma_malloc_align() argument 343 if(!len) dvma_malloc_align() 347 printk("dvma_malloc request %lx bytes\n", len); dvma_malloc_align() 349 len = ((len + (DVMA_PAGE_SIZE-1)) & DVMA_PAGE_MASK); dvma_malloc_align() 351 if((kaddr = __get_free_pages(GFP_ATOMIC, get_order(len))) == 0) dvma_malloc_align() 354 if((baddr = (unsigned long)dvma_map_align(kaddr, len, align)) == 0) { dvma_malloc_align() 355 free_pages(kaddr, get_order(len)); dvma_malloc_align() 361 if(dvma_map_cpu(kaddr, vaddr, len) < 0) { dvma_malloc_align() 363 free_pages(kaddr, get_order(len)); dvma_malloc_align() 369 len, kaddr, baddr); dvma_malloc_align()
|
/linux-4.1.27/arch/x86/platform/efi/ |
H A D | early_printk.c | 43 * early_efi_map maps efi framebuffer region [start, start + len -1] 47 static __init_refok void *early_efi_map(unsigned long start, unsigned long len) early_efi_map() argument 56 return early_ioremap(base + start, len); early_efi_map() 59 static __init_refok void early_efi_unmap(void *addr, unsigned long len) early_efi_unmap() argument 62 early_iounmap(addr, len); early_efi_unmap() 68 u16 len; early_efi_clear_scanline() local 70 len = boot_params.screen_info.lfb_linelength; early_efi_clear_scanline() 71 dst = early_efi_map(y*len, len); early_efi_clear_scanline() 75 memset(dst, 0, len); early_efi_clear_scanline() 76 early_efi_unmap(dst, len); early_efi_clear_scanline() 82 u16 len; early_efi_scroll_up() local 85 len = boot_params.screen_info.lfb_linelength; early_efi_scroll_up() 89 dst = early_efi_map(i*len, len); early_efi_scroll_up() 93 src = early_efi_map((i + font->height) * len, len); early_efi_scroll_up() 95 early_efi_unmap(dst, len); early_efi_scroll_up() 99 memmove(dst, src, len); early_efi_scroll_up() 101 early_efi_unmap(src, len); early_efi_scroll_up() 102 early_efi_unmap(dst, len); early_efi_scroll_up() 130 unsigned int len; early_efi_write() local 135 len = si->lfb_linelength; early_efi_write() 154 dst = early_efi_map((efi_y + h) * len, len); early_efi_write() 168 early_efi_unmap(dst, len); early_efi_write()
|
/linux-4.1.27/fs/ext3/ |
H A D | hash.c | 36 static __u32 dx_hack_hash_unsigned(const char *name, int len) dx_hack_hash_unsigned() argument 41 while (len--) { dx_hack_hash_unsigned() 52 static __u32 dx_hack_hash_signed(const char *name, int len) dx_hack_hash_signed() argument 57 while (len--) { dx_hack_hash_signed() 68 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) str2hashbuf_signed() argument 74 pad = (__u32)len | ((__u32)len << 8); str2hashbuf_signed() 78 if (len > num*4) str2hashbuf_signed() 79 len = num * 4; str2hashbuf_signed() 80 for (i = 0; i < len; i++) { str2hashbuf_signed() 96 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) str2hashbuf_unsigned() argument 102 pad = (__u32)len | ((__u32)len << 8); str2hashbuf_unsigned() 106 if (len > num*4) str2hashbuf_unsigned() 107 len = num * 4; str2hashbuf_unsigned() 108 for (i=0; i < len; i++) { str2hashbuf_unsigned() 125 * Returns the hash of a filename. If len is 0 and name is NULL, then 137 int ext3fs_dirhash(const char *name, int len, struct dx_hash_info *hinfo) ext3fs_dirhash() argument 165 hash = dx_hack_hash_unsigned(name, len); ext3fs_dirhash() 168 hash = dx_hack_hash_signed(name, len); ext3fs_dirhash() 174 while (len > 0) { ext3fs_dirhash() 175 (*str2hashbuf)(p, len, in, 8); ext3fs_dirhash() 177 len -= 32; ext3fs_dirhash() 187 while (len > 0) { ext3fs_dirhash() 188 (*str2hashbuf)(p, len, in, 4); ext3fs_dirhash() 190 len -= 16; ext3fs_dirhash()
|
/linux-4.1.27/fs/ext4/ |
H A D | hash.c | 37 static __u32 dx_hack_hash_unsigned(const char *name, int len) dx_hack_hash_unsigned() argument 42 while (len--) { dx_hack_hash_unsigned() 53 static __u32 dx_hack_hash_signed(const char *name, int len) dx_hack_hash_signed() argument 58 while (len--) { dx_hack_hash_signed() 69 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) str2hashbuf_signed() argument 75 pad = (__u32)len | ((__u32)len << 8); str2hashbuf_signed() 79 if (len > num*4) str2hashbuf_signed() 80 len = num * 4; str2hashbuf_signed() 81 for (i = 0; i < len; i++) { str2hashbuf_signed() 97 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) str2hashbuf_unsigned() argument 103 pad = (__u32)len | ((__u32)len << 8); str2hashbuf_unsigned() 107 if (len > num*4) str2hashbuf_unsigned() 108 len = num * 4; str2hashbuf_unsigned() 109 for (i = 0; i < len; i++) { str2hashbuf_unsigned() 126 * Returns the hash of a filename. If len is 0 and name is NULL, then 138 int ext4fs_dirhash(const char *name, int len, struct dx_hash_info *hinfo) ext4fs_dirhash() argument 166 hash = dx_hack_hash_unsigned(name, len); ext4fs_dirhash() 169 hash = dx_hack_hash_signed(name, len); ext4fs_dirhash() 175 while (len > 0) { ext4fs_dirhash() 176 (*str2hashbuf)(p, len, in, 8); ext4fs_dirhash() 178 len -= 32; ext4fs_dirhash() 188 while (len > 0) { ext4fs_dirhash() 189 (*str2hashbuf)(p, len, in, 4); ext4fs_dirhash() 191 len -= 16; ext4fs_dirhash()
|
/linux-4.1.27/drivers/crypto/caam/ |
H A D | desc_constr.h | 86 static inline void init_job_desc_shared(u32 *desc, dma_addr_t ptr, int len, init_job_desc_shared() argument 91 (len << HDR_START_IDX_SHIFT)); init_job_desc_shared() 95 static inline void append_data(u32 *desc, void *data, int len) append_data() argument 99 if (len) /* avoid sparse warning: memcpy with byte count of 0 */ append_data() 100 memcpy(offset, data, len); append_data() 102 (*desc) += (len + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; append_data() 134 static inline void append_cmd_ptr(u32 *desc, dma_addr_t ptr, int len, append_cmd_ptr() argument 137 append_cmd(desc, command | len); append_cmd_ptr() 143 unsigned int len, u32 command) append_cmd_ptr_extlen() 148 append_cmd(desc, len); append_cmd_ptr_extlen() 151 static inline void append_cmd_data(u32 *desc, void *data, int len, append_cmd_data() argument 154 append_cmd(desc, command | IMMEDIATE | len); append_cmd_data() 155 append_data(desc, data, len); append_cmd_data() 190 static inline void append_##cmd(u32 *desc, unsigned int len, u32 options) \ 193 append_cmd(desc, CMD_##op | len | options); \ 202 static inline void append_##cmd(u32 *desc, dma_addr_t ptr, unsigned int len, \ 206 append_cmd_ptr(desc, ptr, len, CMD_##op | options); \ 213 static inline void append_store(u32 *desc, dma_addr_t ptr, unsigned int len, append_store() argument 220 append_cmd(desc, CMD_STORE | options | len); append_store() 232 unsigned int len, \ 237 append_cmd(desc, CMD_SEQ_##op##_PTR | len | options); \ 239 append_cmd_ptr(desc, ptr, len, CMD_SEQ_##op##_PTR | options); \ 246 unsigned int len, u32 options) \ 249 append_cmd_data(desc, data, len, CMD_##op | options); \ 256 unsigned int len, u32 options) \ 259 append_cmd_ptr_extlen(desc, ptr, len, CMD_##op | SQIN_EXT | options); \ 270 type len, u32 options) \ 274 append_##cmd##_extlen(desc, ptr, len, options); \ 276 append_##cmd##_intlen(desc, ptr, len, options); \ 288 unsigned int len, u32 options) \ 291 append_cmd(desc, CMD_##op | IMMEDIATE | len | options); \ 310 #define APPEND_MATH(op, desc, dest, src_0, src_1, len) \ 312 MATH_SRC0_##src_0 | MATH_SRC1_##src_1 | (u32)len); 314 #define append_math_add(desc, dest, src0, src1, len) \ 315 APPEND_MATH(ADD, desc, dest, src0, src1, len) 316 #define append_math_sub(desc, dest, src0, src1, len) \ 317 APPEND_MATH(SUB, desc, dest, src0, src1, len) 318 #define append_math_add_c(desc, dest, src0, src1, len) \ 319 APPEND_MATH(ADDC, desc, dest, src0, src1, len) 320 #define append_math_sub_b(desc, dest, src0, src1, len) \ 321 APPEND_MATH(SUBB, desc, dest, src0, src1, len) 322 #define append_math_and(desc, dest, src0, src1, len) \ 323 APPEND_MATH(AND, desc, dest, src0, src1, len) 324 #define append_math_or(desc, dest, src0, src1, len) \ 325 APPEND_MATH(OR, desc, dest, src0, src1, len) 326 #define append_math_xor(desc, dest, src0, src1, len) \ 327 APPEND_MATH(XOR, desc, dest, src0, src1, len) 328 #define append_math_lshift(desc, dest, src0, src1, len) \ 329 APPEND_MATH(LSHIFT, desc, dest, src0, src1, len) 330 #define append_math_rshift(desc, dest, src0, src1, len) \ 331 APPEND_MATH(RSHIFT, desc, dest, src0, src1, len) 332 #define append_math_ldshift(desc, dest, src0, src1, len) \ 333 APPEND_MATH(SHLD, desc, dest, src0, src1, len) 142 append_cmd_ptr_extlen(u32 *desc, dma_addr_t ptr, unsigned int len, u32 command) append_cmd_ptr_extlen() argument
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/core/ |
H A D | option.c | 31 int len = strcspn(optstr, ",="); nvkm_stropt() local 32 switch (optstr[len]) { nvkm_stropt() 34 if (!strncasecmpz(optstr, opt, len)) { nvkm_stropt() 35 optstr += len + 1; nvkm_stropt() 47 optstr += len; nvkm_stropt() 82 int len = strcspn(optstr, ",="); nvkm_dbgopt() local 83 switch (optstr[len]) { nvkm_dbgopt() 85 if (strncasecmpz(optstr, sub, len)) nvkm_dbgopt() 91 if (!strncasecmpz(optstr, "fatal", len)) nvkm_dbgopt() 93 else if (!strncasecmpz(optstr, "error", len)) nvkm_dbgopt() 95 else if (!strncasecmpz(optstr, "warn", len)) nvkm_dbgopt() 97 else if (!strncasecmpz(optstr, "info", len)) nvkm_dbgopt() 99 else if (!strncasecmpz(optstr, "debug", len)) nvkm_dbgopt() 101 else if (!strncasecmpz(optstr, "trace", len)) nvkm_dbgopt() 103 else if (!strncasecmpz(optstr, "paranoia", len)) nvkm_dbgopt() 105 else if (!strncasecmpz(optstr, "spam", len)) nvkm_dbgopt() 109 if (optstr[len] != '\0') { nvkm_dbgopt() 117 optstr += len; nvkm_dbgopt()
|
/linux-4.1.27/arch/x86/lib/ |
H A D | usercopy_64.c | 57 unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) copy_in_user() argument 59 if (access_ok(VERIFY_WRITE, to, len) && access_ok(VERIFY_READ, from, len)) { copy_in_user() 60 return copy_user_generic((__force void *)to, (__force void *)from, len); copy_in_user() 62 return len; copy_in_user() 72 copy_user_handle_tail(char *to, char *from, unsigned len) copy_user_handle_tail() argument 74 for (; len; --len, to++) { copy_user_handle_tail() 86 memset(to, 0, len); copy_user_handle_tail() 87 return len; copy_user_handle_tail()
|
H A D | csum-partial_64.c | 34 static unsigned do_csum(const unsigned char *buff, unsigned len) do_csum() argument 39 if (unlikely(len == 0)) do_csum() 44 len--; do_csum() 47 count = len >> 1; /* nr of 16-bit words.. */ do_csum() 52 len -= 2; do_csum() 62 len -= 4; do_csum() 101 if (len & 4) { do_csum() 106 if (len & 2) { do_csum() 111 if (len & 1) do_csum() 122 * computes the checksum of a memory block at buff, length len, 133 __wsum csum_partial(const void *buff, int len, __wsum sum) csum_partial() argument 135 return (__force __wsum)add32_with_carry(do_csum(buff, len), csum_partial() 143 __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 145 return csum_fold(csum_partial(buff,len,0)); ip_compute_csum()
|
/linux-4.1.27/include/uapi/linux/netfilter/ |
H A D | nfnetlink_compat.h | 37 #define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1)) 38 #define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) \ 39 && (nfa)->nfa_len <= (len)) 42 #define NFA_LENGTH(len) (NFA_ALIGN(sizeof(struct nfattr)) + (len)) 43 #define NFA_SPACE(len) NFA_ALIGN(NFA_LENGTH(len)) 52 (skb)->len; })
|
/linux-4.1.27/arch/nios2/include/asm/ |
H A D | checksum.h | 14 extern __wsum csum_partial(const void *buff, int len, __wsum sum); 15 extern __wsum csum_partial_copy(const void *src, void *dst, int len, 18 int len, __wsum sum, int *csum_err); 19 #define csum_partial_copy_nocheck(src, dst, len, sum) \ 20 csum_partial_copy((src), (dst), (len), (sum)) 23 extern __sum16 ip_compute_csum(const void *buff, int len); 48 unsigned short len, csum_tcpudp_nofold() 63 : "r" (daddr), "r" ((ntohs(len) << 16) + (proto * 256)), csum_tcpudp_nofold() 72 unsigned short len, csum_tcpudp_magic() 75 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 47 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument 71 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_magic() argument
|
/linux-4.1.27/arch/arm/mach-davinci/ |
H A D | sram.c | 26 void *sram_alloc(size_t len, dma_addr_t *dma) sram_alloc() argument 35 return gen_pool_dma_alloc(sram_pool, len, dma); sram_alloc() 40 void sram_free(void *addr, size_t len) sram_free() argument 42 gen_pool_free(sram_pool, (unsigned long) addr, len); sram_free() 56 unsigned len = davinci_soc_info.sram_len; sram_init() local 60 if (len) { sram_init() 61 len = min_t(unsigned, len, SRAM_SIZE); sram_init() 68 addr = ioremap(phys, len); sram_init() 72 phys, len, -1); sram_init()
|
/linux-4.1.27/include/scsi/ |
H A D | fc_encode.h | 137 size_t len; fc_ct_ns_fill() local 179 len = strnlen(fc_host_symbolic_name(lport->host), 255); fc_ct_ns_fill() 180 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rspn) + len, fc_ct_ns_fill() 184 fc_host_symbolic_name(lport->host), len); fc_ct_ns_fill() 185 ct->payload.spn.fr_name_len = len; fc_ct_ns_fill() 189 len = strnlen(fc_host_symbolic_name(lport->host), 255); fc_ct_ns_fill() 190 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rsnn) + len, fc_ct_ns_fill() 194 fc_host_symbolic_name(lport->host), len); fc_ct_ns_fill() 195 ct->payload.snn.fr_name_len = len; fc_ct_ns_fill() 221 size_t len; fc_ct_ms_fill() local 229 len = sizeof(struct fc_fdmi_rhba); fc_ct_ms_fill() 230 len -= sizeof(struct fc_fdmi_attr_entry); fc_ct_ms_fill() 231 len += (numattrs * FC_FDMI_ATTR_ENTRY_HEADER_LEN); fc_ct_ms_fill() 232 len += FC_FDMI_HBA_ATTR_NODENAME_LEN; fc_ct_ms_fill() 233 len += FC_FDMI_HBA_ATTR_MANUFACTURER_LEN; fc_ct_ms_fill() 234 len += FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN; fc_ct_ms_fill() 235 len += FC_FDMI_HBA_ATTR_MODEL_LEN; fc_ct_ms_fill() 236 len += FC_FDMI_HBA_ATTR_MODELDESCR_LEN; fc_ct_ms_fill() 237 len += FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN; fc_ct_ms_fill() 238 len += FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN; fc_ct_ms_fill() 239 len += FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN; fc_ct_ms_fill() 240 len += FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN; fc_ct_ms_fill() 241 len += FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN; fc_ct_ms_fill() 242 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, fc_ct_ms_fill() 259 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 260 len += FC_FDMI_HBA_ATTR_NODENAME_LEN; fc_ct_ms_fill() 263 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 270 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 271 len += FC_FDMI_HBA_ATTR_MANUFACTURER_LEN; fc_ct_ms_fill() 274 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 282 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 283 len += FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN; fc_ct_ms_fill() 286 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 294 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 295 len += FC_FDMI_HBA_ATTR_MODEL_LEN; fc_ct_ms_fill() 298 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 306 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 307 len += FC_FDMI_HBA_ATTR_MODELDESCR_LEN; fc_ct_ms_fill() 310 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 318 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 319 len += FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN; fc_ct_ms_fill() 322 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 330 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 331 len += FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN; fc_ct_ms_fill() 334 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 342 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 343 len += FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN; fc_ct_ms_fill() 346 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 354 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 355 len += FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN; fc_ct_ms_fill() 358 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 366 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 367 len += FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN; fc_ct_ms_fill() 370 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 379 len = sizeof(struct fc_fdmi_rpa); fc_ct_ms_fill() 380 len -= sizeof(struct fc_fdmi_attr_entry); fc_ct_ms_fill() 381 len += (numattrs * FC_FDMI_ATTR_ENTRY_HEADER_LEN); fc_ct_ms_fill() 382 len += FC_FDMI_PORT_ATTR_FC4TYPES_LEN; fc_ct_ms_fill() 383 len += FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN; fc_ct_ms_fill() 384 len += FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN; fc_ct_ms_fill() 385 len += FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN; fc_ct_ms_fill() 386 len += FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN; fc_ct_ms_fill() 387 len += FC_FDMI_PORT_ATTR_HOSTNAME_LEN; fc_ct_ms_fill() 388 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, fc_ct_ms_fill() 403 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 404 len += FC_FDMI_PORT_ATTR_FC4TYPES_LEN; fc_ct_ms_fill() 407 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 414 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 415 len += FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN; fc_ct_ms_fill() 418 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 426 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 427 len += FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN; fc_ct_ms_fill() 430 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 437 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 438 len += FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN; fc_ct_ms_fill() 441 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 448 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 449 len += FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN; fc_ct_ms_fill() 452 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 462 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; fc_ct_ms_fill() 463 len += FC_FDMI_PORT_ATTR_HOSTNAME_LEN; fc_ct_ms_fill() 466 put_unaligned_be16(len, &entry->len); fc_ct_ms_fill() 478 len = sizeof(struct fc_fdmi_dprt); fc_ct_ms_fill() 479 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, fc_ct_ms_fill() 486 len = sizeof(struct fc_fdmi_dhba); fc_ct_ms_fill() 487 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, fc_ct_ms_fill()
|
/linux-4.1.27/fs/gfs2/ |
H A D | acl.c | 47 int len; gfs2_get_acl() local 56 len = gfs2_xattr_acl_get(ip, name, &data); gfs2_get_acl() 57 if (len < 0) gfs2_get_acl() 58 return ERR_PTR(len); gfs2_get_acl() 59 if (len == 0) gfs2_get_acl() 62 acl = posix_acl_from_xattr(&init_user_ns, data, len); gfs2_get_acl() 70 int len; gfs2_set_acl() local 96 len = posix_acl_to_xattr(&init_user_ns, acl, NULL, 0); gfs2_set_acl() 97 if (len == 0) gfs2_set_acl() 99 data = kmalloc(len, GFP_NOFS); gfs2_set_acl() 102 error = posix_acl_to_xattr(&init_user_ns, acl, data, len); gfs2_set_acl() 107 len = 0; gfs2_set_acl() 110 error = __gfs2_xattr_set(inode, name, data, len, 0, GFS2_EATYPE_SYS); gfs2_set_acl()
|
/linux-4.1.27/net/caif/ |
H A D | cfpkt_skbuff.c | 80 static struct cfpkt *cfpkt_create_pfx(u16 len, u16 pfx) cfpkt_create_pfx() argument 85 skb = alloc_skb(len + pfx, GFP_ATOMIC); cfpkt_create_pfx() 87 skb = alloc_skb(len + pfx, GFP_KERNEL); cfpkt_create_pfx() 96 inline struct cfpkt *cfpkt_create(u16 len) cfpkt_create() argument 98 return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX); cfpkt_create() 110 return skb->len > 0; cfpkt_more() 113 int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len) cfpkt_peek_head() argument 116 if (skb_headlen(skb) >= len) { cfpkt_peek_head() 117 memcpy(data, skb->data, len); cfpkt_peek_head() 120 return !cfpkt_extr_head(pkt, data, len) && cfpkt_peek_head() 121 !cfpkt_add_head(pkt, data, len); cfpkt_peek_head() 124 int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len) cfpkt_extr_head() argument 131 if (unlikely(len > skb->len)) { cfpkt_extr_head() 136 if (unlikely(len > skb_headlen(skb))) { cfpkt_extr_head() 142 from = skb_pull(skb, len); cfpkt_extr_head() 143 from -= len; cfpkt_extr_head() 145 memcpy(data, from, len); cfpkt_extr_head() 150 int cfpkt_extr_trail(struct cfpkt *pkt, void *dta, u16 len) cfpkt_extr_trail() argument 162 if (unlikely(skb->data + len > skb_tail_pointer(skb))) { cfpkt_extr_trail() 166 from = skb_tail_pointer(skb) - len; cfpkt_extr_trail() 167 skb_trim(skb, skb->len - len); cfpkt_extr_trail() 168 memcpy(data, from, len); cfpkt_extr_trail() 172 int cfpkt_pad_trail(struct cfpkt *pkt, u16 len) cfpkt_pad_trail() argument 174 return cfpkt_add_body(pkt, NULL, len); cfpkt_pad_trail() 177 int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len) cfpkt_add_body() argument 191 if (unlikely(skb_tailroom(skb) < len)) { cfpkt_add_body() 192 if (likely(len < PKT_LEN_WHEN_EXTENDING)) cfpkt_add_body() 195 addlen = len; cfpkt_add_body() 209 to = pskb_put(skb, lastskb, len); cfpkt_add_body() 211 memcpy(to, data, len); cfpkt_add_body() 220 int cfpkt_add_head(struct cfpkt *pkt, const void *data2, u16 len) cfpkt_add_head() argument 229 if (unlikely(skb_headroom(skb) < len)) { cfpkt_add_head() 241 to = skb_push(skb, len); cfpkt_add_head() 242 memcpy(to, data, len); cfpkt_add_head() 247 inline int cfpkt_add_trail(struct cfpkt *pkt, const void *data, u16 len) cfpkt_add_trail() argument 249 return cfpkt_add_body(pkt, data, len); cfpkt_add_trail() 255 return skb->len; cfpkt_getlen() 275 int cfpkt_setlen(struct cfpkt *pkt, u16 len) cfpkt_setlen() argument 283 if (likely(len <= skb->len)) { cfpkt_setlen() 285 ___pskb_trim(skb, len); cfpkt_setlen() 287 skb_trim(skb, len); cfpkt_setlen() 293 if (unlikely(!cfpkt_pad_trail(pkt, len - skb->len))) cfpkt_setlen() 328 tmp->len = dstlen; cfpkt_append() 336 dst->len += addlen; cfpkt_append() 369 skb->len = pos; cfpkt_split() 373 skb2->len += len2nd; cfpkt_split()
|
/linux-4.1.27/include/linux/netfilter/ipset/ |
H A D | ip_set_comment.h | 23 size_t len = ext->comment ? strlen(ext->comment) : 0; ip_set_init_comment() local 29 if (!len) ip_set_init_comment() 31 if (unlikely(len > IPSET_MAX_COMMENT_SIZE)) ip_set_init_comment() 32 len = IPSET_MAX_COMMENT_SIZE; ip_set_init_comment() 33 comment->str = kzalloc(len + 1, GFP_ATOMIC); ip_set_init_comment() 36 strlcpy(comment->str, ext->comment, len + 1); ip_set_init_comment()
|
/linux-4.1.27/include/asm-generic/ |
H A D | cacheflush.h | 22 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) 26 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 28 memcpy(dst, src, len); \ 29 flush_icache_user_range(vma, page, vaddr, len); \ 31 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 32 memcpy(dst, src, len)
|
H A D | checksum.h | 5 * computes the checksum of a memory block at buff, length len, 16 extern __wsum csum_partial(const void *buff, int len, __wsum sum); 25 extern __wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum); 34 int len, __wsum sum, int *csum_err); 37 #define csum_partial_copy_nocheck(src, dst, len, sum) \ 38 csum_partial_copy((src), (dst), (len), (sum)) 68 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, 74 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 77 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 85 extern __sum16 ip_compute_csum(const void *buff, int len);
|
/linux-4.1.27/arch/um/kernel/ |
H A D | kmsg_dump.c | 12 size_t len = 0; kmsg_dumper_stdout() local 28 while (kmsg_dump_get_line(dumper, true, line, sizeof(line), &len)) { kmsg_dumper_stdout() 29 line[len] = '\0'; kmsg_dumper_stdout()
|
/linux-4.1.27/arch/tile/lib/ |
H A D | checksum.c | 19 __wsum do_csum(const unsigned char *buff, int len) do_csum() argument 24 if (len <= 0) do_csum() 29 len--; do_csum() 32 count = len >> 1; /* nr of 16-bit words.. */ do_csum() 37 len -= 2; do_csum() 47 len -= 4; do_csum() 70 if (len & 4) { do_csum() 77 if (len & 2) { do_csum() 82 if (len & 1) do_csum()
|
/linux-4.1.27/fs/qnx6/ |
H A D | namei.c | 22 int len = dentry->d_name.len; qnx6_lookup() local 24 if (len > QNX6_LONG_NAME_MAX) qnx6_lookup() 27 ino = qnx6_find_entry(len, dir, name, &page); qnx6_lookup()
|
/linux-4.1.27/include/linux/ |
H A D | seq_buf.h | 15 * @len: the amount of data inside the buffer 21 size_t len; member in struct:seq_buf 27 s->len = 0; seq_buf_clear() 41 * the len and size are set to be equal. 46 return s->len > s->size; seq_buf_has_overflowed() 52 s->len = s->size + 1; seq_buf_set_overflow() 64 return s->size - s->len; seq_buf_buffer_left() 70 return min(s->len, s->size); seq_buf_used() 83 WARN_ON(s->len > s->size + 1); seq_buf_get_buf() 85 if (s->len < s->size) { seq_buf_get_buf() 86 *bufp = s->buffer + s->len; seq_buf_get_buf() 87 return s->size - s->len; seq_buf_get_buf() 109 BUG_ON(s->len + num > s->size); seq_buf_commit() 110 s->len += num; seq_buf_commit() 123 extern int seq_buf_putmem(struct seq_buf *s, const void *mem, unsigned int len); 125 unsigned int len);
|
/linux-4.1.27/arch/mn10300/include/uapi/asm/ |
H A D | mman.h | 5 #define arch_mmap_check(addr, len, flags) \
|
/linux-4.1.27/arch/parisc/lib/ |
H A D | checksum.c | 41 static inline unsigned int do_csum(const unsigned char * buff, int len) do_csum() argument 46 if (len <= 0) do_csum() 51 len--; do_csum() 54 count = len >> 1; /* nr of 16-bit words.. */ do_csum() 59 len -= 2; do_csum() 85 if (len & 2) { do_csum() 90 if (len & 1) do_csum() 105 __wsum csum_partial(const void *buff, int len, __wsum sum) csum_partial() argument 107 unsigned int result = do_csum(buff, len); csum_partial() 118 int len, __wsum sum) csum_partial_copy_nocheck() 124 sum = csum_partial(src, len, sum); csum_partial_copy_nocheck() 125 memcpy(dst, src, len); csum_partial_copy_nocheck() 136 void *dst, int len, csum_partial_copy_from_user() 141 missing = copy_from_user(dst, src, len); csum_partial_copy_from_user() 143 memset(dst + len - missing, 0, missing); csum_partial_copy_from_user() 147 return csum_partial(dst, len, sum); csum_partial_copy_from_user() 117 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 135 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() argument
|
/linux-4.1.27/arch/c6x/lib/ |
H A D | checksum.c | 16 csum_partial_copy_from_user(const void __user *src, void *dst, int len, csum_partial_copy_from_user() argument 21 missing = __copy_from_user(dst, src, len); csum_partial_copy_from_user() 23 memset(dst + len - missing, 0, missing); csum_partial_copy_from_user() 28 return csum_partial(dst, len, sum); csum_partial_copy_from_user()
|
/linux-4.1.27/arch/ia64/lib/ |
H A D | clear_user.S | 20 #define len r33 define 58 cmp.eq p6,p0=r0,len // check for zero length 63 adds tmp=-1,len // br.ctop is repeat/until 64 mov ret0=len // return value is length at this point 67 cmp.lt p6,p0=16,len // if len > 16 then long memset 81 adds len=-1,len // countdown length using len 86 // len contains bytes left 88 mov ret0=len // faster than using ar.lc 97 // The use of len/len2 for countdown of the number of bytes left 105 (p6) adds len=-1,len;; // sync because buf is modified 109 (p6) adds len=-2,len;; 113 (p6) adds len=-4,len;; 117 (p6) adds len=-8,len;; 118 shr.u cnt=len,4 // number of 128-bit (2x64bit) words 148 ;; // needed to get len correct when error 150 adds len=-16,len 155 // tail correction based on len only 163 mov len2=len // for parallelization of error handling 164 mov len3=len 165 tbit.nz p6,p0=len,3 169 tbit.nz p7,p6=len,2 173 tbit.nz p6,p7=len,1 177 tbit.nz p7,p6=len,0 189 // len contains bytes left 198 (p6) mov len=len2 199 (p7) mov len=len3 203 // len contains bytes left 206 mov ret0=len
|
H A D | csum_partial_copy.c | 34 unsigned long do_csum_c(const unsigned char * buff, int len, unsigned int psum) do_csum_c() argument 39 if (len <= 0) do_csum_c() 44 len--; do_csum_c() 47 count = len >> 1; /* nr of 16-bit words.. */ do_csum_c() 52 len -= 2; do_csum_c() 60 len -= 4; do_csum_c() 77 if (len & 4) { do_csum_c() 82 if (len & 2) { do_csum_c() 87 if (len & 1) do_csum_c() 109 int len, __wsum psum, int *errp) csum_partial_copy_from_user() 119 if (__copy_from_user(dst, src, len) != 0 && errp) csum_partial_copy_from_user() 122 result = do_csum(dst, len); csum_partial_copy_from_user() 134 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 137 dst, len, sum, NULL); csum_partial_copy_nocheck() 108 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum psum, int *errp) csum_partial_copy_from_user() argument
|
/linux-4.1.27/arch/m68k/include/asm/ |
H A D | parport.h | 16 #define insl(port,buf,len) isa_insb(port,buf,(len)<<2) 17 #define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2)
|
/linux-4.1.27/arch/metag/include/asm/ |
H A D | mman.h | 8 int metag_mmap_check(unsigned long addr, unsigned long len,
|
H A D | checksum.h | 5 * computes the checksum of a memory block at buff, length len, 16 extern __wsum csum_partial(const void *buff, int len, __wsum sum); 25 extern __wsum csum_partial_copy(const void *src, void *dst, int len, 35 int len, __wsum sum, int *csum_err); 37 #define csum_partial_copy_nocheck(src, dst, len, sum) \ 38 csum_partial_copy((src), (dst), (len), (sum)) 62 unsigned short len, csum_tcpudp_nofold() 66 unsigned long len_proto = (proto + len) << 8; csum_tcpudp_nofold() 81 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 84 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 91 extern __sum16 ip_compute_csum(const void *buff, int len); 61 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument
|
/linux-4.1.27/sound/usb/caiaq/ |
H A D | input.h | 4 void snd_usb_caiaq_input_dispatch(struct snd_usb_caiaqdev *cdev, char *buf, unsigned int len);
|
H A D | midi.h | 6 int port, const char *buf, int len);
|
/linux-4.1.27/drivers/spi/ |
H A D | spi-dw.c | 58 u32 len = 0; dw_spi_show_regs() local 65 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 67 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 69 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 71 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 73 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 75 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 77 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 79 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 81 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 83 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 85 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 87 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 89 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 91 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 93 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 95 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 97 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 99 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, dw_spi_show_regs() 102 ret = simple_read_from_buffer(user_buf, count, ppos, buf, len); dw_spi_show_regs() 191 if (dws->tx_end - dws->len) { dw_writer() 210 if (dws->rx_end - dws->len) { dw_reader() 302 dws->tx_end = dws->tx + transfer->len; dw_spi_transfer_one() 304 dws->rx_end = dws->rx + transfer->len; dw_spi_transfer_one() 305 dws->len = transfer->len; dw_spi_transfer_one() 377 txlevel = min_t(u16, dws->fifo_len / 2, dws->len / dws->n_bytes); dw_spi_transfer_one()
|
/linux-4.1.27/drivers/media/dvb-core/ |
H A D | dvb_ringbuffer.c | 42 void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len) dvb_ringbuffer_init() argument 46 rbuf->size=len; dvb_ringbuffer_init() 111 ssize_t dvb_ringbuffer_read_user(struct dvb_ringbuffer *rbuf, u8 __user *buf, size_t len) dvb_ringbuffer_read_user() argument 113 size_t todo = len; dvb_ringbuffer_read_user() 116 split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0; dvb_ringbuffer_read_user() 129 return len; dvb_ringbuffer_read_user() 132 void dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len) dvb_ringbuffer_read() argument 134 size_t todo = len; dvb_ringbuffer_read() 137 split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0; dvb_ringbuffer_read() 150 ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, size_t len) dvb_ringbuffer_write() argument 152 size_t todo = len; dvb_ringbuffer_write() 155 split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0; dvb_ringbuffer_write() 166 return len; dvb_ringbuffer_write() 170 const u8 __user *buf, size_t len) dvb_ringbuffer_write_user() 173 size_t todo = len; dvb_ringbuffer_write_user() 176 split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0; dvb_ringbuffer_write_user() 181 return len - todo; dvb_ringbuffer_write_user() 188 return len - todo; dvb_ringbuffer_write_user() 191 return len; dvb_ringbuffer_write_user() 194 ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf, size_t len) dvb_ringbuffer_pkt_write() argument 199 DVB_RINGBUFFER_WRITE_BYTE(rbuf, len >> 8); dvb_ringbuffer_pkt_write() 200 DVB_RINGBUFFER_WRITE_BYTE(rbuf, len & 0xff); dvb_ringbuffer_pkt_write() 202 status = dvb_ringbuffer_write(rbuf, buf, len); dvb_ringbuffer_pkt_write() 209 int offset, u8 __user *buf, size_t len) dvb_ringbuffer_pkt_read_user() 218 if ((offset + len) > pktlen) len = pktlen - offset; dvb_ringbuffer_pkt_read_user() 221 todo = len; dvb_ringbuffer_pkt_read_user() 222 split = ((idx + len) > rbuf->size) ? rbuf->size - idx : 0; dvb_ringbuffer_pkt_read_user() 233 return len; dvb_ringbuffer_pkt_read_user() 237 int offset, u8* buf, size_t len) dvb_ringbuffer_pkt_read() 246 if ((offset + len) > pktlen) len = pktlen - offset; dvb_ringbuffer_pkt_read() 249 todo = len; dvb_ringbuffer_pkt_read() 250 split = ((idx + len) > rbuf->size) ? rbuf->size - idx : 0; dvb_ringbuffer_pkt_read() 258 return len; dvb_ringbuffer_pkt_read() 169 dvb_ringbuffer_write_user(struct dvb_ringbuffer *rbuf, const u8 __user *buf, size_t len) dvb_ringbuffer_write_user() argument 208 dvb_ringbuffer_pkt_read_user(struct dvb_ringbuffer *rbuf, size_t idx, int offset, u8 __user *buf, size_t len) dvb_ringbuffer_pkt_read_user() argument 236 dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx, int offset, u8* buf, size_t len) dvb_ringbuffer_pkt_read() argument
|
/linux-4.1.27/drivers/scsi/lpfc/ |
H A D | lpfc_debugfs.c | 137 int i, index, len, enable; lpfc_debugfs_disc_trc_data() local 149 len = 0; lpfc_debugfs_disc_trc_data() 160 len += snprintf(buf+len, size-len, buffer, lpfc_debugfs_disc_trc_data() 171 len += snprintf(buf+len, size-len, buffer, lpfc_debugfs_disc_trc_data() 178 return len; lpfc_debugfs_disc_trc_data() 203 int i, index, len, enable; lpfc_debugfs_slow_ring_trc_data() local 215 len = 0; lpfc_debugfs_slow_ring_trc_data() 226 len += snprintf(buf+len, size-len, buffer, lpfc_debugfs_slow_ring_trc_data() 237 len += snprintf(buf+len, size-len, buffer, lpfc_debugfs_slow_ring_trc_data() 244 return len; lpfc_debugfs_slow_ring_trc_data() 271 int len = 0; lpfc_debugfs_hbqinfo_data() local 297 len += snprintf(buf+len, size-len, "HBQ %d Info\n", i); lpfc_debugfs_hbqinfo_data() 305 len += snprintf(buf+len, size-len, lpfc_debugfs_hbqinfo_data() 312 len += snprintf(buf+len, size-len, lpfc_debugfs_hbqinfo_data() 319 len += snprintf(buf+len, size-len, lpfc_debugfs_hbqinfo_data() 331 len += snprintf(buf+len, size-len, "Unused\n"); lpfc_debugfs_hbqinfo_data() 338 len += snprintf(buf+len, size-len, "Unused\n"); lpfc_debugfs_hbqinfo_data() 348 len += snprintf(buf+len, size-len, lpfc_debugfs_hbqinfo_data() 357 len += snprintf(buf+len, size-len, "No DMAinfo?\n"); lpfc_debugfs_hbqinfo_data() 361 if (len > LPFC_HBQINFO_SIZE - 54) lpfc_debugfs_hbqinfo_data() 365 return len; lpfc_debugfs_hbqinfo_data() 391 int len = 0; lpfc_debugfs_dumpHBASlim_data() local 403 len += snprintf(buf+len, size-len, "HBA SLIM\n"); lpfc_debugfs_dumpHBASlim_data() 417 len += snprintf(buf+len, size-len, lpfc_debugfs_dumpHBASlim_data() 429 return len; lpfc_debugfs_dumpHBASlim_data() 450 int len = 0; lpfc_debugfs_dumpHostSlim_data() local 461 len += snprintf(buf+len, size-len, "SLIM Mailbox\n"); lpfc_debugfs_dumpHostSlim_data() 465 len += snprintf(buf+len, size-len, lpfc_debugfs_dumpHostSlim_data() 474 len += snprintf(buf+len, size-len, "SLIM PCB\n"); lpfc_debugfs_dumpHostSlim_data() 478 len += snprintf(buf+len, size-len, lpfc_debugfs_dumpHostSlim_data() 490 len += snprintf(buf+len, size-len, lpfc_debugfs_dumpHostSlim_data() 505 len += snprintf(buf+len, size-len, "HA:%08x CA:%08x HS:%08x " lpfc_debugfs_dumpHostSlim_data() 509 return len; lpfc_debugfs_dumpHostSlim_data() 530 int len = 0; lpfc_debugfs_nodelist_data() local 541 len += snprintf(buf+len, size-len, lpfc_debugfs_nodelist_data() 577 len += snprintf(buf+len, size-len, "%s DID:x%06x ", lpfc_debugfs_nodelist_data() 580 len += snprintf(buf+len, size-len, lpfc_debugfs_nodelist_data() 585 len += snprintf(buf+len, size-len, lpfc_debugfs_nodelist_data() 590 len += snprintf(buf+len, size-len, "RPI:%03d ", lpfc_debugfs_nodelist_data() 593 len += snprintf(buf+len, size-len, "RPI:none "); lpfc_debugfs_nodelist_data() 594 len += snprintf(buf+len, size-len, "flag:x%08x ", lpfc_debugfs_nodelist_data() 597 len += snprintf(buf+len, size-len, "UNKNOWN_TYPE "); lpfc_debugfs_nodelist_data() 599 len += snprintf(buf+len, size-len, "FC_NODE "); lpfc_debugfs_nodelist_data() 601 len += snprintf(buf+len, size-len, "FABRIC "); lpfc_debugfs_nodelist_data() 603 len += snprintf(buf+len, size-len, "FCP_TGT sid:%d ", lpfc_debugfs_nodelist_data() 606 len += snprintf(buf+len, size-len, "FCP_INITIATOR "); lpfc_debugfs_nodelist_data() 607 len += snprintf(buf+len, size-len, "usgmap:%x ", lpfc_debugfs_nodelist_data() 609 len += snprintf(buf+len, size-len, "refcnt:%x", lpfc_debugfs_nodelist_data() 611 len += snprintf(buf+len, size-len, "\n"); lpfc_debugfs_nodelist_data() 614 return len; lpfc_debugfs_nodelist_data() 743 debug->len = lpfc_debugfs_disc_trc_data(vport, debug->buffer, size); lpfc_debugfs_disc_trc_open() 793 debug->len = lpfc_debugfs_slow_ring_trc_data(phba, debug->buffer, size); lpfc_debugfs_slow_ring_trc_open() 834 debug->len = lpfc_debugfs_hbqinfo_data(phba, debug->buffer, lpfc_debugfs_hbqinfo_open() 876 debug->len = lpfc_debugfs_dumpHBASlim_data(phba, debug->buffer, lpfc_debugfs_dumpHBASlim_open() 918 debug->len = lpfc_debugfs_dumpHostSlim_data(phba, debug->buffer, lpfc_debugfs_dumpHostSlim_open() 949 debug->len = (1 << _dump_buf_data_order) << PAGE_SHIFT; lpfc_debugfs_dumpData_open() 979 debug->len = (1 << _dump_buf_dif_order) << PAGE_SHIFT; lpfc_debugfs_dumpDif_open() 1139 debug->len = lpfc_debugfs_nodelist_data(vport, debug->buffer, lpfc_debugfs_nodelist_open() 1169 return fixed_size_llseek(file, off, whence, debug->len); lpfc_debugfs_lseek() 1195 debug->len); lpfc_debugfs_read() 1416 int offset_label, offset, len = 0, index = LPFC_PCI_CFG_RD_SIZE; lpfc_idiag_pcicfg_read() local 1450 len += snprintf(pbuffer+len, LPFC_PCI_CFG_SIZE-len, lpfc_idiag_pcicfg_read() 1455 len += snprintf(pbuffer+len, LPFC_PCI_CFG_SIZE-len, lpfc_idiag_pcicfg_read() 1460 len += snprintf(pbuffer+len, LPFC_PCI_CFG_SIZE-len, lpfc_idiag_pcicfg_read() 1468 len = 0; lpfc_idiag_pcicfg_read() 1471 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_pcicfg_read() 1480 len += snprintf(pbuffer+len, LPFC_PCI_CFG_SIZE-len, lpfc_idiag_pcicfg_read() 1484 len += snprintf(pbuffer+len, LPFC_PCI_CFG_SIZE-len, lpfc_idiag_pcicfg_read() 1488 len += snprintf(pbuffer+len, lpfc_idiag_pcicfg_read() 1489 LPFC_PCI_CFG_SIZE-len, "\n"); lpfc_idiag_pcicfg_read() 1494 len += snprintf(pbuffer+len, LPFC_PCI_CFG_SIZE-len, lpfc_idiag_pcicfg_read() 1498 len += snprintf(pbuffer+len, LPFC_PCI_CFG_SIZE-len, lpfc_idiag_pcicfg_read() 1511 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_pcicfg_read() 1712 int offset_label, offset, offset_run, len = 0, index; lpfc_idiag_baracc_read() local 1769 len += snprintf(pbuffer+len, LPFC_PCI_BAR_RD_BUF_SIZE-len, lpfc_idiag_baracc_read() 1774 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_baracc_read() 1783 len += snprintf(pbuffer+len, LPFC_PCI_BAR_RD_BUF_SIZE-len, lpfc_idiag_baracc_read() 1788 len += snprintf(pbuffer+len, LPFC_PCI_BAR_RD_BUF_SIZE-len, lpfc_idiag_baracc_read() 1793 len += snprintf(pbuffer+len, lpfc_idiag_baracc_read() 1794 LPFC_PCI_BAR_RD_BUF_SIZE-len, "\n"); lpfc_idiag_baracc_read() 1800 len += snprintf(pbuffer+len, lpfc_idiag_baracc_read() 1801 LPFC_PCI_BAR_RD_BUF_SIZE-len, "\n"); lpfc_idiag_baracc_read() 1807 len += snprintf(pbuffer+len, lpfc_idiag_baracc_read() 1808 LPFC_PCI_BAR_RD_BUF_SIZE-len, "\n"); lpfc_idiag_baracc_read() 1811 len += snprintf(pbuffer+len, lpfc_idiag_baracc_read() 1812 LPFC_PCI_BAR_RD_BUF_SIZE-len, lpfc_idiag_baracc_read() 1835 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_baracc_read() 1998 int len = 0; lpfc_idiag_queinfo_read() local 2028 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2029 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2036 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2037 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2051 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2052 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2053 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2058 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2059 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2061 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2062 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2069 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2070 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2082 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2083 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2084 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2090 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2091 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2093 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2094 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2099 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2100 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2110 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2111 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2112 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2123 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2124 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2126 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2127 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2135 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2136 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2144 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2145 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2146 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2153 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2154 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2156 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2157 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2160 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2161 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2169 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2170 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2171 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2178 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2179 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2181 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2182 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2190 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2191 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2202 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2203 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2204 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2211 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2212 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2214 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2215 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2222 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2223 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2231 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2232 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2233 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2241 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2242 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2244 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2245 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2253 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2254 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2266 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2267 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2277 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2278 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2289 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2290 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2297 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2298 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2311 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2312 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2313 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2322 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2323 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2325 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2326 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2333 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2334 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2345 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2346 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2347 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2354 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2355 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2357 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2358 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2363 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2364 LPFC_QUE_INFO_GET_BUF_SIZE-len, lpfc_idiag_queinfo_read() 2374 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2375 LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n"); lpfc_idiag_queinfo_read() 2376 if (len >= max_cnt) lpfc_idiag_queinfo_read() 2382 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queinfo_read() 2385 len += snprintf(pbuffer+len, lpfc_idiag_queinfo_read() 2386 LPFC_QUE_INFO_GET_BUF_SIZE-len, "Truncated ...\n"); lpfc_idiag_queinfo_read() 2388 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queinfo_read() 2430 lpfc_idiag_queacc_read_qe(char *pbuffer, int len, struct lpfc_queue *pque, lpfc_idiag_queacc_read_qe() argument 2440 len += snprintf(pbuffer+len, LPFC_QUE_ACC_BUF_SIZE-len, lpfc_idiag_queacc_read_qe() 2446 len += snprintf(pbuffer+len, LPFC_QUE_ACC_BUF_SIZE-len, lpfc_idiag_queacc_read_qe() 2452 len += snprintf(pbuffer+len, lpfc_idiag_queacc_read_qe() 2453 LPFC_QUE_ACC_BUF_SIZE-len, "\n"); lpfc_idiag_queacc_read_qe() 2455 len += snprintf(pbuffer+len, LPFC_QUE_ACC_BUF_SIZE-len, "\n"); lpfc_idiag_queacc_read_qe() 2457 return len; lpfc_idiag_queacc_read_qe() 2485 int len = 0; lpfc_idiag_queacc_read() local 2511 len = lpfc_idiag_queacc_read_qe(pbuffer, len, pque, index); lpfc_idiag_queacc_read() 2513 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queacc_read() 2521 while (len < LPFC_QUE_ACC_SIZE - pque->entry_size) { lpfc_idiag_queacc_read() 2522 len = lpfc_idiag_queacc_read_qe(pbuffer, len, pque, index); lpfc_idiag_queacc_read() 2533 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queacc_read() 2774 * @len: The lenght of bytes to copied. 2786 int len, uint32_t drbregid) lpfc_idiag_drbacc_read_reg() 2794 len += snprintf(pbuffer+len, LPFC_DRB_ACC_BUF_SIZE-len, lpfc_idiag_drbacc_read_reg() 2799 len += snprintf(pbuffer+len, LPFC_DRB_ACC_BUF_SIZE-len, lpfc_idiag_drbacc_read_reg() 2804 len += snprintf(pbuffer+len, LPFC_DRB_ACC_BUF_SIZE-len, lpfc_idiag_drbacc_read_reg() 2809 len += snprintf(pbuffer+len, LPFC_DRB_ACC_BUF_SIZE-len, lpfc_idiag_drbacc_read_reg() 2817 return len; lpfc_idiag_drbacc_read_reg() 2845 int len = 0; lpfc_idiag_drbacc_read() local 2866 len = lpfc_idiag_drbacc_read_reg(phba, lpfc_idiag_drbacc_read() 2867 pbuffer, len, i); lpfc_idiag_drbacc_read() 2869 len = lpfc_idiag_drbacc_read_reg(phba, lpfc_idiag_drbacc_read() 2870 pbuffer, len, drb_reg_id); lpfc_idiag_drbacc_read() 2872 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_drbacc_read() 2976 * @len: The lenght of bytes to copied. 2988 int len, uint32_t ctlregid) lpfc_idiag_ctlacc_read_reg() 2996 len += snprintf(pbuffer+len, LPFC_CTL_ACC_BUF_SIZE-len, lpfc_idiag_ctlacc_read_reg() 3002 len += snprintf(pbuffer+len, LPFC_CTL_ACC_BUF_SIZE-len, lpfc_idiag_ctlacc_read_reg() 3008 len += snprintf(pbuffer+len, LPFC_CTL_ACC_BUF_SIZE-len, lpfc_idiag_ctlacc_read_reg() 3014 len += snprintf(pbuffer+len, LPFC_CTL_ACC_BUF_SIZE-len, lpfc_idiag_ctlacc_read_reg() 3020 len += snprintf(pbuffer+len, LPFC_CTL_ACC_BUF_SIZE-len, lpfc_idiag_ctlacc_read_reg() 3026 len += snprintf(pbuffer+len, LPFC_CTL_ACC_BUF_SIZE-len, lpfc_idiag_ctlacc_read_reg() 3034 return len; lpfc_idiag_ctlacc_read_reg() 3060 int len = 0; lpfc_idiag_ctlacc_read() local 3081 len = lpfc_idiag_ctlacc_read_reg(phba, lpfc_idiag_ctlacc_read() 3082 pbuffer, len, i); lpfc_idiag_ctlacc_read() 3084 len = lpfc_idiag_ctlacc_read_reg(phba, lpfc_idiag_ctlacc_read() 3085 pbuffer, len, ctl_reg_id); lpfc_idiag_ctlacc_read() 3087 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_ctlacc_read() 3212 int len = 0; lpfc_idiag_mbxacc_get_setup() local 3219 len += snprintf(pbuffer+len, LPFC_MBX_ACC_BUF_SIZE-len, lpfc_idiag_mbxacc_get_setup() 3221 len += snprintf(pbuffer+len, LPFC_MBX_ACC_BUF_SIZE-len, lpfc_idiag_mbxacc_get_setup() 3223 len += snprintf(pbuffer+len, LPFC_MBX_ACC_BUF_SIZE-len, lpfc_idiag_mbxacc_get_setup() 3225 len += snprintf(pbuffer+len, LPFC_MBX_ACC_BUF_SIZE-len, lpfc_idiag_mbxacc_get_setup() 3228 return len; lpfc_idiag_mbxacc_get_setup() 3253 int len = 0; lpfc_idiag_mbxacc_read() local 3271 len = lpfc_idiag_mbxacc_get_setup(phba, pbuffer); lpfc_idiag_mbxacc_read() 3273 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_mbxacc_read() 3361 * @len: length into the internal buffer data has been copied. 3370 lpfc_idiag_extacc_avail_get(struct lpfc_hba *phba, char *pbuffer, int len) lpfc_idiag_extacc_avail_get() argument 3374 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3377 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3381 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3384 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3388 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3391 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3395 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3398 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3402 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_avail_get() 3405 return len; lpfc_idiag_extacc_avail_get() 3412 * @len: length into the internal buffer data has been copied. 3421 lpfc_idiag_extacc_alloc_get(struct lpfc_hba *phba, char *pbuffer, int len) lpfc_idiag_extacc_alloc_get() argument 3426 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3429 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3434 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3438 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3441 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3446 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3450 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3453 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3458 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3462 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3465 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3470 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3474 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_alloc_get() 3477 return len; lpfc_idiag_extacc_alloc_get() 3484 * @len: length into the internal buffer data has been copied. 3493 lpfc_idiag_extacc_drivr_get(struct lpfc_hba *phba, char *pbuffer, int len) lpfc_idiag_extacc_drivr_get() argument 3498 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3501 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3505 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3511 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3516 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3523 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3528 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3535 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3540 len += snprintf(pbuffer+len, LPFC_EXT_ACC_BUF_SIZE-len, lpfc_idiag_extacc_drivr_get() 3547 return len; lpfc_idiag_extacc_drivr_get() 3619 int len = 0; lpfc_idiag_extacc_read() local 3636 len = lpfc_idiag_extacc_avail_get(phba, pbuffer, len); lpfc_idiag_extacc_read() 3638 len = lpfc_idiag_extacc_alloc_get(phba, pbuffer, len); lpfc_idiag_extacc_read() 3640 len = lpfc_idiag_extacc_drivr_get(phba, pbuffer, len); lpfc_idiag_extacc_read() 3642 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_extacc_read() 3832 int len = 0; lpfc_idiag_mbxacc_dump_bsg_mbox() local 3893 len = 0; lpfc_idiag_mbxacc_dump_bsg_mbox() 3894 len += snprintf(line_buf+len, lpfc_idiag_mbxacc_dump_bsg_mbox() 3895 LPFC_MBX_ACC_LBUF_SZ-len, lpfc_idiag_mbxacc_dump_bsg_mbox() 3898 len += snprintf(line_buf+len, LPFC_MBX_ACC_LBUF_SZ-len, lpfc_idiag_mbxacc_dump_bsg_mbox() 3928 int len = 0; lpfc_idiag_mbxacc_dump_issue_mbox() local 3959 len = 0; lpfc_idiag_mbxacc_dump_issue_mbox() 3961 len += snprintf(line_buf+len, lpfc_idiag_mbxacc_dump_issue_mbox() 3962 LPFC_MBX_ACC_LBUF_SZ-len, lpfc_idiag_mbxacc_dump_issue_mbox() 3965 len += snprintf(line_buf+len, LPFC_MBX_ACC_LBUF_SZ-len, lpfc_idiag_mbxacc_dump_issue_mbox() 3982 len = 0; lpfc_idiag_mbxacc_dump_issue_mbox() 3984 len += snprintf(line_buf+len, lpfc_idiag_mbxacc_dump_issue_mbox() 3985 LPFC_MBX_ACC_LBUF_SZ-len, lpfc_idiag_mbxacc_dump_issue_mbox() 3989 len += snprintf(line_buf+len, lpfc_idiag_mbxacc_dump_issue_mbox() 3990 LPFC_MBX_ACC_LBUF_SZ-len, lpfc_idiag_mbxacc_dump_issue_mbox() 3995 len += snprintf(line_buf+len, lpfc_idiag_mbxacc_dump_issue_mbox() 3996 LPFC_MBX_ACC_LBUF_SZ-len, " "); lpfc_idiag_mbxacc_dump_issue_mbox() 2785 lpfc_idiag_drbacc_read_reg(struct lpfc_hba *phba, char *pbuffer, int len, uint32_t drbregid) lpfc_idiag_drbacc_read_reg() argument 2987 lpfc_idiag_ctlacc_read_reg(struct lpfc_hba *phba, char *pbuffer, int len, uint32_t ctlregid) lpfc_idiag_ctlacc_read_reg() argument
|
/linux-4.1.27/drivers/scsi/fnic/ |
H A D | fnic_trace.c | 110 int len = 0; fnic_get_trace_data() local 140 len += snprintf(fnic_dbgfs_prt->buffer + len, fnic_get_trace_data() 141 (trace_max_pages * PAGE_SIZE * 3) - len, fnic_get_trace_data() 182 len += snprintf(fnic_dbgfs_prt->buffer + len, fnic_get_trace_data() 183 (trace_max_pages * PAGE_SIZE * 3) - len, fnic_get_trace_data() 199 return len; fnic_get_trace_data() 217 int len = 0; fnic_get_stats_data() local 221 len = snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 225 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 242 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 246 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 258 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 262 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 276 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 281 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 307 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 312 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 322 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 327 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 337 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 345 len += snprintf(debug->debug_buffer + len, buf_size - len, fnic_get_stats_data() 383 return len; fnic_get_stats_data() 664 int len = 0, j; fnic_fc_trace_get_data() local 677 len += snprintf(fnic_dbgfs_prt->buffer + len, fnic_fc_trace_get_data() 678 (fnic_fc_trace_max_pages * PAGE_SIZE * 3) - len, fnic_fc_trace_get_data() 680 "Host No: F Type: len: FCoE_FRAME:\n"); fnic_fc_trace_get_data() 693 fnic_dbgfs_prt, &len, rdata_flag); fnic_fc_trace_get_data() 697 len += snprintf(fnic_dbgfs_prt->buffer + len, fnic_fc_trace_get_data() 699 - len, "%02x", fc_trace[j] & 0xff); fnic_fc_trace_get_data() 701 len += snprintf(fnic_dbgfs_prt->buffer + len, fnic_fc_trace_get_data() 702 (fnic_fc_trace_max_pages * PAGE_SIZE * 3) - len, fnic_fc_trace_get_data() 711 return len; fnic_fc_trace_get_data() 719 * @orig_len: pointer to len 731 int j, i = 1, len; copy_and_format_trace_data() local 740 len = *orig_len; copy_and_format_trace_data() 745 len += snprintf(fnic_dbgfs_prt->buffer + len, copy_and_format_trace_data() 746 max_size - len, copy_and_format_trace_data() 758 len += snprintf(fnic_dbgfs_prt->buffer + len, copy_and_format_trace_data() 759 max_size - len, "%c", fc_trace[j]); copy_and_format_trace_data() 761 len += snprintf(fnic_dbgfs_prt->buffer + len, copy_and_format_trace_data() 762 max_size - len, "%02x", fc_trace[j] & 0xff); copy_and_format_trace_data() 763 len += snprintf(fnic_dbgfs_prt->buffer + len, copy_and_format_trace_data() 764 max_size - len, " "); copy_and_format_trace_data() 769 len += snprintf(fnic_dbgfs_prt->buffer copy_and_format_trace_data() 770 + len, max_size - len, copy_and_format_trace_data() 776 len += snprintf(fnic_dbgfs_prt->buffer + len, copy_and_format_trace_data() 777 max_size - len, "\n"); copy_and_format_trace_data() 778 *orig_len = len; copy_and_format_trace_data()
|
/linux-4.1.27/drivers/misc/cb710/ |
H A D | sgbuf2.c | 30 size_t len, left = 4; sg_dwiter_read_buffer() local 35 len = min(miter->length - miter->consumed, left); sg_dwiter_read_buffer() 36 memcpy(addr, miter->addr + miter->consumed, len); sg_dwiter_read_buffer() 37 miter->consumed += len; sg_dwiter_read_buffer() 38 left -= len; sg_dwiter_read_buffer() 41 addr += len; sg_dwiter_read_buffer() 59 size_t len; sg_dwiter_get_next_block() local 64 len = miter->length - miter->consumed; sg_dwiter_get_next_block() 66 if (likely(len >= 4 && !needs_unaligned_copy( sg_dwiter_get_next_block() 106 size_t len, left = 4; sg_dwiter_write_slow() local 110 len = min(miter->length - miter->consumed, left); sg_dwiter_write_slow() 111 memcpy(miter->addr, addr, len); sg_dwiter_write_slow() 112 miter->consumed += len; sg_dwiter_write_slow() 113 left -= len; sg_dwiter_write_slow() 116 addr += len; sg_dwiter_write_slow()
|
/linux-4.1.27/drivers/staging/gdm724x/ |
H A D | netlink_k.c | 34 #define ND_NLMSG_SPACE(len) (NLMSG_SPACE(len) + ND_IFINDEX_LEN) 37 #define ND_NLMSG_S_LEN(len) (len+ND_IFINDEX_LEN) 42 static void (*rcv_cb)(struct net_device *dev, u16 type, void *msg, int len); 57 if (skb->len < NLMSG_HDRLEN) { netlink_rcv_cb() 64 if (skb->len < nlh->nlmsg_len || nlh->nlmsg_len > ND_MAX_MSG_LEN) { netlink_rcv_cb() 66 skb->len, nlh->nlmsg_len); netlink_rcv_cb() 91 void (*cb)(struct net_device *dev, u16 type, void *msg, int len)) netlink_init() 115 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) netlink_send() argument 128 skb = alloc_skb(NLMSG_SPACE(len), GFP_ATOMIC); netlink_send() 134 nlh = nlmsg_put(skb, 0, seq, type, len, 0); netlink_send() 135 memcpy(NLMSG_DATA(nlh), msg, len); netlink_send() local 141 return len; netlink_send() 145 group, type, len, ret); netlink_send() 90 netlink_init(int unit, void (*cb)(struct net_device *dev, u16 type, void *msg, int len)) netlink_init() argument
|
/linux-4.1.27/drivers/staging/gdm72xx/ |
H A D | netlink_k.c | 29 #define ND_NLMSG_SPACE(len) (nlmsg_total_size(len) + ND_IFINDEX_LEN) 32 #define ND_NLMSG_S_LEN(len) (len+ND_IFINDEX_LEN) 45 static void (*rcv_cb)(struct net_device *dev, u16 type, void *msg, int len); 55 if (skb->len >= NLMSG_HDRLEN) { netlink_rcv_cb() 58 if (skb->len < nlh->nlmsg_len || netlink_rcv_cb() 61 skb->len, nlh->nlmsg_len); netlink_rcv_cb() 92 void *msg, int len)) netlink_init() 116 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) netlink_send() argument 129 skb = nlmsg_new(len, GFP_ATOMIC); netlink_send() 136 nlh = nlmsg_put(skb, 0, seq, type, len, 0); netlink_send() 141 memcpy(nlmsg_data(nlh), msg, len); netlink_send() local 149 return len; netlink_send() 152 group, type, len, ret); netlink_send() 91 netlink_init(int unit, void (*cb)(struct net_device *dev, u16 type, void *msg, int len)) netlink_init() argument
|
/linux-4.1.27/fs/cifs/ |
H A D | dns_resolve.c | 51 int len, rc; dns_resolve_server_name_to_ip() local 56 len = strlen(unc); dns_resolve_server_name_to_ip() 57 if (len < 3) { dns_resolve_server_name_to_ip() 63 len -= 2; dns_resolve_server_name_to_ip() 67 sep = memchr(hostname, '/', len); dns_resolve_server_name_to_ip() 69 len = sep - hostname; dns_resolve_server_name_to_ip() 75 rc = cifs_convert_address((struct sockaddr *)&ss, hostname, len); dns_resolve_server_name_to_ip() 80 rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL); dns_resolve_server_name_to_ip() 83 __func__, len, len, hostname); dns_resolve_server_name_to_ip() 86 __func__, len, len, hostname, *ip_addr); dns_resolve_server_name_to_ip() 90 name = kmalloc(len + 1, GFP_KERNEL); dns_resolve_server_name_to_ip() 93 memcpy(name, hostname, len); dns_resolve_server_name_to_ip() 94 name[len] = 0; dns_resolve_server_name_to_ip()
|
/linux-4.1.27/net/mac80211/ |
H A D | aes_cmac.c | 39 const u8 *addr[], const size_t *len, u8 *mac, aes_cmac_vector() 50 total_len += len[e]; aes_cmac_vector() 55 end = pos + len[0]; aes_cmac_vector() 63 end = pos + len[e]; aes_cmac_vector() 81 end = pos + len[e]; aes_cmac_vector() 99 size_t len[3]; ieee80211_aes_cmac() local 104 len[0] = AAD_LEN; ieee80211_aes_cmac() 106 len[1] = data_len - CMAC_TLEN; ieee80211_aes_cmac() 108 len[2] = CMAC_TLEN; ieee80211_aes_cmac() 110 aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN); ieee80211_aes_cmac() 117 size_t len[3]; ieee80211_aes_cmac_256() local 122 len[0] = AAD_LEN; ieee80211_aes_cmac_256() 124 len[1] = data_len - CMAC_TLEN_256; ieee80211_aes_cmac_256() 126 len[2] = CMAC_TLEN_256; ieee80211_aes_cmac_256() 128 aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN_256); ieee80211_aes_cmac_256() 38 aes_cmac_vector(struct crypto_cipher *tfm, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac, size_t mac_len) aes_cmac_vector() argument
|
/linux-4.1.27/security/keys/ |
H A D | trusted.h | 21 int len; member in struct:tpm_buf 25 #define INIT_BUF(tb) (tb->len = 0) 87 int len; dump_tpm_buf() local 90 len = LOAD32(buf, TPM_SIZE_OFFSET); dump_tpm_buf() 91 print_hex_dump(KERN_INFO, "", DUMP_PREFIX_NONE, 16, 1, buf, len, 0); dump_tpm_buf() 113 buf->data[buf->len++] = value; store8() 118 *(uint16_t *) & buf->data[buf->len] = htons(value); store16() 119 buf->len += sizeof value; store16() 124 *(uint32_t *) & buf->data[buf->len] = htonl(value); store32() 125 buf->len += sizeof value; store32() 129 const int len) storebytes() 131 memcpy(buf->data + buf->len, in, len); storebytes() 132 buf->len += len; storebytes() 128 storebytes(struct tpm_buf *buf, const unsigned char *in, const int len) storebytes() argument
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | string_64.h | 30 extern void *__memcpy(void *to, const void *from, size_t len); 34 extern void *memcpy(void *to, const void *from, size_t len); 36 #define memcpy(dst, src, len) \ 38 size_t __len = (len); \ 40 if (__builtin_constant_p(len) && __len >= 64) \ 52 #define memcpy(dst, src, len) __inline_memcpy((dst), (src), (len)) 77 #define memcpy(dst, src, len) __memcpy(dst, src, len) 78 #define memmove(dst, src, len) __memmove(dst, src, len)
|
H A D | dmi.h | 10 static __always_inline __init void *dmi_alloc(unsigned len) dmi_alloc() argument 12 return extend_brk(len, sizeof(int)); dmi_alloc()
|
H A D | checksum_32.h | 9 * computes the checksum of a memory block at buff, length len, 20 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum); 31 int len, __wsum sum, 42 int len, __wsum sum) csum_partial_copy_nocheck() 44 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); csum_partial_copy_nocheck() 49 int len, __wsum sum, csum_partial_copy_from_user() 57 len, sum, err_ptr, NULL); csum_partial_copy_from_user() 115 unsigned short len, csum_tcpudp_nofold() 125 "g" ((len + proto) << 8), "0" (sum)); csum_tcpudp_nofold() 134 unsigned short len, csum_tcpudp_magic() 138 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 146 static inline __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 148 return csum_fold(csum_partial(buff, len, 0)); ip_compute_csum() 154 __u32 len, unsigned short proto, csum_ipv6_magic() 170 "r" (htonl(len)), "r" (htonl(proto)), "0" (sum) csum_ipv6_magic() 182 int len, __wsum sum, csum_and_copy_to_user() 188 if (access_ok(VERIFY_WRITE, dst, len)) { csum_and_copy_to_user() 191 len, sum, NULL, err_ptr); csum_and_copy_to_user() 196 if (len) csum_and_copy_to_user() 41 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 47 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() argument 114 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument 133 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_magic() argument 152 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum sum) csum_ipv6_magic() argument 180 csum_and_copy_to_user(const void *src, void __user *dst, int len, __wsum sum, int *err_ptr) csum_and_copy_to_user() argument
|
/linux-4.1.27/arch/sh/kernel/ |
H A D | sys_sh.c | 31 asmlinkage int old_mmap(unsigned long addr, unsigned long len, old_mmap() argument 37 return sys_mmap_pgoff(addr, len, prot, flags, fd, off>>PAGE_SHIFT); old_mmap() 40 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, sys_mmap2() argument 53 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); sys_mmap2() 57 asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op) sys_cacheflush() argument 68 if (addr + len < addr) sys_cacheflush() 73 if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end) { sys_cacheflush() 80 __flush_invalidate_region((void *)addr, len); sys_cacheflush() 83 __flush_wback_region((void *)addr, len); sys_cacheflush() 86 __flush_purge_region((void *)addr, len); sys_cacheflush() 91 flush_icache_range(addr, addr+len); sys_cacheflush()
|
/linux-4.1.27/arch/mn10300/include/asm/ |
H A D | checksum.h | 14 extern __wsum csum_partial(const void *buff, int len, __wsum sum); 16 int len, __wsum sum); 18 int len, __wsum sum, 21 extern __wsum csum_partial(const void *buff, int len, __wsum sum); 22 extern __sum16 ip_compute_csum(const void *buff, int len); 25 extern __wsum csum_partial_copy(const void *src, void *dst, int len, 42 unsigned short len, csum_tcpudp_nofold() 48 tmp = (__wsum) ntohs(len) << 16; csum_tcpudp_nofold() 69 unsigned short len, csum_tcpudp_magic() 73 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 82 extern __wsum csum_and_copy_to_user(const void *src, void *dst, int len, 40 csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument 67 csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_magic() argument
|
/linux-4.1.27/arch/hexagon/lib/ |
H A D | io.c | 29 * @len: number of shorts to read 31 void __raw_readsw(const void __iomem *addr, void *data, int len) __raw_readsw() argument 39 while (len-- > 0) __raw_readsw() 48 * @len: number of shorts to read 50 void __raw_writesw(void __iomem *addr, const void *data, int len) __raw_writesw() argument 58 while (len-- > 0) __raw_writesw() 64 /* Pretty sure len is pre-adjusted for the length of the access already */ __raw_readsl() 65 void __raw_readsl(const void __iomem *addr, void *data, int len) __raw_readsl() argument 73 while (len-- > 0) __raw_readsl() 79 void __raw_writesl(void __iomem *addr, const void *data, int len) __raw_writesl() argument 87 while (len-- > 0) __raw_writesl()
|
/linux-4.1.27/arch/m68k/kernel/ |
H A D | sys_m68k.c | 39 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, sys_mmap2() argument 48 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); sys_mmap2() 67 cache_flush_040 (unsigned long addr, int scope, int cache, unsigned long len) cache_flush_040() argument 104 len = (len + (addr & 15) + 15) >> 4; cache_flush_040() 108 if (len <= tmp) cache_flush_040() 111 len -= tmp; cache_flush_040() 117 if (len <= tmp) cache_flush_040() 120 len -= tmp; cache_flush_040() 122 len = (len + 15) >> 4; cache_flush_040() 125 while (len--) cache_flush_040() 152 if (!--i && len) cache_flush_040() 166 if (len <= i) cache_flush_040() 168 len -= i; cache_flush_040() 179 len += (addr & ~PAGE_MASK) + (PAGE_SIZE - 1); cache_flush_040() 180 for (len >>= PAGE_SHIFT; len--; addr += PAGE_SIZE) cache_flush_040() 227 cache_flush_060 (unsigned long addr, int scope, int cache, unsigned long len) cache_flush_060() argument 264 len += addr & 15; cache_flush_060() 269 if (len <= tmp) cache_flush_060() 272 len -= tmp; cache_flush_060() 278 if (len <= tmp) cache_flush_060() 281 len -= tmp; cache_flush_060() 284 len = (len + 15) >> 4; cache_flush_060() 286 while (len--) cache_flush_060() 310 if (!--i && len) cache_flush_060() 327 if (len <= i) cache_flush_060() 329 len -= i; cache_flush_060() 340 len += (addr & ~PAGE_MASK) + (PAGE_SIZE - 1); cache_flush_060() 343 for (len >>= PAGE_SHIFT; len--; addr += PAGE_SIZE) cache_flush_060() 377 sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) sys_cacheflush() argument 394 if (addr + len < addr) sys_cacheflush() 404 if (!vma || addr < vma->vm_start || addr + len > vma->vm_end) sys_cacheflush() 409 if (scope == FLUSH_SCOPE_LINE && len < 256) { sys_cacheflush() 416 len >>= 2; sys_cacheflush() 417 while (len--) { sys_cacheflush() 442 if (len>=3*PAGE_SIZE && scope<FLUSH_SCOPE_PAGE) sys_cacheflush() 444 if (len>=10*PAGE_SIZE && scope<FLUSH_SCOPE_ALL) sys_cacheflush() 447 ret = cache_flush_040 (addr, scope, cache, len); sys_cacheflush() 449 ret = cache_flush_060 (addr, scope, cache, len); sys_cacheflush() 525 sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) sys_cacheflush() argument
|
/linux-4.1.27/drivers/net/caif/ |
H A D | caif_spi.c | 133 int len = 0; dbgfs_state() local 142 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 145 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), FLAVOR); dbgfs_state() 147 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 149 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 151 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 153 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 154 "Previous TX len: %d\n", cfspi->tx_ppck_len); dbgfs_state() 155 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 156 "Previous RX len: %d\n", cfspi->rx_ppck_len); dbgfs_state() 157 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 158 "Current TX len: %d\n", cfspi->tx_cpck_len); dbgfs_state() 159 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 160 "Current RX len: %d\n", cfspi->rx_cpck_len); dbgfs_state() 161 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 162 "Next TX len: %d\n", cfspi->tx_npck_len); dbgfs_state() 163 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_state() 164 "Next RX len: %d\n", cfspi->rx_npck_len); dbgfs_state() 166 if (len > DEBUGFS_BUF_SIZE) dbgfs_state() 167 len = DEBUGFS_BUF_SIZE; dbgfs_state() 169 size = simple_read_from_buffer(user_buf, count, ppos, buf, len); dbgfs_state() 178 int len = 0; print_frame() local 181 len += snprintf((buf + len), (size - len), print_frame() 187 len += snprintf((buf + len), (size - len), print_frame() 193 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), print_frame() 197 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), "\n"); print_frame() 198 return len; print_frame() 205 int len = 0; dbgfs_frame() local 215 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_frame() 218 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_frame() 221 len += print_frame((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_frame() 225 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_frame() 228 len += print_frame((buf + len), (DEBUGFS_BUF_SIZE - len), dbgfs_frame() 232 size = simple_read_from_buffer(user_buf, count, ppos, buf, len); dbgfs_frame() 331 int cfspi_xmitfrm(struct cfspi *cfspi, u8 *buf, size_t len) cfspi_xmitfrm() argument 366 skb_copy_bits(skb, 0, dst, skb->len); cfspi_xmitfrm() 367 dst += skb->len; cfspi_xmitfrm() 369 cfspi->ndev->stats.tx_bytes += skb->len; cfspi_xmitfrm() 375 epad = PAD_POW2((skb->len + spad), spi_up_tail_align); cfspi_xmitfrm() 380 } while ((dst - buf) < len); cfspi_xmitfrm() 426 epad = PAD_POW2((skb->len + spad), spi_up_tail_align); cfspi_xmitlen() 428 if ((skb->len + spad + epad + frm_len) <= CAIF_MAX_SPI_FRAME) { cfspi_xmitlen() 431 frm_len += skb->len + spad + epad; cfspi_xmitlen() 518 int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len) cfspi_rxfrm() argument 578 } while ((src - buf) < len); cfspi_rxfrm()
|
/linux-4.1.27/drivers/cpufreq/ |
H A D | cpufreq_stats.c | 52 ssize_t len = 0; show_time_in_state() local 57 len += sprintf(buf + len, "%u %llu\n", stats->freq_table[i], show_time_in_state() 61 return len; show_time_in_state() 68 ssize_t len = 0; show_trans_table() local 71 len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n"); show_trans_table() 72 len += snprintf(buf + len, PAGE_SIZE - len, " : "); show_trans_table() 74 if (len >= PAGE_SIZE) show_trans_table() 76 len += snprintf(buf + len, PAGE_SIZE - len, "%9u ", show_trans_table() 79 if (len >= PAGE_SIZE) show_trans_table() 82 len += snprintf(buf + len, PAGE_SIZE - len, "\n"); show_trans_table() 85 if (len >= PAGE_SIZE) show_trans_table() 88 len += snprintf(buf + len, PAGE_SIZE - len, "%9u: ", show_trans_table() 92 if (len >= PAGE_SIZE) show_trans_table() 94 len += snprintf(buf + len, PAGE_SIZE - len, "%9u ", show_trans_table() 97 if (len >= PAGE_SIZE) show_trans_table() 99 len += snprintf(buf + len, PAGE_SIZE - len, "\n"); show_trans_table() 101 if (len >= PAGE_SIZE) show_trans_table() 103 return len; show_trans_table()
|
/linux-4.1.27/drivers/video/fbdev/core/ |
H A D | fbcmap.c | 64 .len=2, .red=red2, .green=green2, .blue=blue2 67 .len=8, .red=red8, .green=green8, .blue=blue8 70 .len=4, .red=red4, .green=green4, .blue=blue4 73 .len=16, .red=red16, .green=green16, .blue=blue16 81 * @len: length of @cmap 85 * Allocates memory for a colormap @cmap. @len is the 92 int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags) fb_alloc_cmap_gfp() argument 94 int size = len * sizeof(u16); fb_alloc_cmap_gfp() 97 if (cmap->len != len) { fb_alloc_cmap_gfp() 99 if (!len) fb_alloc_cmap_gfp() 120 cmap->len = len; fb_alloc_cmap_gfp() 121 ret = fb_copy_cmap(fb_default_cmap(len), cmap); fb_alloc_cmap_gfp() 131 int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp) fb_alloc_cmap() argument 133 return fb_alloc_cmap_gfp(cmap, len, transp, GFP_ATOMIC); fb_alloc_cmap() 153 cmap->len = 0; fb_dealloc_cmap() 173 size = to->len - tooff; fb_copy_cmap() 174 if (size > (int) (from->len - fromoff)) fb_copy_cmap() 175 size = from->len - fromoff; fb_copy_cmap() 197 size = to->len - tooff; fb_cmap_to_user() 198 if (size > (int) (from->len - fromoff)) fb_cmap_to_user() 199 size = from->len - fromoff; fb_cmap_to_user() 245 for (i = 0; i < cmap->len; i++) { fb_set_cmap() 265 int rc, size = cmap->len * sizeof(u16); fb_set_user_cmap() 268 if (size < 0 || size < cmap->len) fb_set_user_cmap() 272 rc = fb_alloc_cmap_gfp(&umap, cmap->len, cmap->transp != NULL, fb_set_user_cmap() 298 * @len: size of palette for a depth 300 * Gets the default colormap for a specific screen depth. @len 307 const struct fb_cmap *fb_default_cmap(int len) fb_default_cmap() argument 309 if (len <= 2) fb_default_cmap() 311 if (len <= 4) fb_default_cmap() 313 if (len <= 8) fb_default_cmap()
|
/linux-4.1.27/sound/oss/ |
H A D | msnd.c | 106 f->len = 0; msnd_fifo_alloc() 116 f->len = f->tail = f->head = 0; msnd_fifo_make_empty() 119 int msnd_fifo_write_io(msnd_fifo *f, char __iomem *buf, size_t len) msnd_fifo_write_io() argument 123 while ((count < len) && (f->len != f->n)) { msnd_fifo_write_io() 128 nwritten = len - count; msnd_fifo_write_io() 134 if (nwritten > len - count) msnd_fifo_write_io() 135 nwritten = len - count; msnd_fifo_write_io() 142 f->len += nwritten; msnd_fifo_write_io() 150 int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len) msnd_fifo_write() argument 154 while ((count < len) && (f->len != f->n)) { msnd_fifo_write() 159 nwritten = len - count; msnd_fifo_write() 165 if (nwritten > len - count) msnd_fifo_write() 166 nwritten = len - count; msnd_fifo_write() 173 f->len += nwritten; msnd_fifo_write() 181 int msnd_fifo_read_io(msnd_fifo *f, char __iomem *buf, size_t len) msnd_fifo_read_io() argument 185 while ((count < len) && (f->len > 0)) { msnd_fifo_read_io() 190 nread = len - count; msnd_fifo_read_io() 196 if (nread > len - count) msnd_fifo_read_io() 197 nread = len - count; msnd_fifo_read_io() 204 f->len -= nread; msnd_fifo_read_io() 212 int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len) msnd_fifo_read() argument 216 while ((count < len) && (f->len > 0)) { msnd_fifo_read() 221 nread = len - count; msnd_fifo_read() 227 if (nread > len - count) msnd_fifo_read() 228 nread = len - count; msnd_fifo_read() 235 f->len -= nread; msnd_fifo_read() 301 int msnd_upload_host(multisound_dev_t *dev, char *bin, int len) msnd_upload_host() argument 305 if (len % 3 != 0) { msnd_upload_host() 310 for (i = 0; i < len; i += 3) msnd_upload_host()
|
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/ |
H A D | fwil.c | 107 brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) brcmf_fil_cmd_data() argument 118 len = min_t(uint, len, BRCMF_DCMD_MAXLEN); brcmf_fil_cmd_data() 120 err = brcmf_proto_set_dcmd(drvr, ifp->ifidx, cmd, data, len); brcmf_fil_cmd_data() 122 err = brcmf_proto_query_dcmd(drvr, ifp->ifidx, cmd, data, len); brcmf_fil_cmd_data() 133 brcmf_fil_cmd_data_set(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) brcmf_fil_cmd_data_set() argument 139 brcmf_dbg(FIL, "ifidx=%d, cmd=%d, len=%d\n", ifp->ifidx, cmd, len); brcmf_fil_cmd_data_set() 141 min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); brcmf_fil_cmd_data_set() 143 err = brcmf_fil_cmd_data(ifp, cmd, data, len, true); brcmf_fil_cmd_data_set() 150 brcmf_fil_cmd_data_get(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) brcmf_fil_cmd_data_get() argument 155 err = brcmf_fil_cmd_data(ifp, cmd, data, len, false); brcmf_fil_cmd_data_get() 157 brcmf_dbg(FIL, "ifidx=%d, cmd=%d, len=%d\n", ifp->ifidx, cmd, len); brcmf_fil_cmd_data_get() 159 min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); brcmf_fil_cmd_data_get() 200 u32 len; brcmf_create_iovar() local 202 len = strlen(name) + 1; brcmf_create_iovar() 204 if ((len + datalen) > buflen) brcmf_create_iovar() 207 memcpy(buf, name, len); brcmf_create_iovar() 211 memcpy(&buf[len], data, datalen); brcmf_create_iovar() 213 return len + datalen; brcmf_create_iovar() 219 u32 len) brcmf_fil_iovar_data_set() 227 brcmf_dbg(FIL, "ifidx=%d, name=%s, len=%d\n", ifp->ifidx, name, len); brcmf_fil_iovar_data_set() 229 min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); brcmf_fil_iovar_data_set() 231 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, brcmf_fil_iovar_data_set() 247 u32 len) brcmf_fil_iovar_data_get() 255 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, brcmf_fil_iovar_data_get() 261 memcpy(data, drvr->proto_buf, len); brcmf_fil_iovar_data_get() 267 brcmf_dbg(FIL, "ifidx=%d, name=%s, len=%d\n", ifp->ifidx, name, len); brcmf_fil_iovar_data_get() 269 min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); brcmf_fil_iovar_data_get() 342 void *data, u32 len) brcmf_fil_bsscfg_data_set() 350 brcmf_dbg(FIL, "ifidx=%d, bssidx=%d, name=%s, len=%d\n", ifp->ifidx, brcmf_fil_bsscfg_data_set() 351 ifp->bssidx, name, len); brcmf_fil_bsscfg_data_set() 353 min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); brcmf_fil_bsscfg_data_set() 355 buflen = brcmf_create_bsscfg(ifp->bssidx, name, data, len, brcmf_fil_bsscfg_data_set() 371 void *data, u32 len) brcmf_fil_bsscfg_data_get() 379 buflen = brcmf_create_bsscfg(ifp->bssidx, name, data, len, brcmf_fil_bsscfg_data_get() 385 memcpy(data, drvr->proto_buf, len); brcmf_fil_bsscfg_data_get() 390 brcmf_dbg(FIL, "ifidx=%d, bssidx=%d, name=%s, len=%d\n", ifp->ifidx, brcmf_fil_bsscfg_data_get() 391 ifp->bssidx, name, len); brcmf_fil_bsscfg_data_get() 393 min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); brcmf_fil_bsscfg_data_get() 218 brcmf_fil_iovar_data_set(struct brcmf_if *ifp, char *name, const void *data, u32 len) brcmf_fil_iovar_data_set() argument 246 brcmf_fil_iovar_data_get(struct brcmf_if *ifp, char *name, void *data, u32 len) brcmf_fil_iovar_data_get() argument 341 brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, char *name, void *data, u32 len) brcmf_fil_bsscfg_data_set() argument 370 brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, char *name, void *data, u32 len) brcmf_fil_bsscfg_data_get() argument
|
H A D | vendor.c | 32 const void *data, int len) brcmf_cfg80211_vndr_cmds_dcmd_handler() 42 if (len < sizeof(*cmdhdr)) { brcmf_cfg80211_vndr_cmds_dcmd_handler() 43 brcmf_err("vendor command too short: %d\n", len); brcmf_cfg80211_vndr_cmds_dcmd_handler() 52 if (cmdhdr->offset > len) { brcmf_cfg80211_vndr_cmds_dcmd_handler() 53 brcmf_err("bad buffer offset %d > %d\n", cmdhdr->offset, len); brcmf_cfg80211_vndr_cmds_dcmd_handler() 57 len -= cmdhdr->offset; brcmf_cfg80211_vndr_cmds_dcmd_handler() 58 ret_len = cmdhdr->len; brcmf_cfg80211_vndr_cmds_dcmd_handler() 59 if (ret_len > 0 || len > 0) { brcmf_cfg80211_vndr_cmds_dcmd_handler() 60 if (len > BRCMF_DCMD_MAXLEN) { brcmf_cfg80211_vndr_cmds_dcmd_handler() 61 brcmf_err("oversize input buffer %d\n", len); brcmf_cfg80211_vndr_cmds_dcmd_handler() 62 len = BRCMF_DCMD_MAXLEN; brcmf_cfg80211_vndr_cmds_dcmd_handler() 68 payload = max(ret_len, len) + 1; brcmf_cfg80211_vndr_cmds_dcmd_handler() 73 memcpy(dcmd_buf, (void *)cmdhdr + cmdhdr->offset, len); brcmf_cfg80211_vndr_cmds_dcmd_handler() local 74 *(char *)(dcmd_buf + len) = '\0'; brcmf_cfg80211_vndr_cmds_dcmd_handler() 30 brcmf_cfg80211_vndr_cmds_dcmd_handler(struct wiphy *wiphy, struct wireless_dev *wdev, const void *data, int len) brcmf_cfg80211_vndr_cmds_dcmd_handler() argument
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | disp.c | 30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *sub) nvbios_disp_table() 44 *len = nv_ro08(bios, data + 0x02); nvbios_disp_table() 59 nvbios_disp_entry(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len, u8 *sub) nvbios_disp_entry() argument 62 u16 data = nvbios_disp_table(bios, ver, &hdr, &cnt, len, sub); nvbios_disp_entry() 64 return data + hdr + (idx * *len); nvbios_disp_entry() 70 nvbios_disp_parse(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len, u8 *sub, nvbios_disp_parse() argument 73 u16 data = nvbios_disp_entry(bios, idx, ver, len, sub); nvbios_disp_parse() 74 if (data && *len >= 2) { nvbios_disp_parse() 83 u8 *ver, u8 *hdr, u8 *cnt, u8 *len) nvbios_outp_entry() 86 u16 data = nvbios_disp_parse(bios, idx, ver, len, hdr, &info); nvbios_outp_entry() 89 *len = 0x06; nvbios_outp_entry() 97 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_outp *info) nvbios_outp_parse() 99 u16 data = nvbios_outp_entry(bios, idx, ver, hdr, cnt, len); nvbios_outp_parse() 117 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_outp *info) nvbios_outp_match() 120 while ((data = nvbios_outp_parse(bios, idx++, ver, hdr, cnt, len, info)) || *ver) { nvbios_outp_match() 131 u8 *ver, u8 *hdr, u8 *cnt, u8 *len) nvbios_ocfg_entry() 134 return outp + *hdr + (idx * *len); nvbios_ocfg_entry() 140 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ocfg *info) nvbios_ocfg_parse() 142 u16 data = nvbios_ocfg_entry(bios, outp, idx, ver, hdr, cnt, len); nvbios_ocfg_parse() 153 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ocfg *info) nvbios_ocfg_match() 156 while ((data = nvbios_ocfg_parse(bios, outp, idx++, ver, hdr, cnt, len, info))) { nvbios_ocfg_match() 29 nvbios_disp_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *sub) nvbios_disp_table() argument 82 nvbios_outp_entry(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) nvbios_outp_entry() argument 96 nvbios_outp_parse(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_outp *info) nvbios_outp_parse() argument 116 nvbios_outp_match(struct nvkm_bios *bios, u16 type, u16 mask, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_outp *info) nvbios_outp_match() argument 130 nvbios_ocfg_entry(struct nvkm_bios *bios, u16 outp, u8 idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) nvbios_ocfg_entry() argument 139 nvbios_ocfg_parse(struct nvkm_bios *bios, u16 outp, u8 idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ocfg *info) nvbios_ocfg_parse() argument 152 nvbios_ocfg_match(struct nvkm_bios *bios, u16 outp, u16 type, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ocfg *info) nvbios_ocfg_match() argument
|
/linux-4.1.27/arch/metag/lib/ |
H A D | checksum.c | 49 static unsigned int do_csum(const unsigned char *buff, int len) do_csum() argument 54 if (len <= 0) do_csum() 63 len--; do_csum() 66 if (len >= 2) { do_csum() 69 len -= 2; do_csum() 72 if (len >= 4) { do_csum() 73 const unsigned char *end = buff + ((unsigned)len & ~3); do_csum() 85 if (len & 2) { do_csum() 90 if (len & 1) do_csum() 105 * computes the checksum of a memory block at buff, length len, 116 __wsum csum_partial(const void *buff, int len, __wsum wsum) csum_partial() argument 119 unsigned int result = do_csum(buff, len); csum_partial() 132 __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 134 return (__force __sum16)~do_csum(buff, len); ip_compute_csum() 142 csum_partial_copy_from_user(const void __user *src, void *dst, int len, csum_partial_copy_from_user() argument 147 missing = __copy_from_user(dst, src, len); csum_partial_copy_from_user() 149 memset(dst + len - missing, 0, missing); csum_partial_copy_from_user() 154 return csum_partial(dst, len, sum); csum_partial_copy_from_user() 162 csum_partial_copy(const void *src, void *dst, int len, __wsum sum) csum_partial_copy() argument 164 memcpy(dst, src, len); csum_partial_copy() 165 return csum_partial(dst, len, sum); csum_partial_copy()
|
/linux-4.1.27/scripts/mod/ |
H A D | sumversion.c | 170 const unsigned char *data, unsigned int len) md4_update() 174 mctx->byte_count += len; md4_update() 176 if (avail > len) { md4_update() 178 data, len); md4_update() 187 len -= avail; md4_update() 189 while (len >= sizeof(mctx->block)) { md4_update() 193 len -= sizeof(mctx->block); md4_update() 196 memcpy(mctx->block, data, len); md4_update() 199 static void md4_final_ascii(struct md4_ctx *mctx, char *out, unsigned int len) md4_final_ascii() argument 221 snprintf(out, len, "%08X%08X%08X%08X", md4_final_ascii() 230 static int parse_string(const char *file, unsigned long len, parse_string() argument 236 for (i = 1; i < len; i++) { parse_string() 244 static int parse_comment(const char *file, unsigned long len) parse_comment() argument 248 for (i = 2; i < len; i++) { parse_comment() 259 unsigned long i, len; parse_file() local 261 file = grab_file(fname, &len); parse_file() 265 for (i = 0; i < len; i++) { parse_file() 267 if (file[i] == '\\' && (i+1 < len) && file[i+1] == '\n') { parse_file() 278 i += parse_string(file+i, len - i, md); parse_file() 284 i += parse_comment(file+i, len - i); parse_file() 290 release_file(file, len); parse_file() 296 int len = strlen(objfile); is_static_library() local 297 if (objfile[len - 2] == '.' && objfile[len - 1] == 'a') is_static_library() 403 unsigned long len; get_src_version() local 422 file = grab_file(filelist, &len); get_src_version() 452 release_file(file, len); get_src_version() 484 unsigned int len, full_len; strip_rcs_crap() local 494 len = strlen("$Revision"); strip_rcs_crap() 495 if (version[len] == ':' || version[len] == '$') strip_rcs_crap() 496 len++; strip_rcs_crap() 497 while (isspace(version[len])) strip_rcs_crap() 498 len++; strip_rcs_crap() 499 memmove(version, version+len, full_len-len); strip_rcs_crap() 500 full_len -= len; strip_rcs_crap() 503 len = 0; strip_rcs_crap() 504 while (version[len] && !isspace(version[len])) strip_rcs_crap() 505 len++; strip_rcs_crap() 506 memmove(version + len, version + strlen(version), strip_rcs_crap() 169 md4_update(struct md4_ctx *mctx, const unsigned char *data, unsigned int len) md4_update() argument
|
/linux-4.1.27/drivers/media/pci/ttpci/ |
H A D | av7110_ca.h | 6 extern void CI_handle(struct av7110 *av7110, u8 *data, u16 len); 7 extern void ci_get_data(struct dvb_ringbuffer *cibuf, u8 *data, int len);
|
/linux-4.1.27/drivers/scsi/pcmcia/ |
H A D | nsp_message.c | 16 int ret, len; nsp_message_in() local 25 len = 0; nsp_message_in() 38 data->MsgBuffer[len] = data_reg; len++; nsp_message_in() 47 } while (ret > 0 && MSGBUF_SIZE > len); nsp_message_in() 49 data->MsgLen = len; nsp_message_in() 57 int len = data->MsgLen; nsp_message_out() local 74 } while (ret > 0 && len-- > 0); nsp_message_out()
|
/linux-4.1.27/drivers/net/wireless/orinoco/ |
H A D | scan.h | 15 size_t len); 18 size_t len);
|
/linux-4.1.27/drivers/video/fbdev/matrox/ |
H A D | matroxfb_crtc2.h | 17 unsigned int len; member in struct:matroxfb_dh_fb_info::__anon10566 26 unsigned int len; member in struct:matroxfb_dh_fb_info::__anon10567
|
/linux-4.1.27/include/uapi/linux/ |
H A D | hidraw.h | 36 #define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len) 37 #define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len) 39 #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len) 40 #define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
|
/linux-4.1.27/arch/avr32/include/asm/ |
H A D | string.h | 12 extern void *memset(void *b, int c, size_t len); 15 extern void *memcpy(void *to, const void *from, size_t len);
|
H A D | checksum.h | 12 * computes the checksum of a memory block at buff, length len, 23 __wsum csum_partial(const void *buff, int len, __wsum sum); 32 __wsum csum_partial_copy_generic(const void *src, void *dst, int len, 45 int len, __wsum sum) csum_partial_copy_nocheck() 47 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); csum_partial_copy_nocheck() 52 int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() 54 return csum_partial_copy_generic((const void __force *)src, dst, len, csum_partial_copy_from_user() 114 unsigned short len, csum_tcpudp_nofold() 123 : "r"(daddr), "r"(saddr), "r"(len + proto), csum_tcpudp_nofold() 135 unsigned short len, csum_tcpudp_magic() 139 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 147 static inline __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 149 return csum_fold(csum_partial(buff, len, 0)); ip_compute_csum() 44 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 51 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() argument 113 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument 134 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_magic() argument
|
/linux-4.1.27/sound/soc/codecs/ |
H A D | sigmadsp-i2c.c | 18 unsigned int addr, const uint8_t data[], size_t len) sigmadsp_write_i2c() 23 buf = kzalloc(2 + len, GFP_KERNEL | GFP_DMA); sigmadsp_write_i2c() 28 memcpy(buf + 2, data, len); sigmadsp_write_i2c() 30 ret = i2c_master_send(control_data, buf, len + 2); sigmadsp_write_i2c() 38 unsigned int addr, uint8_t data[], size_t len) sigmadsp_read_i2c() 48 msgs[0].len = sizeof(buf); sigmadsp_read_i2c() 53 msgs[1].len = len; sigmadsp_read_i2c() 17 sigmadsp_write_i2c(void *control_data, unsigned int addr, const uint8_t data[], size_t len) sigmadsp_write_i2c() argument 37 sigmadsp_read_i2c(void *control_data, unsigned int addr, uint8_t data[], size_t len) sigmadsp_read_i2c() argument
|
/linux-4.1.27/arch/sparc/crypto/ |
H A D | crc32c_glue.c | 53 extern void crc32c_sparc64(u32 *crcp, const u64 *data, unsigned int len); 55 static void crc32c_compute(u32 *crcp, const u64 *data, unsigned int len) crc32c_compute() argument 59 asm_len = len & ~7U; crc32c_compute() 63 len -= asm_len; crc32c_compute() 65 if (len) crc32c_compute() 66 *crcp = __crc32c_le(*crcp, (const unsigned char *) data, len); crc32c_compute() 70 unsigned int len) crc32c_sparc64_update() 74 crc32c_compute(crcp, (const u64 *) data, len); crc32c_sparc64_update() 79 static int __crc32c_sparc64_finup(u32 *crcp, const u8 *data, unsigned int len, __crc32c_sparc64_finup() argument 84 crc32c_compute(&tmp, (const u64 *) data, len); __crc32c_sparc64_finup() 91 unsigned int len, u8 *out) crc32c_sparc64_finup() 93 return __crc32c_sparc64_finup(shash_desc_ctx(desc), data, len, out); crc32c_sparc64_finup() 105 unsigned int len, u8 *out) crc32c_sparc64_digest() 107 return __crc32c_sparc64_finup(crypto_shash_ctx(desc->tfm), data, len, crc32c_sparc64_digest() 69 crc32c_sparc64_update(struct shash_desc *desc, const u8 *data, unsigned int len) crc32c_sparc64_update() argument 90 crc32c_sparc64_finup(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *out) crc32c_sparc64_finup() argument 104 crc32c_sparc64_digest(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *out) crc32c_sparc64_digest() argument
|
/linux-4.1.27/crypto/async_tx/ |
H A D | async_memcpy.c | 39 * @len: length in bytes 46 unsigned int src_offset, size_t len, async_memcpy() 50 &dest, 1, &src, 1, len); async_memcpy() 58 if (unmap && is_dma_copy_aligned(device, src_offset, dest_offset, len)) { async_memcpy() 67 unmap->addr[0] = dma_map_page(device->dev, src, src_offset, len, async_memcpy() 70 unmap->addr[1] = dma_map_page(device->dev, dest, dest_offset, len, async_memcpy() 72 unmap->len = len; async_memcpy() 75 unmap->addr[0], len, async_memcpy() 80 pr_debug("%s: (async) len: %zu\n", __func__, len); async_memcpy() 86 pr_debug("%s: (sync) len: %zu\n", __func__, len); async_memcpy() 94 memcpy(dest_buf, src_buf, len); async_memcpy() 45 async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, unsigned int src_offset, size_t len, struct async_submit_ctl *submit) async_memcpy() argument
|
H A D | async_xor.c | 79 xor_src_cnt, unmap->len, do_async_xor() 90 xor_src_cnt, unmap->len, do_async_xor() 114 int src_cnt, size_t len, struct async_submit_ctl *submit) do_sync_xor() 136 memset(dest_buf, 0, len); do_sync_xor() 141 xor_blocks(xor_src_cnt, len, dest_buf, &srcs[src_off]); do_sync_xor() 157 * @len: length in bytes 174 int src_cnt, size_t len, struct async_submit_ctl *submit) async_xor() 178 src_cnt, len); async_xor() 187 if (unmap && is_dma_xor_aligned(device, offset, 0, len)) { async_xor() 192 pr_debug("%s (async): len: %zu\n", __func__, len); async_xor() 194 unmap->len = len; async_xor() 200 offset, len, DMA_TO_DEVICE); async_xor() 204 unmap->addr[j] = dma_map_page(device->dev, dest, offset, len, async_xor() 214 pr_debug("%s (sync): len: %zu\n", __func__, len); async_xor() 229 do_sync_xor(dest, src_list, offset, src_cnt, len, submit); async_xor() 236 static int page_is_zero(struct page *p, unsigned int offset, size_t len) page_is_zero() argument 238 return !memchr_inv(page_address(p) + offset, 0, len); page_is_zero() 243 struct page **src_list, int src_cnt, size_t len) xor_val_chan() 249 src_cnt, len); xor_val_chan() 258 * @len: length in bytes 270 int src_cnt, size_t len, enum sum_check_flags *result, async_xor_val() 273 struct dma_chan *chan = xor_val_chan(submit, dest, src_list, src_cnt, len); async_xor_val() 284 is_dma_xor_aligned(device, offset, 0, len)) { async_xor_val() 288 pr_debug("%s: (async) len: %zu\n", __func__, len); async_xor_val() 297 offset, len, DMA_TO_DEVICE); async_xor_val() 300 unmap->len = len; async_xor_val() 303 len, result, async_xor_val() 311 unmap->addr, src_cnt, len, result, async_xor_val() 320 pr_debug("%s: (sync) len: %zu\n", __func__, len); async_xor_val() 328 tx = async_xor(dest, src_list, offset, src_cnt, len, submit); async_xor_val() 332 *result = !page_is_zero(dest, offset, len) << SUM_CHECK_P; async_xor_val() 113 do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset, int src_cnt, size_t len, struct async_submit_ctl *submit) do_sync_xor() argument 173 async_xor(struct page *dest, struct page **src_list, unsigned int offset, int src_cnt, size_t len, struct async_submit_ctl *submit) async_xor() argument 242 xor_val_chan(struct async_submit_ctl *submit, struct page *dest, struct page **src_list, int src_cnt, size_t len) xor_val_chan() argument 269 async_xor_val(struct page *dest, struct page **src_list, unsigned int offset, int src_cnt, size_t len, enum sum_check_flags *result, struct async_submit_ctl *submit) async_xor_val() argument
|
/linux-4.1.27/arch/xtensa/include/asm/ |
H A D | checksum.h | 19 * computes the checksum of a memory block at buff, length len, 30 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum); 41 int len, __wsum sum, 52 int len, __wsum sum) csum_partial_copy_nocheck() 54 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); csum_partial_copy_nocheck() 59 int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() 62 len, sum, err_ptr, NULL); csum_partial_copy_from_user() 126 unsigned short len, csum_tcpudp_nofold() 132 unsigned long len_proto = (len + proto) << 8; csum_tcpudp_nofold() 134 unsigned long len_proto = len + proto; csum_tcpudp_nofold() 160 unsigned short len, csum_tcpudp_magic() 164 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 172 static __inline__ __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 174 return csum_fold (csum_partial(buff, len, 0)); ip_compute_csum() 180 __u32 len, unsigned short proto, csum_ipv6_magic() 234 "r" (htonl(len)), "r" (htonl(proto)), "0" (sum) csum_ipv6_magic() 245 void __user *dst, int len, csum_and_copy_to_user() 248 if (access_ok(VERIFY_WRITE, dst, len)) csum_and_copy_to_user() 249 return csum_partial_copy_generic(src,dst,len,sum,NULL,err_ptr); csum_and_copy_to_user() 251 if (len) csum_and_copy_to_user() 51 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 58 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr) csum_partial_copy_from_user() argument 125 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_nofold() argument 159 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) csum_tcpudp_magic() argument 178 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum sum) csum_ipv6_magic() argument 244 csum_and_copy_to_user(const void *src, void __user *dst, int len, __wsum sum, int *err_ptr) csum_and_copy_to_user() argument
|
/linux-4.1.27/arch/powerpc/platforms/pseries/ |
H A D | nvram.c | 48 unsigned long len; pSeries_nvram_read() local 66 for (; count != 0; count -= len) { pSeries_nvram_read() 67 len = count; pSeries_nvram_read() 68 if (len > NVRW_CNT) pSeries_nvram_read() 69 len = NVRW_CNT; pSeries_nvram_read() 72 len) != 0) || len != done) { pSeries_nvram_read() 77 memcpy(p, nvram_buf, len); pSeries_nvram_read() 79 p += len; pSeries_nvram_read() 80 i += len; pSeries_nvram_read() 92 unsigned long len; pSeries_nvram_write() local 109 for (; count != 0; count -= len) { pSeries_nvram_write() 110 len = count; pSeries_nvram_write() 111 if (len > NVRW_CNT) pSeries_nvram_write() 112 len = NVRW_CNT; pSeries_nvram_write() 114 memcpy(nvram_buf, p, len); pSeries_nvram_write() 117 len) != 0) || len != done) { pSeries_nvram_write() 122 p += len; pSeries_nvram_write() 123 i += len; pSeries_nvram_write()
|
/linux-4.1.27/arch/nios2/kernel/ |
H A D | sys_nios2.c | 21 asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, sys_cacheflush() argument 26 if (len == 0) sys_cacheflush() 34 if (addr + len < addr) sys_cacheflush() 42 if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end) sys_cacheflush() 45 flush_cache_range(vma, addr, addr + len); sys_cacheflush()
|
/linux-4.1.27/arch/cris/include/asm/ |
H A D | cacheflush.h | 21 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) 25 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 26 memcpy(dst, src, len) 27 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 28 memcpy(dst, src, len)
|
/linux-4.1.27/arch/frv/lib/ |
H A D | checksum.c | 46 static unsigned long do_csum(const unsigned char * buff, int len) do_csum() argument 51 if (len <= 0) do_csum() 56 len--; do_csum() 59 count = len >> 1; /* nr of 16-bit words.. */ do_csum() 64 len -= 2; do_csum() 81 if (len & 2) { do_csum() 86 if (len & 1) do_csum() 96 * computes the checksum of a memory block at buff, length len, 107 __wsum csum_partial(const void *buff, int len, __wsum sum) csum_partial() argument 109 unsigned int result = do_csum(buff, len); csum_partial() 124 __sum16 ip_compute_csum(const void *buff, int len) ip_compute_csum() argument 126 return (__force __sum16)~do_csum(buff, len); ip_compute_csum() 136 int len, __wsum sum, int *csum_err) csum_partial_copy_from_user() 143 rem = copy_from_user(dst, src, len); csum_partial_copy_from_user() 147 memset(dst + len - rem, 0, rem); csum_partial_copy_from_user() 148 len = rem; csum_partial_copy_from_user() 151 return csum_partial(dst, len, sum); csum_partial_copy_from_user() 160 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck() argument 162 memcpy(dst, src, len); csum_partial_copy_nocheck() 163 return csum_partial(dst, len, sum); csum_partial_copy_nocheck() 135 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *csum_err) csum_partial_copy_from_user() argument
|
/linux-4.1.27/net/decnet/ |
H A D | sysctl_net_decnet.c | 140 size_t len; dn_node_address_handler() local 149 len = (*lenp < DN_ASCBUF_LEN) ? *lenp : (DN_ASCBUF_LEN-1); dn_node_address_handler() 151 if (copy_from_user(addr, buffer, len)) dn_node_address_handler() 154 addr[len] = 0; dn_node_address_handler() 166 *ppos += len; dn_node_address_handler() 172 len = strlen(addr); dn_node_address_handler() 173 addr[len++] = '\n'; dn_node_address_handler() 175 if (len > *lenp) len = *lenp; dn_node_address_handler() 177 if (copy_to_user(buffer, addr, len)) dn_node_address_handler() 180 *lenp = len; dn_node_address_handler() 181 *ppos += len; dn_node_address_handler() 190 size_t len; dn_def_dev_handler() local 235 len = strlen(devname); dn_def_dev_handler() 236 devname[len++] = '\n'; dn_def_dev_handler() 238 if (len > *lenp) len = *lenp; dn_def_dev_handler() 240 if (copy_to_user(buffer, devname, len)) dn_def_dev_handler() 243 *lenp = len; dn_def_dev_handler() 244 *ppos += len; dn_def_dev_handler()
|
/linux-4.1.27/net/netfilter/ |
H A D | nf_conntrack_amanda.c | 61 size_t len; member in struct:__anon14169 66 .len = 8, 70 .len = 1, 74 .len = 5, 78 .len = 5, 82 .len = 6, 95 u_int16_t len; amanda_help() local 110 if (dataoff >= skb->len) { amanda_help() 111 net_err_ratelimited("amanda_help: skblen = %u\n", skb->len); amanda_help() 115 start = skb_find_text(skb, dataoff, skb->len, amanda_help() 119 start += dataoff + search[SEARCH_CONNECT].len; amanda_help() 121 stop = skb_find_text(skb, start, skb->len, amanda_help() 131 off += start + search[i].len; amanda_help() 133 len = min_t(unsigned int, sizeof(pbuf) - 1, stop - off); amanda_help() 134 if (skb_copy_bits(skb, off, pbuf, len)) amanda_help() 136 pbuf[len] = '\0'; amanda_help() 139 len = tmp - pbuf; amanda_help() 140 if (port == 0 || len > 5) amanda_help() 158 off - dataoff, len, exp); amanda_help() 212 search[i].len, nf_conntrack_amanda_init()
|
/linux-4.1.27/arch/s390/crypto/ |
H A D | sha_common.c | 21 int s390_sha_update(struct shash_desc *desc, const u8 *data, unsigned int len) s390_sha_update() argument 30 ctx->count += len; s390_sha_update() 32 if ((index + len) < bsize) s390_sha_update() 42 len -= bsize - index; s390_sha_update() 47 if (len >= bsize) { s390_sha_update() 49 len & ~(bsize - 1)); s390_sha_update() 50 if (ret != (len & ~(bsize - 1))) s390_sha_update() 53 len -= ret; s390_sha_update() 56 if (len) s390_sha_update() 57 memcpy(ctx->buf + index , data, len); s390_sha_update()
|
/linux-4.1.27/arch/mips/txx9/generic/ |
H A D | spi_eeprom.c | 51 int len; member in struct:read_param 58 int len = read_param->len; early_seeprom_probe() local 67 while (len > 0) { early_seeprom_probe() 69 int c = len < AT250X0_PAGE_SIZE ? len : AT250X0_PAGE_SIZE; early_seeprom_probe() 74 len -= c; early_seeprom_probe() 89 unsigned char *buf, int len) spi_eeprom_read() 97 .len = len spi_eeprom_read() 88 spi_eeprom_read(int busid, int chipid, int address, unsigned char *buf, int len) spi_eeprom_read() argument
|
/linux-4.1.27/drivers/w1/ |
H A D | w1_netlink.c | 41 /* maximum value for first_cn->len */ 78 return (u8 *)block->cn - (u8 *)block->first_cn + block->cn->len; w1_reply_len() 84 u16 len = w1_reply_len(block); w1_unref_block() local 85 if (len) { w1_unref_block() 86 cn_netlink_send_mult(block->first_cn, len, w1_unref_block() 103 u16 len = w1_reply_len(block); w1_reply_make_space() local 104 if (len + space >= block->maxlen) { w1_reply_make_space() 105 cn_netlink_send_mult(block->first_cn, len, block->portid, 0, GFP_KERNEL); w1_reply_make_space() 106 block->first_cn->len = 0; w1_reply_make_space() 126 * block->cn->len does not include space for block->msg 132 block->msg = (struct w1_netlink_msg *)(block->cn->data + block->cn->len); w1_netlink_setup_msg() 137 block->cn->len); w1_netlink_setup_msg() 142 block->cn->len = 0; w1_netlink_setup_msg() 157 sizeof(struct w1_netlink_msg) + sizeof(*cmd) + cmd->len); w1_netlink_queue_cmd() 165 block->cn->len += sizeof(*block->msg); w1_netlink_queue_cmd() 166 block->msg->len = 0; w1_netlink_queue_cmd() 169 space = sizeof(*cmd) + cmd->len; w1_netlink_queue_cmd() 172 block->cn->len += space; w1_netlink_queue_cmd() 173 block->msg->len += space; w1_netlink_queue_cmd() 188 block->cn->len += sizeof(*req_msg); w1_netlink_queue_status() 189 block->msg->len = 0; w1_netlink_queue_status() 194 block->cn->len += sizeof(*cmd); w1_netlink_queue_status() 195 block->msg->len += sizeof(*cmd); w1_netlink_queue_status() 196 cmd->len = 0; w1_netlink_queue_status() 220 packet.cn.len = sizeof(packet.msg); w1_netlink_send_error() 221 packet.msg.len = 0; w1_netlink_send_error() 245 packet.cn.len = sizeof(*msg); w1_netlink_send() 248 packet.msg.len = 0; w1_netlink_send() 263 cache_cmd->len = 0; w1_send_slave() 267 data = (u64 *)(block->cmd->data + block->cmd->len); w1_send_slave() 270 block->cn->len += sizeof(*data); w1_send_slave() 271 block->msg->len += sizeof(*data); w1_send_slave() 272 block->cmd->len += sizeof(*data); w1_send_slave() 288 req_cmd->len = 0; w1_get_slaves() 314 w1_touch_block(dev, cmd->data, cmd->len); w1_process_command_io() 318 w1_read_block(dev, cmd->data, cmd->len); w1_process_command_io() 322 w1_write_block(dev, cmd->data, cmd->len); w1_process_command_io() 339 if (cmd->len != sizeof(*id)) w1_process_command_addremove() 409 dev_dbg(&sl->master->dev, "%s: %02x.%012llx.%02x: cmd=%02x, len=%u.\n", w1_process_command_slave() 411 sl->reg_num.crc, cmd->cmd, cmd->len); w1_process_command_slave() 432 cn->len = sizeof(struct w1_netlink_msg); w1_process_command_root() 437 msg->len = 0; w1_process_command_root() 442 if (cn->len + sizeof(*id) > PAGE_SIZE - sizeof(struct cn_msg)) { w1_process_command_root() 444 cn->len = sizeof(struct w1_netlink_msg); w1_process_command_root() 445 msg->len = 0; w1_process_command_root() 450 msg->len += sizeof(*id); w1_process_command_root() 451 cn->len += sizeof(*id); w1_process_command_root() 465 u16 mlen = node->msg->len; w1_process_cb() 466 u16 len; w1_process_cb() local 478 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) { w1_process_cb() 492 len = sizeof(*cmd) + cmd->len; w1_process_cb() 493 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); w1_process_cb() 494 mlen -= len; w1_process_cb() 521 u16 mlen = msg->len; w1_list_count_cmds() 522 u16 len; w1_list_count_cmds() local 525 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) w1_list_count_cmds() 535 len = sizeof(*cmd) + cmd->len; w1_list_count_cmds() 536 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); w1_list_count_cmds() 537 mlen -= len; w1_list_count_cmds() 579 msg_len = cn->len; w1_cn_callback() 581 if (msg->len + sizeof(struct w1_netlink_msg) > msg_len) { w1_cn_callback() 594 msg_len -= sizeof(struct w1_netlink_msg) + msg->len; w1_cn_callback() 596 sizeof(struct w1_netlink_msg) + msg->len); w1_cn_callback() 601 int reply_size = sizeof(*cn) + cn->len + slave_len; w1_cn_callback() 614 * cn->len doesn't include itself which is part of the block w1_cn_callback() 617 sizeof(struct w1_cb_block) + sizeof(*cn) + cn->len + w1_cn_callback() 633 memcpy(&block->request_cn, cn, sizeof(*cn) + cn->len); w1_cn_callback() 634 node = (struct w1_cb_node *)(block->request_cn.data + cn->len); w1_cn_callback() 650 msg_len = cn->len; w1_cn_callback() 656 if (msg->len + sizeof(struct w1_netlink_msg) > msg_len) { w1_cn_callback() 670 if (!msg->len) { w1_cn_callback() 683 pr_notice("%s: cn: %x.%x, wrong type: %u, len: %u.\n", w1_cn_callback() 685 msg->type, msg->len); w1_cn_callback() 718 msg_len -= sizeof(struct w1_netlink_msg) + msg->len; w1_cn_callback() 720 sizeof(struct w1_netlink_msg) + msg->len); w1_cn_callback()
|
/linux-4.1.27/drivers/staging/goldfish/ |
H A D | goldfish_nand.c | 43 enum nand_cmd cmd, u64 addr, u32 len, goldfish_nand_cmd_with_params() 70 cps->transfer_size = len; goldfish_nand_cmd_with_params() 78 u64 addr, u32 len, void *ptr) goldfish_nand_cmd() 85 if (goldfish_nand_cmd_with_params(mtd, cmd, addr, len, ptr, &rv)) { goldfish_nand_cmd() 89 writel(len, base + NAND_TRANSFER_SIZE); goldfish_nand_cmd() 101 u32 len = instr->len; goldfish_nand_erase() local 104 if (ofs + len > mtd->size) goldfish_nand_erase() 111 if (len % mtd->writesize) goldfish_nand_erase() 113 len = len / mtd->writesize * (mtd->writesize + mtd->oobsize); goldfish_nand_erase() 115 if (goldfish_nand_cmd(mtd, NAND_CMD_ERASE, ofs, len, NULL) != len) { goldfish_nand_erase() 116 pr_err("goldfish_nand_erase: erase failed, start %llx, len %x, dev_size %llx, erase_size %x\n", goldfish_nand_erase() 117 ofs, len, mtd->size, mtd->erasesize); goldfish_nand_erase() 127 pr_err("goldfish_nand_erase: invalid erase, start %llx, len %x, dev_size %llx, erase_size %x\n", goldfish_nand_erase() 128 ofs, len, mtd->size, mtd->erasesize); goldfish_nand_erase() 137 if (ofs + ops->len > mtd->size) goldfish_nand_read_oob() 139 if (ops->datbuf && ops->len && ops->len != mtd->writesize) goldfish_nand_read_oob() 151 ops->len, ops->datbuf); goldfish_nand_read_oob() 159 pr_err("goldfish_nand_read_oob: invalid read, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n", goldfish_nand_read_oob() 160 ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize); goldfish_nand_read_oob() 169 if (ofs + ops->len > mtd->size) goldfish_nand_write_oob() 171 if (ops->len && ops->len != mtd->writesize) goldfish_nand_write_oob() 183 ops->len, ops->datbuf); goldfish_nand_write_oob() 191 pr_err("goldfish_nand_write_oob: invalid write, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n", goldfish_nand_write_oob() 192 ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize); goldfish_nand_write_oob() 196 static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len, goldfish_nand_read() argument 201 if (from + len > mtd->size) goldfish_nand_read() 209 *retlen = goldfish_nand_cmd(mtd, NAND_CMD_READ, from, len, buf); goldfish_nand_read() 213 pr_err("goldfish_nand_read: invalid read, start %llx, len %zx, dev_size %llx, write_size %x\n", goldfish_nand_read() 214 from, len, mtd->size, mtd->writesize); goldfish_nand_read() 218 static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len, goldfish_nand_write() argument 223 if (to + len > mtd->size) goldfish_nand_write() 231 *retlen = goldfish_nand_cmd(mtd, NAND_CMD_WRITE, to, len, (void *)buf); goldfish_nand_write() 235 pr_err("goldfish_nand_write: invalid write, start %llx, len %zx, dev_size %llx, write_size %x\n", goldfish_nand_write() 236 to, len, mtd->size, mtd->writesize); goldfish_nand_write() 42 goldfish_nand_cmd_with_params(struct mtd_info *mtd, enum nand_cmd cmd, u64 addr, u32 len, void *ptr, u32 *rv) goldfish_nand_cmd_with_params() argument 77 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd, u64 addr, u32 len, void *ptr) goldfish_nand_cmd() argument
|
/linux-4.1.27/net/rose/ |
H A D | rose_subr.c | 109 int len, faclen = 0; rose_write_internal() local 111 len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 1; rose_write_internal() 115 len += 1 + ROSE_ADDR_LEN + ROSE_ADDR_LEN; rose_write_internal() 117 len += faclen; rose_write_internal() 122 len += 2; rose_write_internal() 126 if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL) rose_write_internal() 239 static int rose_parse_national(unsigned char *p, struct rose_facilities_struct *facilities, int len) rose_parse_national() argument 248 if (len < 2) rose_parse_national() 252 len -= 2; rose_parse_national() 256 if (len < 3) rose_parse_national() 262 len -= 3; rose_parse_national() 266 if (len < 4) rose_parse_national() 270 len -= 4; rose_parse_national() 274 if (len < 2) rose_parse_national() 277 if (len < 2 + l) rose_parse_national() 325 len -= l + 2; rose_parse_national() 328 } while (*p != 0x00 && len > 0); rose_parse_national() 333 static int rose_parse_ccitt(unsigned char *p, struct rose_facilities_struct *facilities, int len) rose_parse_ccitt() argument 341 if (len < 2) rose_parse_ccitt() 345 len -= 2; rose_parse_ccitt() 349 if (len < 3) rose_parse_ccitt() 353 len -= 3; rose_parse_ccitt() 357 if (len < 4) rose_parse_ccitt() 361 len -= 4; rose_parse_ccitt() 365 if (len < 2) rose_parse_ccitt() 387 len -= l + 2; rose_parse_ccitt() 390 } while (*p != 0x00 && len > 0); rose_parse_ccitt() 398 int facilities_len, len; rose_parse_facilities() local 411 len = rose_parse_national(p + 1, facilities, facilities_len - 1); rose_parse_facilities() 415 len = rose_parse_ccitt(p + 1, facilities, facilities_len - 1); rose_parse_facilities() 420 len = 1; rose_parse_facilities() 424 if (len < 0) rose_parse_facilities() 426 if (WARN_ON(len >= facilities_len)) rose_parse_facilities() 428 facilities_len -= len + 1; rose_parse_facilities() 429 p += len + 1; rose_parse_facilities() 440 int len, nb; rose_create_facilities() local 524 len = p - buffer; rose_create_facilities() 525 buffer[0] = len - 1; rose_create_facilities() 527 return len; rose_create_facilities()
|
/linux-4.1.27/drivers/net/wireless/ath/wil6210/ |
H A D | trace.h | 61 "MID %d id 0x%04x len %d timestamp %d", 163 __field(unsigned int, len) 174 __entry->len = d->dma.length; 183 TP_printk("index %d len %d mid %d cid %d tid %d mcs %d seq 0x%03x" 184 " type 0x%1x subtype 0x%1x", __entry->index, __entry->len, 190 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 frags), 191 TP_ARGS(vring, index, len, frags), 196 __field(unsigned int, len) 202 __entry->len = len; 204 TP_printk("vring %d index %d len %d frags %d", 205 __entry->vring, __entry->index, __entry->len, __entry->frags) 209 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 err), 210 TP_ARGS(vring, index, len, err), 215 __field(unsigned int, len) 220 __entry->len = len; 223 TP_printk("vring %d index %d len %d err 0x%02x", 224 __entry->vring, __entry->index, __entry->len,
|
/linux-4.1.27/ipc/ |
H A D | msgutil.c | 51 static struct msg_msg *alloc_msg(size_t len) alloc_msg() argument 57 alen = min(len, DATALEN_MSG); alloc_msg() 65 len -= alen; alloc_msg() 67 while (len > 0) { alloc_msg() 69 alen = min(len, DATALEN_SEG); alloc_msg() 76 len -= alen; alloc_msg() 86 struct msg_msg *load_msg(const void __user *src, size_t len) load_msg() argument 93 msg = alloc_msg(len); load_msg() 97 alen = min(len, DATALEN_MSG); load_msg() 102 len -= alen; load_msg() 104 alen = min(len, DATALEN_SEG); load_msg() 123 size_t len = src->m_ts; copy_msg() local 130 alen = min(len, DATALEN_MSG); copy_msg() 137 len -= alen; copy_msg() 138 alen = min(len, DATALEN_SEG); copy_msg() 153 int store_msg(void __user *dest, struct msg_msg *msg, size_t len) store_msg() argument 158 alen = min(len, DATALEN_MSG); store_msg() 163 len -= alen; store_msg() 165 alen = min(len, DATALEN_SEG); store_msg()
|
/linux-4.1.27/tools/perf/ui/tui/ |
H A D | util.c | 75 int x, y, len, key; ui_browser__input_window() local 86 len = sep - t; ui_browser__input_window() 87 if (max_len < len) ui_browser__input_window() 88 max_len = len; ui_browser__input_window() 114 len = 5; ui_browser__input_window() 115 while (len--) { ui_browser__input_window() 116 SLsmg_gotorc(y + len - 1, x); ui_browser__input_window() 128 len = 0; ui_browser__input_window() 134 if (len == 0) { ui_browser__input_window() 138 SLsmg_gotorc(y, x + --len); ui_browser__input_window() 141 buf[len] = key; ui_browser__input_window() 142 SLsmg_gotorc(y, x + len++); ui_browser__input_window() 150 if (len == sizeof(buf) - 1) { ui_browser__input_window() 159 buf[len] = '\0'; ui_browser__input_window() 160 strncpy(input, buf, len+1); ui_browser__input_window() 174 int len; ui__question_window() local 178 len = sep - t; ui__question_window() 179 if (max_len < len) ui__question_window() 180 max_len = len; ui__question_window()
|
/linux-4.1.27/arch/mips/cavium-octeon/ |
H A D | octeon-memcpy.S | 22 #define len a2 define 27 * memcpy copies len bytes from src to dst and sets v0 to dst. 34 * __copy_user copies up to len bytes from src to dst and sets a2 (len) to 66 * The exception handlers for stores adjust len (if necessary) and return. 151 * __copy_user sets len to 0 for success; else to an upper bound of 156 LEAF(memcpy) /* a0=dst a1=src a2=len */ 163 * Note: dst & src may be unaligned, len may be 0 171 sltu t0, len, NBYTES # Check if < 1 word 175 sltu t0, len, 4*NBYTES # Check if < 4 words 177 sltu t0, len, 8*NBYTES # Check if < 8 words 179 sltu t0, len, 16*NBYTES # Check if < 16 words 181 sltu t0, len, 128+1 # Check if len < 129 182 bnez t0, 1f # Skip prefetch if len is too short 183 sltu t0, len, 256+1 # Check if len < 257 184 bnez t0, 1f # Skip prefetch if len is too short 196 SUB len, len, 16*NBYTES 227 sltu t0, len, 256+1 # See if we can prefetch more 229 sltu t0, len, 128 # See if we can loop more time 236 beqz len, done 237 sltu t0, len, 8*NBYTES 244 SUB len, len, 8*NBYTES 258 beqz len, done 264 sltu t0, len, 4*NBYTES 271 SUB len, len, 4*NBYTES 277 beqz len, done 284 sltu t0, len, 1*NBYTES 291 SUB len, len, NBYTES 292 sltu t1, len, 8 301 SUB len, len, NBYTES 302 sltu t1, len, 8 311 SUB len, len, NBYTES 319 SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter 321 and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES 331 SUB len, len, 4*NBYTES 343 bne len, rem, 1b 347 beqz len, done 348 and rem, len, NBYTES-1 # rem = len % NBYTES 349 beq rem, len, copy_bytes 354 SUB len, len, NBYTES 357 bne len, rem, 1b 361 beqz len, done 364 /* 0 < len < NBYTES */ 367 SUB len, len, 1; \ 368 beqz len, done; \ 378 SUB len, len, 1 408 SUB len, AT, t0 # len number of uncopied bytes 418 * Clear len bytes starting at dst. Can't call __bzero because it 419 * might modify len. An inefficient loop for these rare times... 421 beqz len, done 422 SUB src, len, 1 434 ADD len, len, n*NBYTES 455 ADD len, len, 1 464 sltu t0, a1, t0 # dst + len <= src -> memcpy 465 sltu t1, a0, t1 # dst >= src + len -> memcpy 473 LEAF(__rmemcpy) /* a0=dst a1=src a2=len */ 477 ADD a0, a2 # dst = dst + len 478 ADD a1, a2 # src = src + len
|
/linux-4.1.27/drivers/media/usb/pvrusb2/ |
H A D | pvrusb2-ctrl.c | 286 unsigned int *len) pvr2_ctrl_custom_value_to_sym() 290 return cptr->info->val_to_sym(cptr,mask,val,buf,maxlen,len); pvr2_ctrl_custom_value_to_sym() 296 const char *buf,unsigned int len, pvr2_ctrl_custom_sym_to_value() 301 return cptr->info->sym_to_val(cptr,buf,len,maskptr,valptr); pvr2_ctrl_custom_sym_to_value() 307 char *ptr,unsigned int len) gen_bitmask_string() 323 cnt = scnprintf(ptr,len,"%s%s%s", gen_bitmask_string() 328 ptr += cnt; len -= cnt; uc += cnt; gen_bitmask_string() 337 cnt = scnprintf(ptr,len,"%s0x%lx", gen_bitmask_string() 340 ptr += cnt; len -= cnt; uc += cnt; gen_bitmask_string() 343 cnt = scnprintf(ptr,len,"%s+0x%lx", gen_bitmask_string() 346 ptr += cnt; len -= cnt; uc += cnt; gen_bitmask_string() 349 cnt = scnprintf(ptr,len,"%s+0x%lx", gen_bitmask_string() 352 ptr += cnt; len -= cnt; uc += cnt; gen_bitmask_string() 368 static int parse_token(const char *ptr,unsigned int len, parse_token() argument 382 if (slen != len) continue; parse_token() 390 ptr++; len--; parse_token() 392 if (len >= sizeof(buf)) return -EINVAL; parse_token() 393 memcpy(buf,ptr,len); parse_token() 394 buf[len] = 0; parse_token() 402 static int parse_mtoken(const char *ptr,unsigned int len, parse_mtoken() argument 417 if (slen != len) continue; parse_mtoken() 422 if (len >= sizeof(buf)) return -EINVAL; parse_mtoken() 423 memcpy(buf,ptr,len); parse_mtoken() 424 buf[len] = 0; parse_mtoken() 431 static int parse_tlist(const char *ptr,unsigned int len, parse_tlist() argument 440 while (len) { parse_tlist() 442 while ((cnt < len) && parse_tlist() 446 len -= cnt; parse_tlist() 451 len--; parse_tlist() 454 while (cnt < len) { parse_tlist() 465 len -= cnt; parse_tlist() 491 const char *ptr,unsigned int len, pvr2_ctrl_sym_to_value() 501 while ((cnt < len) && ((ptr[cnt] <= 32) || (ptr[cnt] >= 127))) cnt++; pvr2_ctrl_sym_to_value() 502 len -= cnt; ptr += cnt; pvr2_ctrl_sym_to_value() 504 while ((cnt < len) && ((ptr[len-(cnt+1)] <= 32) || pvr2_ctrl_sym_to_value() 505 (ptr[len-(cnt+1)] >= 127))) cnt++; pvr2_ctrl_sym_to_value() 506 len -= cnt; pvr2_ctrl_sym_to_value() 508 if (!len) return -EINVAL; pvr2_ctrl_sym_to_value() 512 ret = parse_token(ptr,len,valptr,NULL,0); pvr2_ctrl_sym_to_value() 518 ret = parse_token(ptr,len,valptr,boolNames, pvr2_ctrl_sym_to_value() 528 ptr,len,valptr, pvr2_ctrl_sym_to_value() 537 ptr,len,maskptr,valptr, pvr2_ctrl_sym_to_value() 550 unsigned int *len) pvr2_ctrl_value_to_sym_internal() 554 *len = 0; pvr2_ctrl_value_to_sym_internal() 556 *len = scnprintf(buf,maxlen,"%d",val); pvr2_ctrl_value_to_sym_internal() 559 *len = scnprintf(buf,maxlen,"%s",val ? "true" : "false"); pvr2_ctrl_value_to_sym_internal() 567 *len = scnprintf( pvr2_ctrl_value_to_sym_internal() 571 *len = 0; pvr2_ctrl_value_to_sym_internal() 576 *len = gen_bitmask_string( pvr2_ctrl_value_to_sym_internal() 590 unsigned int *len) pvr2_ctrl_value_to_sym() 595 buf,maxlen,len); pvr2_ctrl_value_to_sym() 283 pvr2_ctrl_custom_value_to_sym(struct pvr2_ctrl *cptr, int mask,int val, char *buf,unsigned int maxlen, unsigned int *len) pvr2_ctrl_custom_value_to_sym() argument 295 pvr2_ctrl_custom_sym_to_value(struct pvr2_ctrl *cptr, const char *buf,unsigned int len, int *maskptr,int *valptr) pvr2_ctrl_custom_sym_to_value() argument 305 gen_bitmask_string(int msk,int val,int msk_only, const char **names, char *ptr,unsigned int len) gen_bitmask_string() argument 490 pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, const char *ptr,unsigned int len, int *maskptr,int *valptr) pvr2_ctrl_sym_to_value() argument 547 pvr2_ctrl_value_to_sym_internal(struct pvr2_ctrl *cptr, int mask,int val, char *buf,unsigned int maxlen, unsigned int *len) pvr2_ctrl_value_to_sym_internal() argument 587 pvr2_ctrl_value_to_sym(struct pvr2_ctrl *cptr, int mask,int val, char *buf,unsigned int maxlen, unsigned int *len) pvr2_ctrl_value_to_sym() argument
|
/linux-4.1.27/drivers/scsi/arm/ |
H A D | oak.c | 44 int len) NCR5380_pwrite() 48 printk("writing %p len %d\n",addr, len); NCR5380_pwrite() 49 if(!len) return -1; NCR5380_pwrite() 59 int len) NCR5380_pread() 62 printk("reading %p len %d\n", addr, len); NCR5380_pread() 63 while(len > 0) NCR5380_pread() 80 if(len >= 128) NCR5380_pread() 84 len -= 128; NCR5380_pread() 90 len -= 1; NCR5380_pread() 91 if(len) NCR5380_pread() 93 len -= 1; NCR5380_pread() 43 NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *addr, int len) NCR5380_pwrite() argument 58 NCR5380_pread(struct Scsi_Host *instance, unsigned char *addr, int len) NCR5380_pread() argument
|
/linux-4.1.27/include/linux/usb/ |
H A D | association.h | 27 __u8 len; member in struct:wusb_am_attr 31 #define WUSB_AR_AssociationTypeId { .id = cpu_to_le16(0x0000), .len = cpu_to_le16(2) } 32 #define WUSB_AR_AssociationSubTypeId { .id = cpu_to_le16(0x0001), .len = cpu_to_le16(2) } 33 #define WUSB_AR_Length { .id = cpu_to_le16(0x0002), .len = cpu_to_le16(4) } 34 #define WUSB_AR_AssociationStatus { .id = cpu_to_le16(0x0004), .len = cpu_to_le16(4) } 35 #define WUSB_AR_LangID { .id = cpu_to_le16(0x0008), .len = cpu_to_le16(2) } 36 #define WUSB_AR_DeviceFriendlyName { .id = cpu_to_le16(0x000b), .len = cpu_to_le16(64) } /* max */ 37 #define WUSB_AR_HostFriendlyName { .id = cpu_to_le16(0x000c), .len = cpu_to_le16(64) } /* max */ 38 #define WUSB_AR_CHID { .id = cpu_to_le16(0x1000), .len = cpu_to_le16(16) } 39 #define WUSB_AR_CDID { .id = cpu_to_le16(0x1001), .len = cpu_to_le16(16) } 40 #define WUSB_AR_ConnectionContext { .id = cpu_to_le16(0x1002), .len = cpu_to_le16(48) } 41 #define WUSB_AR_BandGroups { .id = cpu_to_le16(0x1004), .len = cpu_to_le16(2) } 87 __le16 len; member in struct:wusb_cbaf_attr_hdr
|
/linux-4.1.27/arch/mips/lasat/ |
H A D | picvue_proc.c | 69 size_t len; pvc_line_proc_write() local 73 len = min(count, sizeof(kbuf) - 1); pvc_line_proc_write() 74 if (copy_from_user(kbuf, buf, len)) pvc_line_proc_write() 76 kbuf[len] = '\0'; pvc_line_proc_write() 78 if (len > 0 && kbuf[len - 1] == '\n') pvc_line_proc_write() 79 len--; pvc_line_proc_write() 82 strncpy(pvc_lines[lineno], kbuf, len); pvc_line_proc_write() 83 pvc_lines[lineno][len] = '\0'; pvc_line_proc_write() 104 size_t len; pvc_scroll_proc_write() local 107 len = min(count, sizeof(kbuf) - 1); pvc_scroll_proc_write() 108 if (copy_from_user(kbuf, buf, len)) pvc_scroll_proc_write() 110 kbuf[len] = '\0'; pvc_scroll_proc_write()
|
/linux-4.1.27/tools/testing/selftests/vm/ |
H A D | transhuge-stress.c | 60 size_t ram, len; main() local 74 len = ram; main() 78 len = atoll(argv[1]) << 20; main() 81 " and %zd MiB of ram", len >> HPAGE_SHIFT, len >> 20, main() 82 len >> (20 + HPAGE_SHIFT - PAGE_SHIFT - 1)); main() 88 len -= len % HPAGE_SIZE; main() 89 ptr = mmap(NULL, len + HPAGE_SIZE, PROT_READ | PROT_WRITE, main() 95 if (madvise(ptr, len, MADV_HUGEPAGE)) main() 109 for (p = ptr; p < ptr + len; p += HPAGE_SIZE) { main() 141 s, s * 1000 / (len >> HPAGE_SHIFT), len / s / (1 << 20), main()
|
/linux-4.1.27/tools/testing/selftests/breakpoints/ |
H A D | breakpoint_test.c | 51 static void toggle_breakpoint(int n, int type, int len, toggle_breakpoint() argument 71 switch (len) { toggle_breakpoint() 145 static void write_var(int len) write_var() argument 151 switch (len) { write_var() 173 static void read_var(int len) read_var() argument 179 switch (len) { read_var() 203 int len, local, global, i; trigger_tests() local 230 for (len = 1; len <= sizeof(long); len <<= 1) { trigger_tests() 235 write_var(len); trigger_tests() 241 for (len = 1; len <= sizeof(long); len <<= 1) { trigger_tests() 246 read_var(len); trigger_tests() 304 static void launch_watchpoints(char *buf, int mode, int len, launch_watchpoints() argument 317 toggle_breakpoint(i, mode, len, local, global, 1); launch_watchpoints() 319 sprintf(buf, "Test %s watchpoint %d with len: %d local: " launch_watchpoints() 320 "%d global: %d", mode_str, i, len, local, global); launch_watchpoints() 322 toggle_breakpoint(i, mode, len, local, global, 0); launch_watchpoints() 330 int len, local, global, i; launch_tests() local 342 for (len = 1; len <= sizeof(long); len <<= 1) { launch_tests() 347 launch_watchpoints(buf, BP_W, len, launch_tests() 354 for (len = 1; len <= sizeof(long); len <<= 1) { launch_tests() 359 launch_watchpoints(buf, BP_RW, len, launch_tests()
|
/linux-4.1.27/arch/mips/lib/ |
H A D | memcpy.S | 38 #define len a2 define 43 * memcpy copies len bytes from src to dst and sets v0 to dst. 50 * __copy_user copies up to len bytes from src to dst and sets a2 (len) to 82 * The exception handlers for stores adjust len (if necessary) and return. 273 * Note: dst & src may be unaligned, len may be 0 284 * If len < NBYTES use byte operations. 288 sltu t2, len, NBYTES 309 SRL t0, len, LOG_NBYTES+3 # +3 for 8 units/iter 310 beqz t0, .Lcleanup_both_aligned\@ # len < 8*NBYTES 311 and rem, len, (8*NBYTES-1) # rem = len % (8*NBYTES) 321 SUB len, len, 8*NBYTES 338 bne len, rem, 1b 342 * len == rem == the number of bytes left to copy < 8*NBYTES 345 beqz len, .Ldone\@ 346 sltu t0, len, 4*NBYTES 348 and rem, len, (NBYTES-1) # rem = len % NBYTES 350 * len >= 4*NBYTES 356 SUB len, len, 4*NBYTES 365 beqz len, .Ldone\@ 369 * rem = len % NBYTES 371 beq rem, len, .Lcopy_bytes\@ 377 SUB len, len, NBYTES 381 bne rem, len, 1b 397 beqz len, .Ldone\@ 398 ADD t1, dst, len # t1 is just past last byte of dst 400 SLL rem, len, 3 # rem = number of bits to keep 406 move len, zero 412 * len >= NBYTES 425 beq len, t2, .Ldone\@ 426 SUB len, len, t2 432 SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter 435 and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES 447 SUB len, len, 4*NBYTES 466 bne len, rem, 1b 470 beqz len, .Ldone\@ 471 and rem, len, NBYTES-1 # rem = len % NBYTES 472 beq rem, len, .Lcopy_bytes\@ 479 SUB len, len, NBYTES 483 bne len, rem, 1b 488 beqz len, .Ldone\@ 491 /* 0 < len < NBYTES */ 495 SUB len, len, 1; \ 496 beqz len, .Ldone\@; \ 508 SUB len, len, 1 563 SUB len, AT, t0 # len number of uncopied bytes 573 * Clear len bytes starting at dst. Can't call __bzero because it 574 * might modify len. An inefficient loop for these rare times... 577 SUB src, len, 1 578 beqz len, .Ldone\@ 600 ADD len, len, n*NBYTES; \ 615 ADD len, len, 1 627 sltu t0, a1, t0 # dst + len <= src -> memcpy 628 sltu t1, a0, t1 # dst >= src + len -> memcpy 636 LEAF(__rmemcpy) /* a0=dst a1=src a2=len */ 640 ADD a0, a2 # dst = dst + len 641 ADD a1, a2 # src = src + len 683 * __copy_user sets len to 0 for success; else to an upper bound of 688 LEAF(memcpy) /* a0=dst a1=src a2=len */
|
/linux-4.1.27/drivers/isdn/pcbit/ |
H A D | capi.c | 56 ushort len; capi_conn_req() local 74 len = 18 + strlen(calledPN); capi_conn_req() 77 len++; capi_conn_req() 79 if ((*skb = dev_alloc_skb(len)) == NULL) { capi_conn_req() 131 return len; capi_conn_req() 298 data_len = skb->len; capi_tdata_req() 335 return (*skb)->len; capi_tdata_resp() 385 int CIlen, len; capi_decode_conn_ind() local 418 len = skb->data[0]; capi_decode_conn_ind() 420 if (len > 0) { capi_decode_conn_ind() 429 if (!(info->data.setup.CallingPN = kmalloc(len - count + 1, GFP_ATOMIC))) capi_decode_conn_ind() 434 len - count); capi_decode_conn_ind() 435 info->data.setup.CallingPN[len - count] = 0; capi_decode_conn_ind() 443 skb_pull(skb, len + 1); capi_decode_conn_ind() 450 len = skb->data[0]; capi_decode_conn_ind() 452 if (len > 0) { capi_decode_conn_ind() 458 if (!(info->data.setup.CalledPN = kmalloc(len - count + 1, GFP_ATOMIC))) capi_decode_conn_ind() 463 len - count); capi_decode_conn_ind() 464 info->data.setup.CalledPN[len - count] = 0; capi_decode_conn_ind() 472 skb_pull(skb, len + 1); capi_decode_conn_ind() 530 ushort len; capi_decode_conn_actv_ind() local 540 len = *(skb->data); capi_decode_conn_actv_ind() 543 if (len > 1 && len < 31) { capi_decode_conn_actv_ind() 544 skb_copy_from_linear_data_offset(skb, 2, str, len - 1); capi_decode_conn_actv_ind() 545 str[len] = 0; capi_decode_conn_actv_ind() 549 printk(KERN_DEBUG "actv_ind CPN len = %d\n", len); capi_decode_conn_actv_ind() 552 skb_pull(skb, len + 1); capi_decode_conn_actv_ind() 610 ushort len; capi_decode_disc_ind() local 616 len = *(skb->data); capi_decode_disc_ind() 621 for (i = 0; i < len; i++) capi_decode_disc_ind() 626 skb_pull(skb, len); capi_decode_disc_ind() 635 int len; capi_decode_debug_188() local 637 len = hdr[0]; capi_decode_debug_188() 639 if (len < 64 && len == hdrlen - 1) { capi_decode_debug_188()
|
/linux-4.1.27/net/sunrpc/auth_gss/ |
H A D | gss_krb5_keys.c | 157 if ((inkey->len != keylength) || (outkey->len != keylength)) krb5_derive_key() 164 if (crypto_blkcipher_setkey(cipher, inkey->data, inkey->len)) krb5_derive_key() 183 inblock.len = blocksize; krb5_derive_key() 186 outblock.len = blocksize; krb5_derive_key() 190 if (in_constant->len == inblock.len) { krb5_derive_key() 191 memcpy(inblock.data, in_constant->data, inblock.len); krb5_derive_key() 193 krb5_nfold(in_constant->len * 8, in_constant->data, krb5_derive_key() 194 inblock.len * 8, inblock.data); krb5_derive_key() 202 outblock.data, inblock.len); krb5_derive_key() 204 if ((keybytes - n) <= outblock.len) { krb5_derive_key() 209 memcpy(rawkey + n, outblock.data, outblock.len); krb5_derive_key() 210 memcpy(inblock.data, outblock.data, outblock.len); krb5_derive_key() 211 n += outblock.len; krb5_derive_key() 217 inblock.len = keybytes; krb5_derive_key() 269 if (key->len != 24) { gss_krb5_des3_make_key() 270 dprintk("%s: key->len is %d\n", __func__, key->len); gss_krb5_des3_make_key() 273 if (randombits->len != 21) { gss_krb5_des3_make_key() 274 dprintk("%s: randombits->len is %d\n", gss_krb5_des3_make_key() 275 __func__, randombits->len); gss_krb5_des3_make_key() 308 if (key->len != 16 && key->len != 32) { gss_krb5_aes_make_key() 309 dprintk("%s: key->len is %d\n", __func__, key->len); gss_krb5_aes_make_key() 312 if (randombits->len != 16 && randombits->len != 32) { gss_krb5_aes_make_key() 313 dprintk("%s: randombits->len is %d\n", gss_krb5_aes_make_key() 314 __func__, randombits->len); gss_krb5_aes_make_key() 317 if (randombits->len != key->len) { gss_krb5_aes_make_key() 318 dprintk("%s: randombits->len is %d, key->len is %d\n", gss_krb5_aes_make_key() 319 __func__, randombits->len, key->len); gss_krb5_aes_make_key() 322 memcpy(key->data, randombits->data, key->len); gss_krb5_aes_make_key()
|
/linux-4.1.27/drivers/net/ethernet/cisco/enic/ |
H A D | enic_res.h | 44 void *os_buf, dma_addr_t dma_addr, unsigned int len, enic_queue_wq_desc_ex() 56 (u16)len, enic_queue_wq_desc_ex() 65 vnic_wq_post(wq, os_buf, dma_addr, len, sop, eop, desc_skip_cnt, enic_queue_wq_desc_ex() 70 void *os_buf, dma_addr_t dma_addr, unsigned int len, enic_queue_wq_desc_cont() 73 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, enic_queue_wq_desc_cont() 79 dma_addr_t dma_addr, unsigned int len, int vlan_tag_insert, enic_queue_wq_desc() 82 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, enic_queue_wq_desc() 89 void *os_buf, dma_addr_t dma_addr, unsigned int len, enic_queue_wq_desc_csum() 93 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, enic_queue_wq_desc_csum() 101 void *os_buf, dma_addr_t dma_addr, unsigned int len, enic_queue_wq_desc_csum_l4() 105 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, enic_queue_wq_desc_csum_l4() 112 void *os_buf, dma_addr_t dma_addr, unsigned int len, enic_queue_wq_desc_tso() 116 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, enic_queue_wq_desc_tso() 124 dma_addr_t dma_addr, unsigned int len) enic_queue_rq_desc() 133 type, (u16)len); enic_queue_rq_desc() 135 vnic_rq_post(rq, os_buf, os_buf_index, dma_addr, len, wrid); enic_queue_rq_desc() 146 int enic_set_rss_key(struct enic *enic, dma_addr_t key_pa, u64 len); 147 int enic_set_rss_cpu(struct enic *enic, dma_addr_t cpu_pa, u64 len); 43 enic_queue_wq_desc_ex(struct vnic_wq *wq, void *os_buf, dma_addr_t dma_addr, unsigned int len, unsigned int mss_or_csum_offset, unsigned int hdr_len, int vlan_tag_insert, unsigned int vlan_tag, int offload_mode, int cq_entry, int sop, int eop, int loopback) enic_queue_wq_desc_ex() argument 69 enic_queue_wq_desc_cont(struct vnic_wq *wq, void *os_buf, dma_addr_t dma_addr, unsigned int len, int eop, int loopback) enic_queue_wq_desc_cont() argument 78 enic_queue_wq_desc(struct vnic_wq *wq, void *os_buf, dma_addr_t dma_addr, unsigned int len, int vlan_tag_insert, unsigned int vlan_tag, int eop, int loopback) enic_queue_wq_desc() argument 88 enic_queue_wq_desc_csum(struct vnic_wq *wq, void *os_buf, dma_addr_t dma_addr, unsigned int len, int ip_csum, int tcpudp_csum, int vlan_tag_insert, unsigned int vlan_tag, int eop, int loopback) enic_queue_wq_desc_csum() argument 100 enic_queue_wq_desc_csum_l4(struct vnic_wq *wq, void *os_buf, dma_addr_t dma_addr, unsigned int len, unsigned int csum_offset, unsigned int hdr_len, int vlan_tag_insert, unsigned int vlan_tag, int eop, int loopback) enic_queue_wq_desc_csum_l4() argument 111 enic_queue_wq_desc_tso(struct vnic_wq *wq, void *os_buf, dma_addr_t dma_addr, unsigned int len, unsigned int mss, unsigned int hdr_len, int vlan_tag_insert, unsigned int vlan_tag, int eop, int loopback) enic_queue_wq_desc_tso() argument 122 enic_queue_rq_desc(struct vnic_rq *rq, void *os_buf, unsigned int os_buf_index, dma_addr_t dma_addr, unsigned int len) enic_queue_rq_desc() argument
|
/linux-4.1.27/drivers/staging/rtl8712/ |
H A D | usb_ops.c | 43 u16 len; usb_read8() local 51 len = 1; usb_read8() 52 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_read8() 63 u16 len; usb_read16() local 71 len = 2; usb_read16() 72 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_read16() 83 u16 len; usb_read32() local 91 len = 4; usb_read32() 92 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_read32() 103 u16 len; usb_write8() local 111 len = 1; usb_write8() 114 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_write8() 124 u16 len; usb_write16() local 132 len = 2; usb_write16() 135 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_write16() 145 u16 len; usb_write32() local 153 len = 4; usb_write32() 155 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_write32()
|
/linux-4.1.27/drivers/net/wireless/ti/wlcore/ |
H A D | sysfs.c | 32 ssize_t len; wl1271_sysfs_show_bt_coex_state() local 34 len = PAGE_SIZE; wl1271_sysfs_show_bt_coex_state() 37 len = snprintf(buf, len, "%d\n\n0 - off\n1 - on\n", wl1271_sysfs_show_bt_coex_state() 41 return len; wl1271_sysfs_show_bt_coex_state() 92 ssize_t len; wl1271_sysfs_show_hw_pg_ver() local 94 len = PAGE_SIZE; wl1271_sysfs_show_hw_pg_ver() 98 len = snprintf(buf, len, "%d\n", wl->hw_pg_ver); wl1271_sysfs_show_hw_pg_ver() 100 len = snprintf(buf, len, "n/a\n"); wl1271_sysfs_show_hw_pg_ver() 103 return len; wl1271_sysfs_show_hw_pg_ver() 115 ssize_t len; wl1271_sysfs_read_fwlog() local 155 len = min_t(size_t, count, wl->fwlog_size); wl1271_sysfs_read_fwlog() 156 wl->fwlog_size -= len; wl1271_sysfs_read_fwlog() 157 memcpy(buffer, wl->fwlog, len); wl1271_sysfs_read_fwlog() 160 memmove(wl->fwlog, wl->fwlog + len, wl->fwlog_size); wl1271_sysfs_read_fwlog() 164 return len; wl1271_sysfs_read_fwlog()
|