Home
last modified time | relevance | path

Searched refs:len (Results 1 – 200 of 7431) sorted by relevance

12345678910>>...38

/linux-4.1.27/drivers/staging/rtl8188eu/core/
Drtw_debug.c29 int len = 0; in proc_get_drv_version() local
31 len += snprintf(page + len, count - len, "%s\n", DRIVERVERSION); in proc_get_drv_version()
34 return len; in proc_get_drv_version()
51 u32 addr, val, len; in proc_set_write_reg() local
59 int num = sscanf(tmp, "%x %x %x", &addr, &val, &len); in proc_set_write_reg()
65 switch (len) { in proc_set_write_reg()
76 DBG_88E("error write length =%d", len); in proc_set_write_reg()
93 int len = 0; in proc_get_read_reg() local
97 return len; in proc_get_read_reg()
102len += snprintf(page + len, count - len, "usb_read8(0x%x)=0x%x\n", proc_get_read_addr, usb_read8(p… in proc_get_read_reg()
[all …]
/linux-4.1.27/drivers/net/wireless/ath/ath5k/
Ddebug.c200 unsigned int len = 0; in read_file_beacon() local
205 len += snprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
210 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n", in read_file_beacon()
213 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n\n", in read_file_beacon()
217 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
221 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
225 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
229 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
233 len += snprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
237 if (len > sizeof(buf)) in read_file_beacon()
[all …]
/linux-4.1.27/drivers/net/wireless/ath/ath9k/
Dhtc_drv_debug.c25 unsigned int len = 0; in read_file_tgt_int_stats() local
40 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
44 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
48 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
52 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
56 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
60 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
64 if (len > sizeof(buf)) in read_file_tgt_int_stats()
65 len = sizeof(buf); in read_file_tgt_int_stats()
67 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_tgt_int_stats()
[all …]
Ddfs_debug.c28 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; in read_file_dfs() local
47 len += scnprintf(buf + len, size - len, "DFS support for " in read_file_dfs()
54 len += scnprintf(buf + len, size - len, in read_file_dfs()
61 len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n"); in read_file_dfs()
71 len += scnprintf(buf + len, size - len, "Radar detector statistics " in read_file_dfs()
76 len += scnprintf(buf + len, size - len, "Global Pool statistics:\n"); in read_file_dfs()
86 if (len > size) in read_file_dfs()
87 len = size; in read_file_dfs()
[all …]
Ddebug_sta.c31 u32 len = 0, size = 4096; in read_file_node_aggr() local
41 len = scnprintf(buf, size, "%s\n", in read_file_node_aggr()
46 len = scnprintf(buf, size, "Max-AMPDU: %d\n", in read_file_node_aggr()
48 len += scnprintf(buf + len, size - len, "MPDU Density: %d\n\n", in read_file_node_aggr()
51 len += scnprintf(buf + len, size - len, in read_file_node_aggr()
58 len += scnprintf(buf + len, size - len, in read_file_node_aggr()
64 len += scnprintf(buf + len, size - len, in read_file_node_aggr()
74 len += scnprintf(buf + len, size - len, in read_file_node_aggr()
88 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_node_aggr()
167 len += scnprintf(buf + len, size - len, \
[all …]
Ddebug.c92 unsigned int len; in read_file_debug() local
94 len = sprintf(buf, "0x%08x\n", common->debug_mask); in read_file_debug()
95 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_debug()
105 ssize_t len; in write_file_debug() local
107 len = min(count, sizeof(buf) - 1); in write_file_debug()
108 if (copy_from_user(buf, user_buf, len)) in write_file_debug()
111 buf[len] = '\0'; in write_file_debug()
138 unsigned int len = 0; in read_file_ani() local
167 len += scnprintf(buf + len, size - len, "%15s: %s\n", "ANI", in read_file_ani()
174 len += scnprintf(buf + len, size - len, "%15s: %u\n", in read_file_ani()
[all …]
Dcommon-debug.c23 u32 len = 0, size = 6000; in read_file_modal_eeprom() local
31 len = ah->eep_ops->dump_eeprom(ah, false, buf, len, size); in read_file_modal_eeprom()
33 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_modal_eeprom()
59 u32 len = 0, size = 1500; in read_file_base_eeprom() local
67 len = ah->eep_ops->dump_eeprom(ah, true, buf, len, size); in read_file_base_eeprom()
69 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_base_eeprom()
128 len += scnprintf(buf + len, size - len, \ in read_file_recv()
135 unsigned int len = 0, size = 1600; in read_file_recv() local
160 if (len > size) in read_file_recv()
161 len = size; in read_file_recv()
[all …]
/linux-4.1.27/lib/
Dkfifo.c103 unsigned int len, unsigned int off) in kfifo_copy_in() argument
113 len *= esize; in kfifo_copy_in()
115 l = min(len, size - off); in kfifo_copy_in()
118 memcpy(fifo->data, src + l, len - l); in kfifo_copy_in()
127 const void *buf, unsigned int len) in __kfifo_in() argument
132 if (len > l) in __kfifo_in()
133 len = l; in __kfifo_in()
135 kfifo_copy_in(fifo, buf, len, fifo->in); in __kfifo_in()
136 fifo->in += len; in __kfifo_in()
137 return len; in __kfifo_in()
[all …]
Dseq_buf.c27 static bool seq_buf_can_fit(struct seq_buf *s, size_t len) in seq_buf_can_fit() argument
29 return s->len + len <= s->size; in seq_buf_can_fit()
41 unsigned int len = seq_buf_used(s); in seq_buf_print_seq() local
43 return seq_write(m, s->buffer, len); in seq_buf_print_seq()
58 int len; in seq_buf_vprintf() local
62 if (s->len < s->size) { in seq_buf_vprintf()
63 len = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); in seq_buf_vprintf()
64 if (s->len + len < s->size) { in seq_buf_vprintf()
65 s->len += len; in seq_buf_vprintf()
114 unsigned int len = seq_buf_buffer_left(s); in seq_buf_bprintf() local
[all …]
Dchecksum.c50 static unsigned int do_csum(const unsigned char *buff, int len) in do_csum() argument
55 if (len <= 0) in do_csum()
64 len--; in do_csum()
67 if (len >= 2) { in do_csum()
70 len -= 2; in do_csum()
73 if (len >= 4) { in do_csum()
74 const unsigned char *end = buff + ((unsigned)len & ~3); in do_csum()
86 if (len & 2) { in do_csum()
91 if (len & 1) in do_csum()
129 __wsum csum_partial(const void *buff, int len, __wsum wsum) in csum_partial() argument
[all …]
Dasn1_decoder.c60 size_t dp = *_dp, len, n; in asn1_find_indefinite_length() local
93 len = data[dp++]; in asn1_find_indefinite_length()
94 if (len <= 0x7f) { in asn1_find_indefinite_length()
95 dp += len; in asn1_find_indefinite_length()
99 if (unlikely(len == ASN1_INDEFINITE_LENGTH)) { in asn1_find_indefinite_length()
107 n = len - 0x80; in asn1_find_indefinite_length()
112 for (len = 0; n > 0; n--) { in asn1_find_indefinite_length()
113 len <<= 8; in asn1_find_indefinite_length()
114 len |= data[dp++]; in asn1_find_indefinite_length()
116 dp += len; in asn1_find_indefinite_length()
[all …]
Dcrc32.c57 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) argument
84 if (unlikely((long)buf & 3 && len)) {
87 } while ((--len) && ((long)buf)&3);
91 rem_len = len & 3;
92 len = len >> 2;
94 rem_len = len & 7;
95 len = len >> 3;
101 for (i = 0; i < len; i++) {
103 for (--b; len; --len) {
114 len = rem_len;
[all …]
Dnlattr.c50 if (pt->len) in validate_nla()
51 minlen = min_t(int, attrlen, pt->len + 1); in validate_nla()
63 if (pt->len) { in validate_nla()
69 if (attrlen > pt->len) in validate_nla()
75 if (pt->len && attrlen > pt->len) in validate_nla()
80 if (attrlen < pt->len) in validate_nla()
82 if (attrlen < NLA_ALIGN(pt->len)) in validate_nla()
84 if (attrlen < NLA_ALIGN(pt->len) + NLA_HDRLEN) in validate_nla()
86 nla = nla_data(nla) + NLA_ALIGN(pt->len); in validate_nla()
87 if (attrlen < NLA_ALIGN(pt->len) + NLA_HDRLEN + nla_len(nla)) in validate_nla()
[all …]
/linux-4.1.27/drivers/pnp/pnpbios/
Drsparser.c56 int start, int len) in pnpbios_parse_allocated_ioresource() argument
59 int end = start + len - 1; in pnpbios_parse_allocated_ioresource()
61 if (len <= 0 || end >= 0x10003) in pnpbios_parse_allocated_ioresource()
68 int start, int len) in pnpbios_parse_allocated_memresource() argument
71 int end = start + len - 1; in pnpbios_parse_allocated_memresource()
73 if (len <= 0) in pnpbios_parse_allocated_memresource()
83 unsigned int len, tag; in pnpbios_parse_allocated_resource_data() local
97 len = (p[2] << 8) | p[1]; in pnpbios_parse_allocated_resource_data()
100 len = p[0] & 0x07; in pnpbios_parse_allocated_resource_data()
107 if (len != 9) in pnpbios_parse_allocated_resource_data()
[all …]
/linux-4.1.27/tools/perf/util/
Dstrbuf.c22 sb->alloc = sb->len = 0; in strbuf_init()
40 *sz = sb->len; in strbuf_detach()
47 if (sb->len + extra + 1 <= sb->len) in strbuf_grow()
51 ALLOC_GROW(sb->buf, sb->len + extra + 1, sb->alloc); in strbuf_grow()
54 static void strbuf_splice(struct strbuf *sb, size_t pos, size_t len, in strbuf_splice() argument
57 if (pos + len < pos) in strbuf_splice()
59 if (pos > sb->len) in strbuf_splice()
61 if (pos + len > sb->len) in strbuf_splice()
64 if (dlen >= len) in strbuf_splice()
65 strbuf_grow(sb, dlen - len); in strbuf_splice()
[all …]
Dpath.c34 size_t len = (ret >= size) ? size - 1 : ret; in strlcpy() local
36 memcpy(dest, src, len); in strlcpy()
37 dest[len] = '\0'; in strlcpy()
65 size_t len; in perf_vsnpath() local
67 len = strlen(perf_dir); in perf_vsnpath()
68 if (n < len + 1) in perf_vsnpath()
70 memcpy(buf, perf_dir, len); in perf_vsnpath()
71 if (len && !is_dir_sep(perf_dir[len-1])) in perf_vsnpath()
72 buf[len++] = '/'; in perf_vsnpath()
73 len += vsnprintf(buf + len, n - len, fmt, args); in perf_vsnpath()
[all …]
/linux-4.1.27/drivers/s390/char/
Dhmcdrv_cache.c42 size_t len; member
50 .len = 0,
64 ssize_t len; in hmcdrv_cache_get() local
80 len = hmcdrv_cache_file.fsize - ftp->ofs; in hmcdrv_cache_get()
82 if (len > ftp->len) in hmcdrv_cache_get()
83 len = ftp->len; in hmcdrv_cache_get()
91 ((pos + len) <= hmcdrv_cache_file.len)) { in hmcdrv_cache_get()
95 len); in hmcdrv_cache_get()
97 hmcdrv_cache_file.fname, len, in hmcdrv_cache_get()
100 return len; in hmcdrv_cache_get()
[all …]
Ddiag_ftp.c142 ssize_t len; in diag_ftp_cmd() local
147 ftp->fname, ftp->len); in diag_ftp_cmd()
154 len = -ENOMEM; in diag_ftp_cmd()
158 len = strlcpy(ldfpl->fident, ftp->fname, sizeof(ldfpl->fident)); in diag_ftp_cmd()
159 if (len >= HMCDRV_FTP_FIDENT_MAX) { in diag_ftp_cmd()
160 len = -EINVAL; in diag_ftp_cmd()
167 ldfpl->buflen = ftp->len; in diag_ftp_cmd()
170 len = diag_ftp_2c4(ldfpl, ftp->id); in diag_ftp_cmd()
171 if (len) in diag_ftp_cmd()
189 len = ldfpl->transferred; in diag_ftp_cmd()
[all …]
/linux-4.1.27/drivers/pnp/
Dsupport.c107 int len = 0, i; in dbg_pnp_show_option() local
114 len += scnprintf(buf + len, sizeof(buf) - len, in dbg_pnp_show_option()
119 len += scnprintf(buf + len, sizeof(buf) - len, in dbg_pnp_show_option()
125 len += scnprintf(buf + len, sizeof(buf) - len, "io min %#llx " in dbg_pnp_show_option()
134 len += scnprintf(buf + len, sizeof(buf) - len, "mem min %#llx " in dbg_pnp_show_option()
143 len += scnprintf(buf + len, sizeof(buf) - len, "irq"); in dbg_pnp_show_option()
145 len += scnprintf(buf + len, sizeof(buf) - len, in dbg_pnp_show_option()
150 len += scnprintf(buf + len, in dbg_pnp_show_option()
151 sizeof(buf) - len, in dbg_pnp_show_option()
154 len += scnprintf(buf + len, sizeof(buf) - len, " flags %#x", in dbg_pnp_show_option()
[all …]
/linux-4.1.27/drivers/net/wireless/ath/ath6kl/
Ddebug.c124 const void *buf, size_t len) in ath6kl_dbg_dump() argument
130 print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len); in ath6kl_dbg_dump()
135 buf, len); in ath6kl_dbg_dump()
278 unsigned int len = 0, buf_len = 1500; in read_file_war_stats() local
285 len += scnprintf(buf + len, buf_len - len, "\n"); in read_file_war_stats()
286 len += scnprintf(buf + len, buf_len - len, "%25s\n", in read_file_war_stats()
288 len += scnprintf(buf + len, buf_len - len, "%25s\n\n", in read_file_war_stats()
290 len += scnprintf(buf + len, buf_len - len, "%20s %10u\n", in read_file_war_stats()
293 if (WARN_ON(len > buf_len)) in read_file_war_stats()
294 len = buf_len; in read_file_war_stats()
[all …]
/linux-4.1.27/drivers/net/wireless/ath/ath10k/
Ddebug.c60 __le32 len; member
186 unsigned int len = 0, buf_len = 4096; in ath10k_read_wmi_services() local
198 if (len > buf_len) in ath10k_read_wmi_services()
199 len = buf_len; in ath10k_read_wmi_services()
208 len += scnprintf(buf + len, buf_len - len, in ath10k_read_wmi_services()
215 len += scnprintf(buf + len, buf_len - len, in ath10k_read_wmi_services()
221 ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); in ath10k_read_wmi_services()
430 unsigned int len = 0; in ath10k_fw_stats_fill() local
451 len += scnprintf(buf + len, buf_len - len, "\n"); in ath10k_fw_stats_fill()
452 len += scnprintf(buf + len, buf_len - len, "%30s\n", in ath10k_fw_stats_fill()
[all …]
Dwmi-tlv.h951 #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \ argument
952 ((svc_id) < (len) && \
956 #define SVCMAP(x, y, len) \ argument
958 if (WMI_SERVICE_IS_ENABLED((in), (x), (len))) \
963 wmi_tlv_svc_map(const __le32 *in, unsigned long *out, size_t len) in wmi_tlv_svc_map() argument
966 WMI_SERVICE_BEACON_OFFLOAD, len); in wmi_tlv_svc_map()
968 WMI_SERVICE_SCAN_OFFLOAD, len); in wmi_tlv_svc_map()
970 WMI_SERVICE_ROAM_SCAN_OFFLOAD, len); in wmi_tlv_svc_map()
972 WMI_SERVICE_BCN_MISS_OFFLOAD, len); in wmi_tlv_svc_map()
974 WMI_SERVICE_STA_PWRSAVE, len); in wmi_tlv_svc_map()
[all …]
Dtrace.h355 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);
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)))
[all …]
Dhtt_tx.c139 int len = 0; in ath10k_htt_h2t_ver_req_msg() local
142 len += sizeof(cmd->hdr); in ath10k_htt_h2t_ver_req_msg()
143 len += sizeof(cmd->ver_req); in ath10k_htt_h2t_ver_req_msg()
145 skb = ath10k_htc_alloc_skb(ar, len); in ath10k_htt_h2t_ver_req_msg()
149 skb_put(skb, len); in ath10k_htt_h2t_ver_req_msg()
168 int len = 0, ret; in ath10k_htt_h2t_stats_req() local
170 len += sizeof(cmd->hdr); in ath10k_htt_h2t_stats_req()
171 len += sizeof(cmd->stats_req); in ath10k_htt_h2t_stats_req()
173 skb = ath10k_htc_alloc_skb(ar, len); in ath10k_htt_h2t_stats_req()
177 skb_put(skb, len); in ath10k_htt_h2t_stats_req()
[all …]
/linux-4.1.27/net/dccp/
Doptions.c26 u64 dccp_decode_value_var(const u8 *bf, const u8 len) in dccp_decode_value_var() argument
30 if (len >= DCCP_OPTVAL_MAXLEN) in dccp_decode_value_var()
32 if (len > 4) in dccp_decode_value_var()
34 if (len > 3) in dccp_decode_value_var()
36 if (len > 2) in dccp_decode_value_var()
38 if (len > 1) in dccp_decode_value_var()
40 if (len > 0) in dccp_decode_value_var()
62 unsigned char opt, len; in dccp_parse_options() local
71 opt = len = 0; in dccp_parse_options()
74 len = 0; in dccp_parse_options()
[all …]
/linux-4.1.27/drivers/scsi/lpfc/
Dlpfc_debugfs.c137 int i, index, len, enable; in lpfc_debugfs_disc_trc_data() local
149 len = 0; in lpfc_debugfs_disc_trc_data()
160 len += snprintf(buf+len, size-len, buffer, in lpfc_debugfs_disc_trc_data()
171 len += snprintf(buf+len, size-len, buffer, in lpfc_debugfs_disc_trc_data()
178 return len; in lpfc_debugfs_disc_trc_data()
203 int i, index, len, enable; in lpfc_debugfs_slow_ring_trc_data() local
215 len = 0; in lpfc_debugfs_slow_ring_trc_data()
226 len += snprintf(buf+len, size-len, buffer, in lpfc_debugfs_slow_ring_trc_data()
237 len += snprintf(buf+len, size-len, buffer, in lpfc_debugfs_slow_ring_trc_data()
244 return len; in lpfc_debugfs_slow_ring_trc_data()
[all …]
/linux-4.1.27/net/sunrpc/
Dsocklib.c29 size_t xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len) in xdr_skb_read_bits() argument
31 if (len > desc->count) in xdr_skb_read_bits()
32 len = desc->count; in xdr_skb_read_bits()
33 if (unlikely(skb_copy_bits(desc->skb, desc->offset, to, len))) in xdr_skb_read_bits()
35 desc->count -= len; in xdr_skb_read_bits()
36 desc->offset += len; in xdr_skb_read_bits()
37 return len; in xdr_skb_read_bits()
49 static size_t xdr_skb_read_and_csum_bits(struct xdr_skb_reader *desc, void *to, size_t len) in xdr_skb_read_and_csum_bits() argument
54 if (len > desc->count) in xdr_skb_read_and_csum_bits()
55 len = desc->count; in xdr_skb_read_and_csum_bits()
[all …]
Dxdr.c25 unsigned int quadlen = XDR_QUADLEN(obj->len); in xdr_encode_netobj()
28 *p++ = cpu_to_be32(obj->len); in xdr_encode_netobj()
29 memcpy(p, obj->data, obj->len); in xdr_encode_netobj()
30 return p + XDR_QUADLEN(obj->len); in xdr_encode_netobj()
37 unsigned int len; in xdr_decode_netobj() local
39 if ((len = be32_to_cpu(*p++)) > XDR_MAX_NETOBJ) in xdr_decode_netobj()
41 obj->len = len; in xdr_decode_netobj()
43 return p + XDR_QUADLEN(len); in xdr_decode_netobj()
103 u32 len; in xdr_decode_string_inplace() local
105 len = be32_to_cpu(*p++); in xdr_decode_string_inplace()
[all …]
/linux-4.1.27/arch/frv/kernel/
Dsysctl.c55 int len; in procctl_frv_cachemode() local
57 len = *lenp; in procctl_frv_cachemode()
61 if (len <= 1 || len > sizeof(buff) - 1) in procctl_frv_cachemode()
64 if (copy_from_user(buff, buffer, len) != 0) in procctl_frv_cachemode()
67 if (buff[len - 1] == '\n') in procctl_frv_cachemode()
68 buff[len - 1] = '\0'; in procctl_frv_cachemode()
70 buff[len] = '\0'; in procctl_frv_cachemode()
98 len = sizeof(frv_cache_wthru); in procctl_frv_cachemode()
103 len = sizeof(frv_cache_wback); in procctl_frv_cachemode()
107 if (len > *lenp) in procctl_frv_cachemode()
[all …]
/linux-4.1.27/scripts/dtc/
Ddata.c51 while ((d.len + xlen) > newsize) in data_grow_for()
59 struct data data_copy_mem(const char *mem, int len) in data_copy_mem() argument
63 d = data_grow_for(empty_data, len); in data_copy_mem()
65 d.len = len; in data_copy_mem()
66 memcpy(d.val, mem, len); in data_copy_mem()
71 struct data data_copy_escape_string(const char *s, int len) in data_copy_escape_string() argument
80 while (i < len) { in data_copy_escape_string()
86 q[d.len++] = c; in data_copy_escape_string()
89 q[d.len++] = '\0'; in data_copy_escape_string()
97 while (!feof(f) && (d.len < maxlen)) { in data_copy_file()
[all …]
Dutil.c41 int len = strlen(s) + 1; in xstrdup() local
42 char *dup = xmalloc(len); in xstrdup()
44 memcpy(dup, s, len); in xstrdup()
53 int len; in join_path() local
57 len = lenp + lenn + 2; in join_path()
60 len--; in join_path()
63 str = xmalloc(len); in join_path()
73 int util_is_printable_string(const void *data, int len) in util_is_printable_string() argument
79 if (len == 0) in util_is_printable_string()
83 if (s[len - 1] != '\0') in util_is_printable_string()
[all …]
/linux-4.1.27/drivers/parisc/
Deisa_enumerator.c84 int len; in configure_memory() local
89 len=0; in configure_memory()
92 c = get_8(buf+len); in configure_memory()
98 res->start = mem_parent->start + get_24(buf+len+2); in configure_memory()
99 res->end = res->start + get_16(buf+len+5)*1024; in configure_memory()
109 len+=7; in configure_memory()
116 return len; in configure_memory()
122 int len; in configure_irq() local
126 len=0; in configure_irq()
129 c = get_8(buf+len); in configure_irq()
[all …]
/linux-4.1.27/drivers/scsi/fnic/
Dfnic_trace.c110 int len = 0; in fnic_get_trace_data() local
140 len += snprintf(fnic_dbgfs_prt->buffer + len, in fnic_get_trace_data()
141 (trace_max_pages * PAGE_SIZE * 3) - len, in fnic_get_trace_data()
182 len += snprintf(fnic_dbgfs_prt->buffer + len, in fnic_get_trace_data()
183 (trace_max_pages * PAGE_SIZE * 3) - len, in fnic_get_trace_data()
199 return len; in fnic_get_trace_data()
217 int len = 0; in fnic_get_stats_data() local
221 len = snprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
225 len += snprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
242 len += snprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
[all …]
/linux-4.1.27/include/scsi/
Dfc_encode.h137 size_t len; in fc_ct_ns_fill() local
179 len = strnlen(fc_host_symbolic_name(lport->host), 255); in fc_ct_ns_fill()
180 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rspn) + len, in fc_ct_ns_fill()
184 fc_host_symbolic_name(lport->host), len); in fc_ct_ns_fill()
185 ct->payload.spn.fr_name_len = len; in fc_ct_ns_fill()
189 len = strnlen(fc_host_symbolic_name(lport->host), 255); in fc_ct_ns_fill()
190 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rsnn) + len, in fc_ct_ns_fill()
194 fc_host_symbolic_name(lport->host), len); in fc_ct_ns_fill()
195 ct->payload.snn.fr_name_len = len; in fc_ct_ns_fill()
221 size_t len; in fc_ct_ms_fill() local
[all …]
/linux-4.1.27/tools/lib/traceevent/
Dtrace-seq.c57 s->len = 0; in trace_seq_init()
76 s->len = 0; in trace_seq_reset()
127 int len; in trace_seq_printf() local
133 len = (s->buffer_size - 1) - s->len; in trace_seq_printf()
136 ret = vsnprintf(s->buffer + s->len, len, fmt, ap); in trace_seq_printf()
139 if (ret >= len) { in trace_seq_printf()
144 s->len += ret; in trace_seq_printf()
163 int len; in trace_seq_vprintf() local
169 len = (s->buffer_size - 1) - s->len; in trace_seq_vprintf()
171 ret = vsnprintf(s->buffer + s->len, len, fmt, args); in trace_seq_vprintf()
[all …]
Dplugin_scsi.c155 scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw6() argument
157 const char *ret = p->buffer + p->len; in scsi_trace_rw6()
172 scsi_trace_rw10(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw10() argument
174 const char *ret = p->buffer + p->len; in scsi_trace_rw10()
196 scsi_trace_rw12(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw12() argument
198 const char *ret = p->buffer + p->len; in scsi_trace_rw12()
218 scsi_trace_rw16(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw16() argument
220 const char *ret = p->buffer + p->len; in scsi_trace_rw16()
248 scsi_trace_rw32(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw32() argument
250 const char *ret = p->buffer + p->len, *cmd; in scsi_trace_rw32()
[all …]
/linux-4.1.27/drivers/net/ethernet/intel/fm10k/
Dfm10k_tlv.c54 u32 attr_data = 0, len = 0; in fm10k_tlv_attr_put_null_string() local
66 if (len && !(len % 4)) { in fm10k_tlv_attr_put_null_string()
67 attr[len / 4] = attr_data; in fm10k_tlv_attr_put_null_string()
72 attr_data |= (u32)(*string) << (8 * (len % 4)); in fm10k_tlv_attr_put_null_string()
73 len++; in fm10k_tlv_attr_put_null_string()
79 attr[(len + 3) / 4] = attr_data; in fm10k_tlv_attr_put_null_string()
82 len <<= FM10K_TLV_LEN_SHIFT; in fm10k_tlv_attr_put_null_string()
83 attr[0] = len | attr_id; in fm10k_tlv_attr_put_null_string()
86 len += FM10K_TLV_HDR_LEN << FM10K_TLV_LEN_SHIFT; in fm10k_tlv_attr_put_null_string()
87 *msg += FM10K_TLV_LEN_ALIGN(len); in fm10k_tlv_attr_put_null_string()
[all …]
Dfm10k_mbx.c120 u16 len = fm10k_fifo_head_len(fifo); in fm10k_fifo_head_drop() local
123 fifo->head += len; in fm10k_fifo_head_drop()
125 return len; in fm10k_fifo_head_drop()
151 u16 len = tail - head; in fm10k_mbx_index_len() local
154 if (len > tail) in fm10k_mbx_index_len()
155 len -= 2; in fm10k_mbx_index_len()
157 return len & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_index_len()
254 const u32 *msg, u16 tail_offset, u16 len) in fm10k_fifo_write_copy() argument
263 if (end < len) in fm10k_fifo_write_copy()
264 memcpy(fifo->buffer, msg + end, (len - end) << 2); in fm10k_fifo_write_copy()
[all …]
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/linux/
Dlinux-sysctl.c98 int len; in proc_memory_alloc() local
107 len = snprintf(buf, sizeof(buf), "%llu\n", obd_memory_sum()); in proc_memory_alloc()
108 if (len > *lenp) in proc_memory_alloc()
109 len = *lenp; in proc_memory_alloc()
110 buf[len] = '\0'; in proc_memory_alloc()
111 if (copy_to_user(buffer, buf, len)) in proc_memory_alloc()
113 *lenp = len; in proc_memory_alloc()
122 int len; in proc_pages_alloc() local
131 len = snprintf(buf, sizeof(buf), "%llu\n", obd_pages_sum()); in proc_pages_alloc()
132 if (len > *lenp) in proc_pages_alloc()
[all …]
/linux-4.1.27/arch/arm/kvm/
Dmmio.c26 static void mmio_write_buf(char *buf, unsigned int len, unsigned long data) in mmio_write_buf() argument
36 switch (len) { in mmio_write_buf()
55 memcpy(buf, datap, len); in mmio_write_buf()
58 static unsigned long mmio_read_buf(char *buf, unsigned int len) in mmio_read_buf() argument
67 switch (len) { in mmio_read_buf()
72 memcpy(&tmp.hword, buf, len); in mmio_read_buf()
76 memcpy(&tmp.word, buf, len); in mmio_read_buf()
80 memcpy(&tmp.dword, buf, len); in mmio_read_buf()
99 unsigned int len; in kvm_handle_mmio_return() local
103 len = run->mmio.len; in kvm_handle_mmio_return()
[all …]
/linux-4.1.27/fs/cachefiles/
Dkey.c42 int loop, len, max, seg, mark, print; in cachefiles_cook_key() local
85 len = 0; in cachefiles_cook_key()
89 len = 5; in cachefiles_cook_key()
90 mark = len - 1; in cachefiles_cook_key()
96 key[len + 1] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
98 key[len] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
99 len += 2; in cachefiles_cook_key()
104 key[len++] = '\0'; in cachefiles_cook_key()
105 mark = len; in cachefiles_cook_key()
106 key[len++] = '+'; in cachefiles_cook_key()
[all …]
/linux-4.1.27/drivers/target/
Dtarget_core_fabric_lib.c230 u16 len = 0; in iscsi_get_pr_transport_id() local
248 len = sprintf(&buf[off], "%s", se_nacl->initiatorname); in iscsi_get_pr_transport_id()
252 len++; in iscsi_get_pr_transport_id()
281 buf[off+len] = 0x2c; off++; /* ASCII Character: "," */ in iscsi_get_pr_transport_id()
282 buf[off+len] = 0x69; off++; /* ASCII Character: "i" */ in iscsi_get_pr_transport_id()
283 buf[off+len] = 0x2c; off++; /* ASCII Character: "," */ in iscsi_get_pr_transport_id()
284 buf[off+len] = 0x30; off++; /* ASCII Character: "0" */ in iscsi_get_pr_transport_id()
285 buf[off+len] = 0x78; off++; /* ASCII Character: "x" */ in iscsi_get_pr_transport_id()
286 len += 5; in iscsi_get_pr_transport_id()
287 buf[off+len] = pr_reg->pr_reg_isid[0]; off++; in iscsi_get_pr_transport_id()
[all …]
/linux-4.1.27/arch/m68k/kernel/
Dsys_m68k.c39 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, in sys_mmap2() argument
48 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); in sys_mmap2()
67 cache_flush_040 (unsigned long addr, int scope, int cache, unsigned long len) in cache_flush_040() argument
104 len = (len + (addr & 15) + 15) >> 4; in cache_flush_040()
108 if (len <= tmp) in cache_flush_040()
111 len -= tmp; in cache_flush_040()
117 if (len <= tmp) in cache_flush_040()
120 len -= tmp; in cache_flush_040()
122 len = (len + 15) >> 4; in cache_flush_040()
125 while (len--) in cache_flush_040()
[all …]
/linux-4.1.27/net/caif/
Dcfpkt_skbuff.c80 static struct cfpkt *cfpkt_create_pfx(u16 len, u16 pfx) in cfpkt_create_pfx() argument
85 skb = alloc_skb(len + pfx, GFP_ATOMIC); in cfpkt_create_pfx()
87 skb = alloc_skb(len + pfx, GFP_KERNEL); in cfpkt_create_pfx()
96 inline struct cfpkt *cfpkt_create(u16 len) in cfpkt_create() argument
98 return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX); in cfpkt_create()
110 return skb->len > 0; in cfpkt_more()
113 int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len) in cfpkt_peek_head() argument
116 if (skb_headlen(skb) >= len) { in cfpkt_peek_head()
117 memcpy(data, skb->data, len); in cfpkt_peek_head()
120 return !cfpkt_extr_head(pkt, data, len) && in cfpkt_peek_head()
[all …]
/linux-4.1.27/fs/hpfs/
Dname.c41 int hpfs_chk_name(const unsigned char *name, unsigned *len) in hpfs_chk_name() argument
44 if (*len > 254) return -ENAMETOOLONG; in hpfs_chk_name()
45 hpfs_adjust_length(name, len); in hpfs_chk_name()
46 if (!*len) return -EINVAL; in hpfs_chk_name()
47 for (i = 0; i < *len; i++) if (not_allowed_char(name[i])) return -EINVAL; in hpfs_chk_name()
48 if (*len == 1) if (name[0] == '.') return -EINVAL; in hpfs_chk_name()
49 if (*len == 2) if (name[0] == '.' && name[1] == '.') return -EINVAL; in hpfs_chk_name()
54 unsigned len, int lc, int lng) in hpfs_translate_name() argument
58 if (hpfs_sb(s)->sb_chk >= 2) if (hpfs_is_name_long(from, len) != lng) { in hpfs_translate_name()
60 for (i = 0; i < len; i++) in hpfs_translate_name()
[all …]
/linux-4.1.27/drivers/media/usb/em28xx/
Dem28xx-i2c.c50 static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) in em2800_i2c_send_bytes() argument
56 if (len < 1 || len > 4) in em2800_i2c_send_bytes()
59 BUG_ON(len < 1 || len > 4); in em2800_i2c_send_bytes()
60 b2[5] = 0x80 + len - 1; in em2800_i2c_send_bytes()
63 if (len > 1) in em2800_i2c_send_bytes()
65 if (len > 2) in em2800_i2c_send_bytes()
67 if (len > 3) in em2800_i2c_send_bytes()
71 ret = dev->em28xx_write_regs(dev, 4 - len, &b2[4 - len], 2 + len); in em2800_i2c_send_bytes()
72 if (ret != 2 + len) { in em2800_i2c_send_bytes()
80 if (ret == 0x80 + len - 1) in em2800_i2c_send_bytes()
[all …]
/linux-4.1.27/drivers/parport/
Dprocfs.c40 int len = 0; in do_active_device() local
52 len += sprintf(buffer, "%s\n", dev->name); in do_active_device()
56 if(!len) { in do_active_device()
57 len += sprintf(buffer, "%s\n", "none"); in do_active_device()
60 if (len > *lenp) in do_active_device()
61 len = *lenp; in do_active_device()
63 *lenp = len; in do_active_device()
65 *ppos += len; in do_active_device()
67 return copy_to_user(result, buffer, len) ? -EFAULT : 0; in do_active_device()
77 int len = 0; in do_autoprobe() local
[all …]
/linux-4.1.27/arch/um/drivers/
Dmconsole_user.c81 int len; in mconsole_get_request() local
84 req->len = recvfrom(fd, &req->request, sizeof(req->request), 0, in mconsole_get_request()
86 if (req->len < 0) in mconsole_get_request()
93 len = MIN(sizeof(req->request.data) - 1, in mconsole_get_request()
95 memmove(req->request.data, &req->request, len); in mconsole_get_request()
96 req->request.data[len] = '\0'; in mconsole_get_request()
100 req->request.len = len; in mconsole_get_request()
107 if (req->request.len >= MCONSOLE_MAX_DATA) { in mconsole_get_request()
116 req->request.data[req->request.len] = '\0'; in mconsole_get_request()
135 int len, n; in mconsole_reply_len() local
[all …]
/linux-4.1.27/arch/alpha/lib/
Dcsum_partial_copy.c103 long len, unsigned long checksum, in csum_partial_cfu_aligned() argument
109 while (len >= 0) { in csum_partial_cfu_aligned()
115 len -= 8; in csum_partial_cfu_aligned()
120 len += 8; in csum_partial_cfu_aligned()
122 if (len) { in csum_partial_cfu_aligned()
126 mskql(word, len, word); in csum_partial_cfu_aligned()
128 mskqh(tmp, len, tmp); in csum_partial_cfu_aligned()
145 long len, unsigned long checksum, in csum_partial_cfu_dest_aligned() argument
150 unsigned long lastsrc = 7+len+(unsigned long)src; in csum_partial_cfu_dest_aligned()
155 while (len >= 0) { in csum_partial_cfu_dest_aligned()
[all …]
Dchecksum.c45 unsigned short len, in csum_tcpudp_magic() argument
51 (__force u64)sum + ((len + proto) << 8)); in csum_tcpudp_magic()
55 unsigned short len, in csum_tcpudp_nofold() argument
62 (__force u64)sum + ((len + proto) << 8); in csum_tcpudp_nofold()
81 static inline unsigned long do_csum(const unsigned char * buff, int len) in do_csum() argument
86 if (len <= 0) in do_csum()
91 len--; in do_csum()
94 count = len >> 1; /* nr of 16-bit words.. */ in do_csum()
99 len -= 2; in do_csum()
107 len -= 4; in do_csum()
[all …]
/linux-4.1.27/drivers/scsi/qla2xxx/
Dqla_tmpl.c109 qla27xx_insert16(uint16_t value, void *buf, ulong *len) in qla27xx_insert16() argument
112 buf += *len; in qla27xx_insert16()
115 *len += sizeof(value); in qla27xx_insert16()
119 qla27xx_insert32(uint32_t value, void *buf, ulong *len) in qla27xx_insert32() argument
122 buf += *len; in qla27xx_insert32()
125 *len += sizeof(value); in qla27xx_insert32()
129 qla27xx_insertbuf(void *mem, ulong size, void *buf, ulong *len) in qla27xx_insertbuf() argument
133 buf += *len; in qla27xx_insertbuf()
136 *len += size; in qla27xx_insertbuf()
140 qla27xx_read8(void *window, void *buf, ulong *len) in qla27xx_read8() argument
[all …]
/linux-4.1.27/arch/ia64/lib/
Dclear_user.S20 #define len r33 macro
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
88 mov ret0=len // faster than using ar.lc
105 (p6) adds len=-1,len;; // sync because buf is modified
109 (p6) adds len=-2,len;;
113 (p6) adds len=-4,len;;
[all …]
Dcsum_partial_copy.c34 unsigned long do_csum_c(const unsigned char * buff, int len, unsigned int psum) in do_csum_c() argument
39 if (len <= 0) in do_csum_c()
44 len--; in do_csum_c()
47 count = len >> 1; /* nr of 16-bit words.. */ in do_csum_c()
52 len -= 2; in do_csum_c()
60 len -= 4; in do_csum_c()
77 if (len & 4) { in do_csum_c()
82 if (len & 2) { in do_csum_c()
87 if (len & 1) in do_csum_c()
109 int len, __wsum psum, int *errp) in csum_partial_copy_from_user() argument
[all …]
/linux-4.1.27/arch/m68k/sun3/
Dsun3dvma.c24 extern void dvma_unmap_iommu(unsigned long baddr, int len);
152 static inline unsigned long get_baddr(int len, unsigned long align) in get_baddr() argument
173 newlen = len + ((hole->end - len) & (align-1)); in get_baddr()
175 newlen = len; in get_baddr()
206 unsigned long len; in free_baddr() local
212 len = dvma_entry_use(baddr); in free_baddr()
215 dvma_unmap_iommu(baddr, len); in free_baddr()
219 dvma_free_bytes += len; in free_baddr()
226 hole->end += len; in free_baddr()
227 hole->size += len; in free_baddr()
[all …]
/linux-4.1.27/fs/hfs/
Dstring.c57 unsigned int hash, len = this->len; in hfs_hash_dentry() local
59 if (len > HFS_NAMELEN) in hfs_hash_dentry()
60 len = HFS_NAMELEN; in hfs_hash_dentry()
63 for (; len; len--) in hfs_hash_dentry()
79 int len, tmp; in hfs_strcmp() local
81 len = (len1 > len2) ? len2 : len1; in hfs_strcmp()
83 while (len--) { in hfs_strcmp()
96 unsigned int len, const char *str, const struct qstr *name) in hfs_compare_dentry() argument
100 if (len >= HFS_NAMELEN) { in hfs_compare_dentry()
101 if (name->len < HFS_NAMELEN) in hfs_compare_dentry()
[all …]
/linux-4.1.27/arch/score/include/asm/
Duaccess.h291 extern int __copy_tofrom_user(void *to, const void *from, unsigned long len);
294 copy_from_user(void *to, const void *from, unsigned long len) in copy_from_user() argument
298 if (access_ok(VERIFY_READ, from, len)) in copy_from_user()
299 return __copy_tofrom_user(to, from, len); in copy_from_user()
302 over = (unsigned long)from + len - TASK_SIZE; in copy_from_user()
303 return __copy_tofrom_user(to, from, len - over) + over; in copy_from_user()
305 return len; in copy_from_user()
309 copy_to_user(void *to, const void *from, unsigned long len) in copy_to_user() argument
313 if (access_ok(VERIFY_WRITE, to, len)) in copy_to_user()
314 return __copy_tofrom_user(to, from, len); in copy_to_user()
[all …]
Dchecksum.h19 unsigned int csum_partial(const void *buff, int len, __wsum sum);
20 unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
23 int len, unsigned int sum);
35 __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len, in csum_and_copy_to_user() argument
38 sum = csum_partial(src, len, sum); in csum_and_copy_to_user()
39 if (copy_to_user(dst, src, len)) { in csum_and_copy_to_user()
130 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, in csum_tcpudp_nofold() argument
133 unsigned long tmp = (ntohs(len) << 16) + proto * 256; in csum_tcpudp_nofold()
164 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, in csum_tcpudp_magic() argument
167 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
[all …]
/linux-4.1.27/drivers/net/caif/
Dcaif_spi.c133 int len = 0; in dbgfs_state() local
142 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
145 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), FLAVOR); in dbgfs_state()
147 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
149 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
151 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
153 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
155 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
157 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
159 len += snprintf((buf + len), (DEBUGFS_BUF_SIZE - len), in dbgfs_state()
[all …]
/linux-4.1.27/include/net/
Dudplite.h20 int len, int odd, struct sk_buff *skb) in udplite_getfrag() argument
23 return copy_from_iter(to, len, &msg->msg_iter) != len ? -EFAULT : 0; in udplite_getfrag()
48 cscov = ntohs(uh->len); in udplite_checksum_init()
52 else if (cscov < 8 || cscov > skb->len) { in udplite_checksum_init()
57 cscov, skb->len); in udplite_checksum_init()
60 } else if (cscov < skb->len) { in udplite_checksum_init()
74 int cscov = up->len; in udplite_csum_outgoing()
82 if (up->pcslen < up->len) { in udplite_csum_outgoing()
85 udp_hdr(skb)->len = htons(up->pcslen); in udplite_csum_outgoing()
103 const int len = skb->len - off; in udplite_csum_outgoing() local
[all …]
/linux-4.1.27/arch/metag/lib/
Dchecksum.c49 static unsigned int do_csum(const unsigned char *buff, int len) in do_csum() argument
54 if (len <= 0) in do_csum()
63 len--; in do_csum()
66 if (len >= 2) { in do_csum()
69 len -= 2; in do_csum()
72 if (len >= 4) { in do_csum()
73 const unsigned char *end = buff + ((unsigned)len & ~3); in do_csum()
85 if (len & 2) { in do_csum()
90 if (len & 1) in do_csum()
116 __wsum csum_partial(const void *buff, int len, __wsum wsum) in csum_partial() argument
[all …]
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/core/
Doption.c31 int len = strcspn(optstr, ",="); in nvkm_stropt() local
32 switch (optstr[len]) { in nvkm_stropt()
34 if (!strncasecmpz(optstr, opt, len)) { in nvkm_stropt()
35 optstr += len + 1; in nvkm_stropt()
47 optstr += len; in nvkm_stropt()
82 int len = strcspn(optstr, ",="); in nvkm_dbgopt() local
83 switch (optstr[len]) { in nvkm_dbgopt()
85 if (strncasecmpz(optstr, sub, len)) in nvkm_dbgopt()
91 if (!strncasecmpz(optstr, "fatal", len)) in nvkm_dbgopt()
93 else if (!strncasecmpz(optstr, "error", len)) in nvkm_dbgopt()
[all …]
/linux-4.1.27/lib/zlib_inflate/
Dinftrees.c26 unsigned len; /* a code's length in bits */ in zlib_inflate_table() local
93 for (len = 0; len <= MAXBITS; len++) in zlib_inflate_table()
94 count[len] = 0; in zlib_inflate_table()
118 for (len = 1; len <= MAXBITS; len++) { in zlib_inflate_table()
120 left -= count[len]; in zlib_inflate_table()
128 for (len = 1; len < MAXBITS; len++) in zlib_inflate_table()
129 offs[len + 1] = offs[len] + count[len]; in zlib_inflate_table()
189 len = min; /* starting code length */ in zlib_inflate_table()
204 this.bits = (unsigned char)(len - drop); in zlib_inflate_table()
219 incr = 1U << (len - drop); in zlib_inflate_table()
[all …]
/linux-4.1.27/arch/frv/lib/
Dchecksum.c46 static unsigned long do_csum(const unsigned char * buff, int len) in do_csum() argument
51 if (len <= 0) in do_csum()
56 len--; in do_csum()
59 count = len >> 1; /* nr of 16-bit words.. */ in do_csum()
64 len -= 2; in do_csum()
81 if (len & 2) { in do_csum()
86 if (len & 1) in do_csum()
107 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
109 unsigned int result = do_csum(buff, len); in csum_partial()
124 __sum16 ip_compute_csum(const void *buff, int len) in ip_compute_csum() argument
[all …]
/linux-4.1.27/arch/mn10300/lib/
Dchecksum.c36 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
40 result = do_csum(buff, len); in csum_partial()
48 __sum16 ip_compute_csum(const void *buff, int len) in ip_compute_csum() argument
50 return ~from32to16(do_csum(buff, len)); in ip_compute_csum()
54 __wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum) in csum_partial_copy() argument
56 copy_from_user(dst, src, len); in csum_partial_copy()
57 return csum_partial(dst, len, sum); in csum_partial_copy()
62 int len, __wsum sum) in csum_partial_copy_nocheck() argument
64 sum = csum_partial(src, len, sum); in csum_partial_copy_nocheck()
65 memcpy(dst, src, len); in csum_partial_copy_nocheck()
[all …]
/linux-4.1.27/drivers/net/usb/
Dcdc_eem.c69 skb->data, skb->len, eem_linkcmd_complete, skb); in eem_linkcmd()
108 u16 len = skb->len; in eem_tx_fixup() local
118 if (!((len + EEM_HEAD + ETH_FCS_LEN) % dev->maxpacket)) in eem_tx_fixup()
134 skb->len); in eem_tx_fixup()
135 skb_set_tail_pointer(skb, len); in eem_tx_fixup()
149 crc = crc32_le(~0, skb->data, skb->len); in eem_tx_fixup()
159 len = skb->len; in eem_tx_fixup()
160 put_unaligned_le16(BIT(14) | len, skb_push(skb, 2)); in eem_tx_fixup()
185 u16 len = 0; in eem_rx_fixup() local
188 if (skb->len < EEM_HEAD) in eem_rx_fixup()
[all …]
Dlg-vl600.c50 __le32 len; member
60 __le32 len; member
130 if (skb->len + s->current_rx_buf->len > in vl600_rx_fixup()
131 le32_to_cpup(&frame->len)) { in vl600_rx_fixup()
138 memcpy(skb_put(buf, skb->len), skb->data, skb->len); in vl600_rx_fixup()
139 } else if (skb->len < 4) { in vl600_rx_fixup()
152 if (buf->len < sizeof(*frame) || in vl600_rx_fixup()
153 buf->len != le32_to_cpup(&frame->len)) { in vl600_rx_fixup()
159 le32_to_cpup(&frame->len), GFP_ATOMIC); in vl600_rx_fixup()
163 le32_to_cpup(&frame->len)); in vl600_rx_fixup()
[all …]
Dcx82310_eth.c223 int len; in cx82310_rx_fixup() local
231 len = dev->partial_len + dev->partial_rem; in cx82310_rx_fixup()
232 skb2 = alloc_skb(len, GFP_ATOMIC); in cx82310_rx_fixup()
235 skb_put(skb2, len); in cx82310_rx_fixup()
243 if (skb->len < 2) in cx82310_rx_fixup()
248 while (skb->len > 1) { in cx82310_rx_fixup()
250 len = skb->data[0] | (skb->data[1] << 8); in cx82310_rx_fixup()
254 if (len == skb->len || len + 1 == skb->len) { in cx82310_rx_fixup()
255 skb_trim(skb, len); in cx82310_rx_fixup()
259 if (len > CX82310_MTU) { in cx82310_rx_fixup()
[all …]
/linux-4.1.27/fs/cifs/
Ddns_resolve.c51 int len, rc; in dns_resolve_server_name_to_ip() local
56 len = strlen(unc); in dns_resolve_server_name_to_ip()
57 if (len < 3) { in dns_resolve_server_name_to_ip()
63 len -= 2; in dns_resolve_server_name_to_ip()
67 sep = memchr(hostname, '/', len); in dns_resolve_server_name_to_ip()
69 len = sep - hostname; in dns_resolve_server_name_to_ip()
75 rc = cifs_convert_address((struct sockaddr *)&ss, hostname, len); in dns_resolve_server_name_to_ip()
80 rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL); in dns_resolve_server_name_to_ip()
83 __func__, len, len, hostname); in dns_resolve_server_name_to_ip()
86 __func__, len, len, hostname, *ip_addr); in dns_resolve_server_name_to_ip()
[all …]
Dcifs_unicode.c126 int len = 1; in cifs_mapchar() local
132 return len; in cifs_mapchar()
135 return len; in cifs_mapchar()
138 len = cp->uni2char(src_char, target, NLS_MAX_CHARSET_SIZE); in cifs_mapchar()
139 if (len <= 0) in cifs_mapchar()
142 return len; in cifs_mapchar()
148 len = utf16s_to_utf8s(from, 3, UTF16_LITTLE_ENDIAN, target, 6); in cifs_mapchar()
149 if (len <= 0) in cifs_mapchar()
151 return len; in cifs_mapchar()
155 len = 1; in cifs_mapchar()
[all …]
Dsmb2misc.c101 __u32 len = get_rfc1002_length(buf); in smb2_check_message() local
107 __func__, length, len); in smb2_check_message()
127 if (len > CIFSMaxBufSize + MAX_SMB2_HDR_SIZE - 4) { in smb2_check_message()
165 if (4 + len != length) { in smb2_check_message()
167 length, 4 + len, mid); in smb2_check_message()
173 if (4 + len != clc_len) { in smb2_check_message()
175 clc_len, 4 + len, mid); in smb2_check_message()
181 if (clc_len + 20 == len && command == SMB2_OPLOCK_BREAK_HE) in smb2_check_message()
184 if (clc_len == 4 + len + 1) in smb2_check_message()
194 if (clc_len < 4 /* RFC1001 header size */ + len) { in smb2_check_message()
[all …]
/linux-4.1.27/fs/isofs/
Drock.c29 int len; member
55 rs->len = sizeof(struct iso_directory_record) + de->name_len[0]; in setup_rock_ridge()
56 if (rs->len & 1) in setup_rock_ridge()
57 (rs->len)++; in setup_rock_ridge()
58 rs->chr = (unsigned char *)de + rs->len; in setup_rock_ridge()
59 rs->len = *((unsigned char *)de) - rs->len; in setup_rock_ridge()
60 if (rs->len < 0) in setup_rock_ridge()
61 rs->len = 0; in setup_rock_ridge()
64 rs->len -= ISOFS_SB(inode->i_sb)->s_rock_offset; in setup_rock_ridge()
66 if (rs->len < 0) in setup_rock_ridge()
[all …]
Djoliet.c17 uni16_to_x8(unsigned char *ascii, __be16 *uni, int len, struct nls_table *nls) in uni16_to_x8() argument
25 while ((ch = get_unaligned(ip)) && len) { in uni16_to_x8()
34 len--; in uni16_to_x8()
45 unsigned char len = 0; in get_joliet_filename() local
51 len = utf16s_to_utf8s((const wchar_t *) de->name, in get_joliet_filename()
55 len = uni16_to_x8(outname, (__be16 *) de->name, in get_joliet_filename()
58 if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) in get_joliet_filename()
59 len -= 2; in get_joliet_filename()
65 while (len >= 2 && (outname[len-1] == '.')) in get_joliet_filename()
66 len--; in get_joliet_filename()
[all …]
/linux-4.1.27/drivers/w1/
Dw1_netlink.c78 return (u8 *)block->cn - (u8 *)block->first_cn + block->cn->len; in w1_reply_len()
84 u16 len = w1_reply_len(block); in w1_unref_block() local
85 if (len) { in w1_unref_block()
86 cn_netlink_send_mult(block->first_cn, len, in w1_unref_block()
103 u16 len = w1_reply_len(block); in w1_reply_make_space() local
104 if (len + space >= block->maxlen) { in w1_reply_make_space()
105 cn_netlink_send_mult(block->first_cn, len, block->portid, 0, GFP_KERNEL); in w1_reply_make_space()
106 block->first_cn->len = 0; in w1_reply_make_space()
132 block->msg = (struct w1_netlink_msg *)(block->cn->data + block->cn->len); in w1_netlink_setup_msg()
137 block->cn->len); in w1_netlink_setup_msg()
[all …]
/linux-4.1.27/fs/ext4/
Dhash.c37 static __u32 dx_hack_hash_unsigned(const char *name, int len) in dx_hack_hash_unsigned() argument
42 while (len--) { in dx_hack_hash_unsigned()
53 static __u32 dx_hack_hash_signed(const char *name, int len) in dx_hack_hash_signed() argument
58 while (len--) { in dx_hack_hash_signed()
69 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument
75 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf_signed()
79 if (len > num*4) in str2hashbuf_signed()
80 len = num * 4; in str2hashbuf_signed()
81 for (i = 0; i < len; i++) { in str2hashbuf_signed()
97 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument
[all …]
Dcrypto_fname.c72 if (iname->len <= 0 || iname->len > ctx->lim) in ext4_fname_encrypt()
75 ciphertext_len = (iname->len < EXT4_CRYPTO_BLOCK_SIZE) ? in ext4_fname_encrypt()
76 EXT4_CRYPTO_BLOCK_SIZE : iname->len; in ext4_fname_encrypt()
96 memcpy(workbuf, iname->name, iname->len); in ext4_fname_encrypt()
97 if (iname->len < ciphertext_len) in ext4_fname_encrypt()
98 memset(workbuf + iname->len, 0, ciphertext_len - iname->len); in ext4_fname_encrypt()
124 oname->len = ciphertext_len; in ext4_fname_encrypt()
148 if (iname->len <= 0 || iname->len > ctx->lim) in ext4_fname_decrypt()
152 tmp_in[0].len = iname->len; in ext4_fname_decrypt()
170 memcpy(workbuf, iname->name, iname->len); in ext4_fname_decrypt()
[all …]
/linux-4.1.27/fs/ext3/
Dhash.c36 static __u32 dx_hack_hash_unsigned(const char *name, int len) in dx_hack_hash_unsigned() argument
41 while (len--) { in dx_hack_hash_unsigned()
52 static __u32 dx_hack_hash_signed(const char *name, int len) in dx_hack_hash_signed() argument
57 while (len--) { in dx_hack_hash_signed()
68 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument
74 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf_signed()
78 if (len > num*4) in str2hashbuf_signed()
79 len = num * 4; in str2hashbuf_signed()
80 for (i = 0; i < len; i++) { in str2hashbuf_signed()
96 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument
[all …]
/linux-4.1.27/drivers/staging/fbtft/
Dfbtft-io.c7 int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len) in fbtft_write_spi() argument
11 .len = len, in fbtft_write_spi()
15 fbtft_par_dbg_hex(DEBUG_WRITE, par, par->info->device, u8, buf, len, in fbtft_write_spi()
16 "%s(len=%d): ", __func__, len); in fbtft_write_spi()
43 int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len) in fbtft_write_spi_emulate_9() argument
47 size_t size = len / 2; in fbtft_write_spi_emulate_9()
52 fbtft_par_dbg_hex(DEBUG_WRITE, par, par->info->device, u8, buf, len, in fbtft_write_spi_emulate_9()
53 "%s(len=%d): ", __func__, len); in fbtft_write_spi_emulate_9()
60 if ((len % 8) != 0) { in fbtft_write_spi_emulate_9()
62 "error: len=%zu must be divisible by 8\n", len); in fbtft_write_spi_emulate_9()
[all …]
Dfbtft-bus.c17 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, ...) in define_fbtft_write_reg()
[all …]
/linux-4.1.27/arch/mips/include/asm/
Dchecksum.h35 __wsum csum_partial(const void *buff, int len, __wsum sum);
38 int len, __wsum sum, int *err_ptr);
41 int len, __wsum sum, int *err_ptr);
43 int len, __wsum sum, int *err_ptr);
49 __wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len, in csum_partial_copy_from_user() argument
55 len, sum, err_ptr); in csum_partial_copy_from_user()
58 len, sum, err_ptr); in csum_partial_copy_from_user()
64 int len, __wsum sum, int *err_ptr) in csum_and_copy_from_user() argument
66 if (access_ok(VERIFY_READ, src, len)) in csum_and_copy_from_user()
67 return csum_partial_copy_from_user(src, dst, len, sum, in csum_and_copy_from_user()
[all …]
/linux-4.1.27/arch/sh/include/asm/
Dchecksum_32.h26 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
37 int len, __wsum sum,
49 int len, __wsum sum) in csum_partial_copy_nocheck() argument
51 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
56 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
59 len, sum, err_ptr, NULL); in csum_partial_copy_from_user()
118 unsigned short len, in csum_tcpudp_nofold() argument
123 unsigned long len_proto = (proto + len) << 8; in csum_tcpudp_nofold()
125 unsigned long len_proto = proto + len; in csum_tcpudp_nofold()
145 unsigned short len, in csum_tcpudp_magic() argument
[all …]
/linux-4.1.27/drivers/media/common/b2c2/
Dflexcop-eeprom.c10 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)
[all …]
/linux-4.1.27/arch/um/kernel/skas/
Duaccess.c59 static int do_op_one_page(unsigned long addr, int len, int is_write, in do_op_one_page() argument
60 int (*op)(unsigned long addr, int len, void *arg), void *arg) in do_op_one_page()
79 n = (*op)(addr, len, arg); in do_op_one_page()
90 static int buffer_op(unsigned long addr, int len, int is_write, in buffer_op() argument
95 size = min(PAGE_ALIGN(addr) - addr, (unsigned long) len); in buffer_op()
96 remain = len; in buffer_op()
133 static int copy_chunk_from_user(unsigned long from, int len, void *arg) in copy_chunk_from_user() argument
137 memcpy((void *) to, (void *) from, len); in copy_chunk_from_user()
138 *to_ptr += len; in copy_chunk_from_user()
155 static int copy_chunk_to_user(unsigned long to, int len, void *arg) in copy_chunk_to_user() argument
[all …]
/linux-4.1.27/net/sunrpc/auth_gss/
Dgss_krb5_keys.c157 if ((inkey->len != keylength) || (outkey->len != keylength)) in krb5_derive_key()
164 if (crypto_blkcipher_setkey(cipher, inkey->data, inkey->len)) in krb5_derive_key()
183 inblock.len = blocksize; in krb5_derive_key()
186 outblock.len = blocksize; in krb5_derive_key()
190 if (in_constant->len == inblock.len) { in krb5_derive_key()
191 memcpy(inblock.data, in_constant->data, inblock.len); in krb5_derive_key()
193 krb5_nfold(in_constant->len * 8, in_constant->data, in krb5_derive_key()
194 inblock.len * 8, inblock.data); in krb5_derive_key()
202 outblock.data, inblock.len); in krb5_derive_key()
204 if ((keybytes - n) <= outblock.len) { in krb5_derive_key()
[all …]
/linux-4.1.27/drivers/spi/
Dspi-dw.c58 u32 len = 0; in dw_spi_show_regs() local
65 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
67 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
69 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
71 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
73 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
75 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
77 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
79 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
81 len += snprintf(buf + len, SPI_REGS_BUFSIZE - len, in dw_spi_show_regs()
[all …]
/linux-4.1.27/net/sctp/
Dtsnmap.c46 __u16 len, __u16 *start, __u16 *end);
50 struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *map, __u16 len, in sctp_tsnmap_init() argument
54 map->tsn_map = kzalloc(len>>3, gfp); in sctp_tsnmap_init()
58 map->len = len; in sctp_tsnmap_init()
60 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init()
74 map->len = 0; in sctp_tsnmap_free()
102 if (gap < map->len && test_bit(gap, map->tsn_map)) in sctp_tsnmap_check()
120 if (gap >= map->len && !sctp_tsnmap_grow(map, gap + 1)) in sctp_tsnmap_mark()
179 sctp_tsnmap_find_gap_ack(map->tsn_map, offset, map->len, in sctp_tsnmap_next_gap_ack()
184 end_ = map->len - 1; in sctp_tsnmap_next_gap_ack()
[all …]
/linux-4.1.27/arch/xtensa/include/asm/
Dchecksum.h30 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
41 int len, __wsum sum,
52 int len, __wsum sum) in csum_partial_copy_nocheck() argument
54 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
59 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
62 len, sum, err_ptr, NULL); in csum_partial_copy_from_user()
126 unsigned short len, in csum_tcpudp_nofold() argument
132 unsigned long len_proto = (len + proto) << 8; in csum_tcpudp_nofold()
134 unsigned long len_proto = len + proto; in csum_tcpudp_nofold()
160 unsigned short len, in csum_tcpudp_magic() argument
[all …]
/linux-4.1.27/arch/powerpc/boot/
Dgunzip_util.c104 int len; in gunzip_partial() local
115 len = state->s.next_out - (Byte *)dst; in gunzip_partial()
118 len = min(state->s.avail_in, (uLong)dstlen); in gunzip_partial()
119 memcpy(dst, state->s.next_in, len); in gunzip_partial()
120 state->s.next_in += len; in gunzip_partial()
121 state->s.avail_in -= len; in gunzip_partial()
123 return len; in gunzip_partial()
142 int len; in gunzip_exactly() local
144 len = gunzip_partial(state, dst, dstlen); in gunzip_exactly()
145 if (len < dstlen) in gunzip_exactly()
[all …]
/linux-4.1.27/drivers/cpufreq/
Dcpufreq_stats.c52 ssize_t len = 0; in show_time_in_state() local
57 len += sprintf(buf + len, "%u %llu\n", stats->freq_table[i], in show_time_in_state()
61 return len; in show_time_in_state()
68 ssize_t len = 0; in show_trans_table() local
71 len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n"); in show_trans_table()
72 len += snprintf(buf + len, PAGE_SIZE - len, " : "); in show_trans_table()
74 if (len >= PAGE_SIZE) in show_trans_table()
76 len += snprintf(buf + len, PAGE_SIZE - len, "%9u ", in show_trans_table()
79 if (len >= PAGE_SIZE) in show_trans_table()
82 len += snprintf(buf + len, PAGE_SIZE - len, "\n"); in show_trans_table()
[all …]
/linux-4.1.27/drivers/mtd/ubi/
Dupd.c233 void *buf, int len, int used_ebs) in write_leb() argument
238 int l = ALIGN(len, ubi->min_io_size); in write_leb()
240 memset(buf + len, 0xFF, l - len); in write_leb()
241 len = ubi_calc_data_len(ubi, buf, l); in write_leb()
242 if (len == 0) { in write_leb()
243 dbg_gen("all %d bytes contain 0xFF - skip", len); in write_leb()
247 err = ubi_eba_write_leb(ubi, vol, lnum, buf, 0, len); in write_leb()
258 memset(buf + len, 0, vol->usable_leb_size - len); in write_leb()
259 err = ubi_eba_write_leb_st(ubi, vol, lnum, buf, len, used_ebs); in write_leb()
281 int lnum, offs, err = 0, len, to_write = count; in ubi_more_update_data() local
[all …]
/linux-4.1.27/arch/x86/platform/efi/
Dearly_printk.c47 static __init_refok void *early_efi_map(unsigned long start, unsigned long len) in early_efi_map() argument
56 return early_ioremap(base + start, len); in early_efi_map()
59 static __init_refok void early_efi_unmap(void *addr, unsigned long len) in early_efi_unmap() argument
62 early_iounmap(addr, len); in early_efi_unmap()
68 u16 len; in early_efi_clear_scanline() local
70 len = boot_params.screen_info.lfb_linelength; in early_efi_clear_scanline()
71 dst = early_efi_map(y*len, len); in early_efi_clear_scanline()
75 memset(dst, 0, len); in early_efi_clear_scanline()
76 early_efi_unmap(dst, len); in early_efi_clear_scanline()
82 u16 len; in early_efi_scroll_up() local
[all …]
/linux-4.1.27/tools/testing/selftests/breakpoints/
Dbreakpoint_test.c51 static void toggle_breakpoint(int n, int type, int len, in toggle_breakpoint() argument
71 switch (len) { in toggle_breakpoint()
145 static void write_var(int len) in write_var() argument
151 switch (len) { in write_var()
173 static void read_var(int len) in read_var() argument
179 switch (len) { in read_var()
203 int len, local, global, i; in trigger_tests() local
230 for (len = 1; len <= sizeof(long); len <<= 1) { in trigger_tests()
235 write_var(len); in trigger_tests()
241 for (len = 1; len <= sizeof(long); len <<= 1) { in trigger_tests()
[all …]
/linux-4.1.27/arch/powerpc/lib/
Dchecksum_wrappers_64.c27 int len, __wsum sum, int *err_ptr) in csum_and_copy_from_user() argument
35 if (!len) { in csum_and_copy_from_user()
40 if (unlikely((len < 0) || !access_ok(VERIFY_READ, src, len))) { in csum_and_copy_from_user()
47 len, sum, err_ptr, NULL); in csum_and_copy_from_user()
50 int missing = __copy_from_user(dst, src, len); in csum_and_copy_from_user()
53 memset(dst + len - missing, 0, missing); in csum_and_copy_from_user()
59 csum = csum_partial(dst, len, sum); in csum_and_copy_from_user()
67 __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len, in csum_and_copy_to_user() argument
76 if (!len) { in csum_and_copy_to_user()
81 if (unlikely((len < 0) || !access_ok(VERIFY_WRITE, dst, len))) { in csum_and_copy_to_user()
[all …]
/linux-4.1.27/arch/x86/include/asm/
Dchecksum_32.h20 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
31 int len, __wsum sum,
42 int len, __wsum sum) in csum_partial_copy_nocheck() argument
44 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
49 int len, __wsum sum, in csum_partial_copy_from_user() argument
57 len, sum, err_ptr, NULL); in csum_partial_copy_from_user()
115 unsigned short len, in csum_tcpudp_nofold() argument
125 "g" ((len + proto) << 8), "0" (sum)); in csum_tcpudp_nofold()
134 unsigned short len, in csum_tcpudp_magic() argument
138 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
[all …]
/linux-4.1.27/arch/x86/crypto/
Dcrc32c-intel_glue.c59 asmlinkage unsigned int crc_pcl(const u8 *buffer, int len,
88 static u32 __pure crc32c_intel_le_hw(u32 crc, unsigned char const *p, size_t len) in crc32c_intel_le_hw() argument
90 unsigned int iquotient = len / SCALE_F; in crc32c_intel_le_hw()
91 unsigned int iremainder = len % SCALE_F; in crc32c_intel_le_hw()
139 unsigned int len) in crc32c_intel_update() argument
143 *crcp = crc32c_intel_le_hw(*crcp, data, len); in crc32c_intel_update()
147 static int __crc32c_intel_finup(u32 *crcp, const u8 *data, unsigned int len, in __crc32c_intel_finup() argument
150 *(__le32 *)out = ~cpu_to_le32(crc32c_intel_le_hw(*crcp, data, len)); in __crc32c_intel_finup()
155 unsigned int len, u8 *out) in crc32c_intel_finup() argument
157 return __crc32c_intel_finup(shash_desc_ctx(desc), data, len, out); in crc32c_intel_finup()
[all …]
/linux-4.1.27/Documentation/spi/
Dspidev_fdx.c17 static void do_read(int fd, int len) in do_read() argument
23 if (len < 2) in do_read()
24 len = 2; in do_read()
25 else if (len > sizeof(buf)) in do_read()
26 len = sizeof(buf); in do_read()
29 status = read(fd, buf, len); in do_read()
34 if (status != len) { in do_read()
39 printf("read(%2d, %2d): %02x %02x,", len, status, in do_read()
48 static void do_msg(int fd, int len) in do_msg() argument
57 if (len > sizeof buf) in do_msg()
[all …]
/linux-4.1.27/tools/testing/selftests/powerpc/copyloops/
Dvalidate.c17 unsigned long dst_off, unsigned long len, void *redzone, in do_one() argument
29 memcpy(srcp, fill, len); in do_one()
31 ret = COPY_LOOP(dstp, srcp, len); in do_one()
33 printf("(%p,%p,%ld) returned %ld\n", dstp, srcp, len, ret); in do_one()
37 if (memcmp(dstp, srcp, len)) { in do_one()
38 printf("(%p,%p,%ld) miscompare\n", dstp, srcp, len); in do_one()
40 for (i = 0; i < len; i++) in do_one()
43 for (i = 0; i < len; i++) in do_one()
51 dstp, srcp, len); in do_one()
55 if (memcmp(dstp+len, redzone, dst+BUFLEN-(dstp+len))) { in do_one()
[all …]
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
Dfwil.c107 brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) in brcmf_fil_cmd_data() argument
118 len = min_t(uint, len, BRCMF_DCMD_MAXLEN); in brcmf_fil_cmd_data()
120 err = brcmf_proto_set_dcmd(drvr, ifp->ifidx, cmd, data, len); in brcmf_fil_cmd_data()
122 err = brcmf_proto_query_dcmd(drvr, ifp->ifidx, cmd, data, len); in brcmf_fil_cmd_data()
133 brcmf_fil_cmd_data_set(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) in brcmf_fil_cmd_data_set() argument
139 brcmf_dbg(FIL, "ifidx=%d, cmd=%d, len=%d\n", ifp->ifidx, cmd, len); in brcmf_fil_cmd_data_set()
141 min_t(uint, len, MAX_HEX_DUMP_LEN), "data\n"); in brcmf_fil_cmd_data_set()
143 err = brcmf_fil_cmd_data(ifp, cmd, data, len, true); in brcmf_fil_cmd_data_set()
150 brcmf_fil_cmd_data_get(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) in brcmf_fil_cmd_data_get() argument
155 err = brcmf_fil_cmd_data(ifp, cmd, data, len, false); in brcmf_fil_cmd_data_get()
[all …]
Dvendor.c32 const void *data, int len) in brcmf_cfg80211_vndr_cmds_dcmd_handler() argument
42 if (len < sizeof(*cmdhdr)) { in brcmf_cfg80211_vndr_cmds_dcmd_handler()
43 brcmf_err("vendor command too short: %d\n", len); in brcmf_cfg80211_vndr_cmds_dcmd_handler()
52 if (cmdhdr->offset > len) { in brcmf_cfg80211_vndr_cmds_dcmd_handler()
53 brcmf_err("bad buffer offset %d > %d\n", cmdhdr->offset, len); in brcmf_cfg80211_vndr_cmds_dcmd_handler()
57 len -= cmdhdr->offset; in brcmf_cfg80211_vndr_cmds_dcmd_handler()
58 ret_len = cmdhdr->len; in brcmf_cfg80211_vndr_cmds_dcmd_handler()
59 if (ret_len > 0 || len > 0) { in brcmf_cfg80211_vndr_cmds_dcmd_handler()
60 if (len > BRCMF_DCMD_MAXLEN) { in brcmf_cfg80211_vndr_cmds_dcmd_handler()
61 brcmf_err("oversize input buffer %d\n", len); in brcmf_cfg80211_vndr_cmds_dcmd_handler()
[all …]
Dbcdc.c38 __le32 len; /* lower 16: output buflen; member
111 uint len, bool set) in brcmf_proto_bcdc_msg() argument
122 msg->len = cpu_to_le32(len); in brcmf_proto_bcdc_msg()
131 memcpy(bcdc->buf, buf, len); in brcmf_proto_bcdc_msg()
133 len += sizeof(*msg); in brcmf_proto_bcdc_msg()
134 if (len > BRCMF_TX_IOCTL_MAX_MSG_SIZE) in brcmf_proto_bcdc_msg()
135 len = BRCMF_TX_IOCTL_MAX_MSG_SIZE; in brcmf_proto_bcdc_msg()
138 return brcmf_bus_txctl(drvr->bus_if, (unsigned char *)&bcdc->msg, len); in brcmf_proto_bcdc_msg()
141 static int brcmf_proto_bcdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len) in brcmf_proto_bcdc_cmplt() argument
147 len += sizeof(struct brcmf_proto_bcdc_dcmd); in brcmf_proto_bcdc_cmplt()
[all …]
/linux-4.1.27/drivers/base/regmap/
Dregmap-spmi.c130 size_t len; in regmap_spmi_ext_read() local
142 len = min_t(size_t, val_size, 16); in regmap_spmi_ext_read()
144 err = spmi_ext_register_read(context, addr, val, len); in regmap_spmi_ext_read()
148 addr += len; in regmap_spmi_ext_read()
149 val += len; in regmap_spmi_ext_read()
150 val_size -= len; in regmap_spmi_ext_read()
154 len = min_t(size_t, val_size, 8); in regmap_spmi_ext_read()
156 err = spmi_ext_register_readl(context, addr, val, len); in regmap_spmi_ext_read()
160 addr += len; in regmap_spmi_ext_read()
161 val += len; in regmap_spmi_ext_read()
[all …]
/linux-4.1.27/net/netfilter/
Dnf_conntrack_h323_asn1.c291 int len; in decode_oid() local
297 len = *bs->cur++; in decode_oid()
298 bs->cur += len; in decode_oid()
308 unsigned int len; in decode_int() local
322 len = get_bits(bs, 2) + 1; in decode_int()
325 unsigned int v = get_uint(bs, len) + f->lb; in decode_int()
329 bs->cur += len; in decode_int()
334 len = get_len(bs); in decode_int()
335 bs->cur += len; in decode_int()
368 unsigned int len; in decode_bitstr() local
[all …]
Dnf_conntrack_amanda.c61 size_t len; member
66 .len = 8,
70 .len = 1,
74 .len = 5,
78 .len = 5,
82 .len = 6,
95 u_int16_t len; in amanda_help() local
110 if (dataoff >= skb->len) { in amanda_help()
111 net_err_ratelimited("amanda_help: skblen = %u\n", skb->len); in amanda_help()
115 start = skb_find_text(skb, dataoff, skb->len, in amanda_help()
[all …]
/linux-4.1.27/arch/parisc/lib/
Dchecksum.c41 static inline unsigned int do_csum(const unsigned char * buff, int len) in do_csum() argument
46 if (len <= 0) in do_csum()
51 len--; in do_csum()
54 count = len >> 1; /* nr of 16-bit words.. */ in do_csum()
59 len -= 2; in do_csum()
85 if (len & 2) { in do_csum()
90 if (len & 1) in do_csum()
105 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
107 unsigned int result = do_csum(buff, len); in csum_partial()
118 int len, __wsum sum) in csum_partial_copy_nocheck() argument
[all …]
Dmemcpy.c165 unsigned long src, unsigned long len) in copy_dstaligned() argument
183 switch (len % 4) in copy_dstaligned()
192 len += 2; in copy_dstaligned()
201 len += 1; in copy_dstaligned()
204 if (len == 0) in copy_dstaligned()
212 len += 0; in copy_dstaligned()
221 len -= 1; in copy_dstaligned()
222 if (len == 0) in copy_dstaligned()
253 len -= 4; in copy_dstaligned()
255 while (len != 0); in copy_dstaligned()
[all …]
/linux-4.1.27/fs/ocfs2/dlm/
Ddlmdebug.c48 int len);
104 stringify_lockname(res->lockname.name, res->lockname.len, in __dlm_print_one_lock_resource()
252 int len) in stringify_lockname() argument
262 out += snprintf(buf + out, len - out, "%.*s%08x", in stringify_lockname()
266 out += snprintf(buf + out, len - out, "%.*s", in stringify_lockname()
272 char *buf, int len) in stringify_nodemap() argument
278 out += snprintf(buf + out, len - out, "%d ", i); in stringify_nodemap()
283 static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) in dump_mle() argument
295 out += stringify_lockname(mle->mname, mle->mnamelen, buf + out, len - out); in dump_mle()
296 out += snprintf(buf + out, len - out, in dump_mle()
[all …]
/linux-4.1.27/drivers/mtd/devices/
Dphram.c40 memset(start + instr->addr, 0xff, instr->len); in phram_erase()
52 static int phram_point(struct mtd_info *mtd, loff_t from, size_t len, in phram_point() argument
56 *retlen = len; in phram_point()
60 static int phram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in phram_unpoint() argument
65 static int phram_read(struct mtd_info *mtd, loff_t from, size_t len, in phram_read() argument
70 memcpy(buf, start + from, len); in phram_read()
71 *retlen = len; in phram_read()
75 static int phram_write(struct mtd_info *mtd, loff_t to, size_t len, in phram_write() argument
80 memcpy(start + to, buf, len); in phram_write()
81 *retlen = len; in phram_write()
[all …]
/linux-4.1.27/drivers/infiniband/hw/qib/
Dqib_eeprom.c54 void *buff, int len) in qib_eeprom_read() argument
65 eeprom_offset, buff, len); in qib_eeprom_read()
78 const void *buf, int len) in eeprom_write_with_enable() argument
88 offset, buf, len); in eeprom_write_with_enable()
101 const void *buff, int len) in qib_eeprom_write() argument
107 ret = eeprom_write_with_enable(dd, eeprom_offset, buff, len); in qib_eeprom_write()
117 u8 csum = 0, len; in flash_csum() local
124 len = ifp->if_length; in flash_csum()
125 if (len > sizeof(struct qib_flash)) in flash_csum()
126 len = sizeof(struct qib_flash); in flash_csum()
[all …]
/linux-4.1.27/mm/
Dutil.c46 size_t len; in kstrdup() local
52 len = strlen(s) + 1; in kstrdup()
53 buf = kmalloc_track_caller(len, gfp); in kstrdup()
55 memcpy(buf, s, len); in kstrdup()
86 size_t len; in kstrndup() local
92 len = strnlen(s, max); in kstrndup()
93 buf = kmalloc_track_caller(len+1, gfp); in kstrndup()
95 memcpy(buf, s, len); in kstrndup()
96 buf[len] = '\0'; in kstrndup()
109 void *kmemdup(const void *src, size_t len, gfp_t gfp) in kmemdup() argument
[all …]
/linux-4.1.27/arch/s390/include/asm/
Dchecksum.h29 csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
32 register unsigned long reg3 asm("3") = (unsigned long) len; in csum_partial()
51 int len, __wsum sum, in csum_partial_copy_from_user() argument
54 if (unlikely(copy_from_user(dst, src, len))) in csum_partial_copy_from_user()
56 return csum_partial(dst, len, sum); in csum_partial_copy_from_user()
61 csum_partial_copy_nocheck (const void *src, void *dst, int len, __wsum sum) in csum_partial_copy_nocheck() argument
63 memcpy(dst,src,len); in csum_partial_copy_nocheck()
64 return csum_partial(dst, len, sum); in csum_partial_copy_nocheck()
95 unsigned short len, unsigned short proto, in csum_tcpudp_nofold() argument
108 csum += len + proto; in csum_tcpudp_nofold()
[all …]
/linux-4.1.27/drivers/crypto/caam/
Ddesc_constr.h86 static inline void init_job_desc_shared(u32 *desc, dma_addr_t ptr, int len, in init_job_desc_shared() argument
91 (len << HDR_START_IDX_SHIFT)); in init_job_desc_shared()
95 static inline void append_data(u32 *desc, void *data, int len) in append_data() argument
99 if (len) /* avoid sparse warning: memcpy with byte count of 0 */ in append_data()
100 memcpy(offset, data, len); in append_data()
102 (*desc) += (len + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; in append_data()
134 static inline void append_cmd_ptr(u32 *desc, dma_addr_t ptr, int len, in append_cmd_ptr() argument
137 append_cmd(desc, command | len); in append_cmd_ptr()
143 unsigned int len, u32 command) in append_cmd_ptr_extlen() argument
148 append_cmd(desc, len); in append_cmd_ptr_extlen()
[all …]
/linux-4.1.27/net/core/
Ddatagram.c226 if (_off >= skb->len && (skb->len || _off || in __skb_recv_datagram()
228 _off -= skb->len; in __skb_recv_datagram()
356 struct iov_iter *to, int len) in skb_copy_datagram_iter() argument
362 trace_skb_copy_datagram_iovec(skb, len); in skb_copy_datagram_iter()
366 if (copy > len) in skb_copy_datagram_iter()
367 copy = len; in skb_copy_datagram_iter()
370 if ((len -= copy) == 0) in skb_copy_datagram_iter()
380 WARN_ON(start > offset + len); in skb_copy_datagram_iter()
384 if (copy > len) in skb_copy_datagram_iter()
385 copy = len; in skb_copy_datagram_iter()
[all …]
Dpktgen.c828 int len; in get_labels() local
833 len = hex32_arg(&buffer[i], 8, &tmp); in get_labels()
834 if (len <= 0) in get_labels()
835 return len; in get_labels()
839 i += len; in get_labels()
858 int i, max, len; in pktgen_if_write() local
882 len = strn_len(&user_buffer[i], sizeof(name) - 1); in pktgen_if_write()
883 if (len < 0) in pktgen_if_write()
884 return len; in pktgen_if_write()
887 if (copy_from_user(name, &user_buffer[i], len)) in pktgen_if_write()
[all …]
Dskbuff.c101 msg, addr, skb->len, sz, skb->head, skb->data, in skb_panic()
577 skb->len += size; in skb_add_rx_frag()
589 skb->len += size; in skb_coalesce_rx_frag()
872 C(len); in __skb_clone()
1077 skb_put(n, skb->len); in skb_copy()
1079 if (skb_copy_bits(skb, -headerlen, n->head, headerlen + skb->len)) in skb_copy()
1119 skb_copy_from_linear_data(skb, n->data, n->len); in __pskb_copy_fclone()
1123 n->len = skb->len; in __pskb_copy_fclone()
1290 struct sk_buff *n = __alloc_skb(newheadroom + skb->len + newtailroom, in skb_copy_expand()
1302 skb_put(n, skb->len); in skb_copy_expand()
[all …]
/linux-4.1.27/crypto/async_tx/
Dasync_xor.c79 xor_src_cnt, unmap->len, in do_async_xor()
90 xor_src_cnt, unmap->len, in do_async_xor()
114 int src_cnt, size_t len, struct async_submit_ctl *submit) in do_sync_xor() argument
136 memset(dest_buf, 0, len); in do_sync_xor()
141 xor_blocks(xor_src_cnt, len, dest_buf, &srcs[src_off]); in do_sync_xor()
174 int src_cnt, size_t len, struct async_submit_ctl *submit) in async_xor() argument
178 src_cnt, len); in async_xor()
187 if (unmap && is_dma_xor_aligned(device, offset, 0, len)) { in async_xor()
192 pr_debug("%s (async): len: %zu\n", __func__, len); in async_xor()
194 unmap->len = len; in async_xor()
[all …]
Dasync_pq.c96 &scfs[src_off], unmap->len, in do_async_gen_syndrome()
123 size_t len, struct async_submit_ctl *submit) in do_sync_gen_syndrome() argument
150 raid6_call.xor_syndrome(disks, start, stop, len, srcs); in do_sync_gen_syndrome()
152 raid6_call.gen_syndrome(disks, len, srcs); in do_sync_gen_syndrome()
179 size_t len, struct async_submit_ctl *submit) in async_gen_syndrome() argument
184 blocks, src_cnt, len); in async_gen_syndrome()
197 is_dma_pq_aligned(device, offset, 0, len)) { in async_gen_syndrome()
205 __func__, disks, len); in async_gen_syndrome()
210 unmap->len = len; in async_gen_syndrome()
215 len, DMA_TO_DEVICE); in async_gen_syndrome()
[all …]
/linux-4.1.27/drivers/media/usb/pvrusb2/
Dpvrusb2-ctrl.c286 unsigned int *len) in pvr2_ctrl_custom_value_to_sym() argument
290 return cptr->info->val_to_sym(cptr,mask,val,buf,maxlen,len); in pvr2_ctrl_custom_value_to_sym()
296 const char *buf,unsigned int len, in pvr2_ctrl_custom_sym_to_value() argument
301 return cptr->info->sym_to_val(cptr,buf,len,maskptr,valptr); in pvr2_ctrl_custom_sym_to_value()
307 char *ptr,unsigned int len) in gen_bitmask_string() argument
323 cnt = scnprintf(ptr,len,"%s%s%s", in gen_bitmask_string()
328 ptr += cnt; len -= cnt; uc += cnt; in gen_bitmask_string()
337 cnt = scnprintf(ptr,len,"%s0x%lx", in gen_bitmask_string()
340 ptr += cnt; len -= cnt; uc += cnt; in gen_bitmask_string()
343 cnt = scnprintf(ptr,len,"%s+0x%lx", in gen_bitmask_string()
[all …]
/linux-4.1.27/arch/s390/lib/
Dstring.c99 size_t len = (ret >= size) ? size-1 : ret; in strlcpy() local
100 dest[len] = '\0'; in strlcpy()
101 memcpy(dest, src, len); in strlcpy()
118 size_t len = __strnend(src, n) - src; in strncpy() local
119 memset(dest + len, 0, n - len); in strncpy()
120 memcpy(dest, src, len); in strncpy()
157 size_t len = __strend(src) - src; in strlcat() local
158 size_t res = dsize + len; in strlcat()
163 if (len >= n) in strlcat()
164 len = n - 1; in strlcat()
[all …]
/linux-4.1.27/kernel/trace/
Dtrace_seq.c85 unsigned int save_len = s->seq.len; in trace_seq_printf()
99 s->seq.len = save_len; in trace_seq_printf()
116 unsigned int save_len = s->seq.len; in trace_seq_bitmask()
126 s->seq.len = save_len; in trace_seq_bitmask()
145 unsigned int save_len = s->seq.len; in trace_seq_vprintf()
156 s->seq.len = save_len; in trace_seq_vprintf()
179 unsigned int save_len = s->seq.len; in trace_seq_bprintf()
190 s->seq.len = save_len; in trace_seq_bprintf()
209 unsigned int len = strlen(str); in trace_seq_puts() local
216 if (len > TRACE_SEQ_BUF_LEFT(s)) { in trace_seq_puts()
[all …]
/linux-4.1.27/drivers/media/dvb-core/
Ddvb_ringbuffer.c42 void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len) in dvb_ringbuffer_init() argument
46 rbuf->size=len; in dvb_ringbuffer_init()
111 ssize_t dvb_ringbuffer_read_user(struct dvb_ringbuffer *rbuf, u8 __user *buf, size_t len) in dvb_ringbuffer_read_user() argument
113 size_t todo = len; in dvb_ringbuffer_read_user()
116 split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0; in dvb_ringbuffer_read_user()
129 return len; in dvb_ringbuffer_read_user()
132 void dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len) in dvb_ringbuffer_read() argument
134 size_t todo = len; in dvb_ringbuffer_read()
137 split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0; in dvb_ringbuffer_read()
150 ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, size_t len) in dvb_ringbuffer_write() argument
[all …]
/linux-4.1.27/arch/sparc/include/asm/
Dchecksum_64.h32 __wsum csum_partial(const void * buff, int len, __wsum sum);
41 int len, __wsum sum);
44 void *dst, int len,
49 void *dst, int len, in csum_partial_copy_from_user() argument
52 long ret = __csum_partial_copy_from_user(src, dst, len, sum); in csum_partial_copy_from_user()
63 void __user *dst, int len,
68 void __user *dst, int len, in csum_and_copy_to_user() argument
71 long ret = __csum_partial_copy_to_user(src, dst, len, sum); in csum_and_copy_to_user()
99 unsigned int len, in csum_tcpudp_nofold() argument
109 : "r" (daddr), "r" (proto + len), "0" (sum), "1" (saddr) in csum_tcpudp_nofold()
[all …]
Dchecksum_32.h32 __wsum csum_partial(const void *buff, int len, __wsum sum);
44 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) in csum_partial_copy_nocheck() argument
48 register int l asm("g1") = len; in csum_partial_copy_nocheck()
62 csum_partial_copy_from_user(const void __user *src, void *dst, int len, in csum_partial_copy_from_user() argument
67 register int l asm("g1") = len; in csum_partial_copy_from_user()
86 csum_partial_copy_to_user(const void *src, void __user *dst, int len, in csum_partial_copy_to_user() argument
89 if (!access_ok (VERIFY_WRITE, dst, len)) { in csum_partial_copy_to_user()
95 register int l asm("g1") = len; in csum_partial_copy_to_user()
173 unsigned short len, in csum_tcpudp_nofold() argument
182 : "r" (daddr), "r" (proto + len), "0" (sum), in csum_tcpudp_nofold()
[all …]
/linux-4.1.27/arch/s390/kvm/
Dgaccess.h125 unsigned long len) in write_guest_lc() argument
129 return kvm_write_guest(vcpu->kvm, gpa, data, len); in write_guest_lc()
151 unsigned long len) in read_guest_lc() argument
155 return kvm_read_guest(vcpu->kvm, gpa, data, len); in read_guest_lc()
164 unsigned long len, int write);
167 void *data, unsigned long len, int write);
216 unsigned long len) in write_guest() argument
218 return access_guest(vcpu, ga, ar, data, len, 1); in write_guest()
236 unsigned long len) in read_guest() argument
238 return access_guest(vcpu, ga, ar, data, len, 0); in read_guest()
[all …]
/linux-4.1.27/sound/firewire/dice/
Ddice.h92 void *buf, unsigned int len);
95 void *buf, unsigned int len);
99 void *buf, unsigned int len) in snd_dice_transaction_write_global() argument
103 buf, len); in snd_dice_transaction_write_global()
107 void *buf, unsigned int len) in snd_dice_transaction_read_global() argument
111 buf, len); in snd_dice_transaction_read_global()
115 void *buf, unsigned int len) in snd_dice_transaction_write_tx() argument
118 buf, len); in snd_dice_transaction_write_tx()
122 void *buf, unsigned int len) in snd_dice_transaction_read_tx() argument
125 buf, len); in snd_dice_transaction_read_tx()
[all …]
/linux-4.1.27/arch/mips/cavium-octeon/
Docteon-memcpy.S22 #define len a2 macro
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
[all …]
/linux-4.1.27/fs/nfsd/
Dblocklayoutxdr.c19 int len = sizeof(__be32) + 5 * sizeof(__be64) + sizeof(__be32); in nfsd4_block_encode_layoutget() local
22 p = xdr_reserve_space(xdr, sizeof(__be32) + len); in nfsd4_block_encode_layoutget()
26 *p++ = cpu_to_be32(len); in nfsd4_block_encode_layoutget()
32 p = xdr_encode_hyper(p, b->len); in nfsd4_block_encode_layoutget()
42 int len; in nfsd4_block_encode_volume() local
46 len = 4 + 4 + 8 + 4 + b->simple.sig_len; in nfsd4_block_encode_volume()
47 p = xdr_reserve_space(xdr, len); in nfsd4_block_encode_volume()
60 return len; in nfsd4_block_encode_volume()
68 int len = sizeof(__be32), ret, i; in nfsd4_block_encode_getdeviceinfo() local
71 p = xdr_reserve_space(xdr, len + sizeof(__be32)); in nfsd4_block_encode_getdeviceinfo()
[all …]
/linux-4.1.27/arch/powerpc/platforms/pseries/
Dnvram.c48 unsigned long len; in pSeries_nvram_read() local
66 for (; count != 0; count -= len) { in pSeries_nvram_read()
67 len = count; in pSeries_nvram_read()
68 if (len > NVRW_CNT) in pSeries_nvram_read()
69 len = NVRW_CNT; in pSeries_nvram_read()
72 len) != 0) || len != done) { in pSeries_nvram_read()
77 memcpy(p, nvram_buf, len); in pSeries_nvram_read()
79 p += len; in pSeries_nvram_read()
80 i += len; in pSeries_nvram_read()
92 unsigned long len; in pSeries_nvram_write() local
[all …]
/linux-4.1.27/drivers/isdn/pcbit/
Dcallbacks.c46 int len; in cb_out_1() local
59 if ((len = capi_conn_req(cbdata->data.setup.CalledPN, &skb, in cb_out_1()
74 pcbit_l2_write(dev, MSG_CONN_REQ, refnum, skb, len); in cb_out_1()
89 int len; in cb_out_2() local
92 if ((len = capi_conn_active_resp(chan, &skb)) < 0) in cb_out_2()
101 pcbit_l2_write(dev, MSG_CONN_ACTV_RESP, refnum, skb, len); in cb_out_2()
113 if ((len = capi_select_proto_req(chan, &skb, 1 /*outgoing*/)) < 0) { in cb_out_2()
121 pcbit_l2_write(dev, MSG_SELP_REQ, refnum, skb, len); in cb_out_2()
136 int len; in cb_in_1() local
173 if ((len = capi_conn_resp(chan, &skb)) < 0) { in cb_in_1()
[all …]
Dcapi.c56 ushort len; in capi_conn_req() local
74 len = 18 + strlen(calledPN); in capi_conn_req()
77 len++; in capi_conn_req()
79 if ((*skb = dev_alloc_skb(len)) == NULL) { in capi_conn_req()
131 return len; in capi_conn_req()
298 data_len = skb->len; in capi_tdata_req()
335 return (*skb)->len; in capi_tdata_resp()
385 int CIlen, len; in capi_decode_conn_ind() local
418 len = skb->data[0]; in capi_decode_conn_ind()
420 if (len > 0) { in capi_decode_conn_ind()
[all …]
/linux-4.1.27/drivers/misc/cb710/
Dsgbuf2.c30 size_t len, left = 4; in sg_dwiter_read_buffer() local
35 len = min(miter->length - miter->consumed, left); in sg_dwiter_read_buffer()
36 memcpy(addr, miter->addr + miter->consumed, len); in sg_dwiter_read_buffer()
37 miter->consumed += len; in sg_dwiter_read_buffer()
38 left -= len; in sg_dwiter_read_buffer()
41 addr += len; in sg_dwiter_read_buffer()
59 size_t len; in sg_dwiter_get_next_block() local
64 len = miter->length - miter->consumed; in sg_dwiter_get_next_block()
66 if (likely(len >= 4 && !needs_unaligned_copy( in sg_dwiter_get_next_block()
106 size_t len, left = 4; in sg_dwiter_write_slow() local
[all …]
/linux-4.1.27/arch/sparc/lib/
Dbitext.c27 int bit_map_string_get(struct bit_map *t, int len, int align) in bit_map_string_get() argument
48 if (len <= 0 || len > t->size) in bit_map_string_get()
53 if (len < t->last_size) in bit_map_string_get()
65 if (count + len > t->size) { in bit_map_string_get()
69 t->size, t->used, offset, len, align, count); in bit_map_string_get()
73 if (offset + len > t->size) { in bit_map_string_get()
82 if (i == len) { in bit_map_string_get()
83 bitmap_set(t->map, offset, len); in bit_map_string_get()
87 t->first_free + len); in bit_map_string_get()
88 if ((t->last_off = offset + len) >= t->size) in bit_map_string_get()
[all …]
/linux-4.1.27/arch/sh/lib/
Dio.c17 void __raw_readsl(const void __iomem *addr, void *datap, int len) in __raw_readsl() argument
21 for (data = datap; (len != 0) && (((u32)data & 0x1f) != 0); len--) in __raw_readsl()
24 if (likely(len >= (0x20 >> 2))) { in __raw_readsl()
54 : "=&r" (data), "=&r" (len), in __raw_readsl()
57 : "r"(addr), "0" (data), "1" (len) in __raw_readsl()
61 for (; len != 0; len--) in __raw_readsl()
66 void __raw_writesl(void __iomem *addr, const void *data, int len) in __raw_writesl() argument
68 if (likely(len != 0)) { in __raw_writesl()
78 : "0" (data), "r" (len), "r"(addr) in __raw_writesl()
/linux-4.1.27/drivers/xen/xenbus/
Dxenbus_comms.c69 char *buf, uint32_t *len) in get_output_chunk() argument
71 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(prod); in get_output_chunk()
72 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in get_output_chunk()
73 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_chunk()
79 const char *buf, uint32_t *len) in get_input_chunk() argument
81 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons); in get_input_chunk()
82 if ((prod - cons) < *len) in get_input_chunk()
83 *len = prod - cons; in get_input_chunk()
94 int xb_write(const void *data, unsigned len) in xb_write() argument
100 while (len != 0) { in xb_write()
[all …]
Dxenbus_dev_frontend.c83 unsigned int len; member
107 unsigned int len; member
123 size_t len, loff_t *ppos) in xenbus_file_read() argument
146 while (i < len) { in xenbus_file_read()
147 unsigned sz = min((unsigned)len - i, rb->len - rb->cons); in xenbus_file_read()
161 if (rb->cons == rb->len) { in xenbus_file_read()
185 static int queue_reply(struct list_head *queue, const void *data, size_t len) in queue_reply() argument
189 if (len == 0) in queue_reply()
192 rb = kmalloc(sizeof(*rb) + len, GFP_KERNEL); in queue_reply()
197 rb->len = len; in queue_reply()
[all …]
/linux-4.1.27/arch/arm/lib/
Dcsumpartial.S22 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
[all …]
/linux-4.1.27/net/rose/
Drose_subr.c109 int len, faclen = 0; in rose_write_internal() local
111 len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 1; in rose_write_internal()
115 len += 1 + ROSE_ADDR_LEN + ROSE_ADDR_LEN; in rose_write_internal()
117 len += faclen; in rose_write_internal()
122 len += 2; in rose_write_internal()
126 if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL) in rose_write_internal()
239 static int rose_parse_national(unsigned char *p, struct rose_facilities_struct *facilities, int len) in rose_parse_national() argument
248 if (len < 2) in rose_parse_national()
252 len -= 2; in rose_parse_national()
256 if (len < 3) in rose_parse_national()
[all …]
/linux-4.1.27/arch/powerpc/platforms/ps3/
Dmm.c351 BUG_ON(lpar_addr >= r->offset + r->len); in dma_sb_lpar_to_bus()
363 DBG("%s:%d: len %lxh\n", func, line, r->len); in _dma_dump_region()
385 unsigned long len; member
398 DBG("%s:%d: r.len %lxh\n", func, line, c->region->len); in _dma_dump_chunk()
402 DBG("%s:%d: c.len %lxh\n", func, line, c->len); in _dma_dump_chunk()
406 unsigned long bus_addr, unsigned long len) in dma_find_chunk() argument
410 unsigned long aligned_len = _ALIGN_UP(len+bus_addr-aligned_bus, in dma_find_chunk()
416 aligned_bus + aligned_len <= c->bus_addr + c->len) in dma_find_chunk()
424 if (aligned_bus >= c->bus_addr + c->len) in dma_find_chunk()
435 unsigned long lpar_addr, unsigned long len) in dma_find_chunk_lpar() argument
[all …]
/linux-4.1.27/arch/x86/lib/
Dcsum-partial_64.c34 static unsigned do_csum(const unsigned char *buff, unsigned len) in do_csum() argument
39 if (unlikely(len == 0)) in do_csum()
44 len--; in do_csum()
47 count = len >> 1; /* nr of 16-bit words.. */ in do_csum()
52 len -= 2; in do_csum()
62 len -= 4; in do_csum()
101 if (len & 4) { in do_csum()
106 if (len & 2) { in do_csum()
111 if (len & 1) in do_csum()
133 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
[all …]
Dcsum-wrappers_64.c24 int len, __wsum isum, int *errp) in csum_partial_copy_from_user() argument
29 if (!likely(access_ok(VERIFY_READ, src, len))) in csum_partial_copy_from_user()
41 while (((unsigned long)src & 6) && len >= 2) { in csum_partial_copy_from_user()
52 len -= 2; in csum_partial_copy_from_user()
57 dst, len, isum, errp, NULL); in csum_partial_copy_from_user()
66 memset(dst, 0, len); in csum_partial_copy_from_user()
85 int len, __wsum isum, int *errp) in csum_partial_copy_to_user() argument
91 if (unlikely(!access_ok(VERIFY_WRITE, dst, len))) { in csum_partial_copy_to_user()
97 while (((unsigned long)dst & 6) && len >= 2) { in csum_partial_copy_to_user()
107 len -= 2; in csum_partial_copy_to_user()
[all …]
Dusercopy_64.c57 unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) in copy_in_user() argument
59 if (access_ok(VERIFY_WRITE, to, len) && access_ok(VERIFY_READ, from, len)) { in copy_in_user()
60 return copy_user_generic((__force void *)to, (__force void *)from, len); in copy_in_user()
62 return len; in copy_in_user()
72 copy_user_handle_tail(char *to, char *from, unsigned len) in copy_user_handle_tail() argument
74 for (; len; --len, to++) { in copy_user_handle_tail()
86 memset(to, 0, len); in copy_user_handle_tail()
87 return len; in copy_user_handle_tail()
/linux-4.1.27/arch/powerpc/include/asm/
Dchecksum.h27 unsigned short len,
43 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
56 int len, __wsum sum,
62 int len, __wsum sum, int *err_ptr);
65 int len, __wsum sum, int *err_ptr);
71 #define csum_partial_copy_from_user(src, dst, len, sum, errp) \ argument
72 csum_partial_copy_generic((__force const void *)(src), (dst), (len), (sum), (errp), NULL)
75 #define csum_partial_copy_nocheck(src, dst, len, sum) \ argument
76 csum_partial_copy_generic((src), (dst), (len), (sum), NULL, NULL)
99 static inline __sum16 ip_compute_csum(const void *buff, int len) in ip_compute_csum() argument
[all …]
/linux-4.1.27/drivers/iio/common/st_sensors/
Dst_sensors_buffer.c28 int i, n = 0, len; in st_sensors_get_buffer_element() local
36 len = -ENOMEM; in st_sensors_get_buffer_element()
48 len = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev, in st_sensors_get_buffer_element()
53 len = sdata->tf->read_multiple_byte(&sdata->tb, in st_sensors_get_buffer_element()
61 len = -ENOMEM; in st_sensors_get_buffer_element()
65 len = sdata->tf->read_multiple_byte(&sdata->tb, in st_sensors_get_buffer_element()
69 if (len < 0) { in st_sensors_get_buffer_element()
81 len = byte_for_channel * n; in st_sensors_get_buffer_element()
85 len = sdata->tf->read_multiple_byte(&sdata->tb, sdata->dev, in st_sensors_get_buffer_element()
90 len = -EINVAL; in st_sensors_get_buffer_element()
[all …]
/linux-4.1.27/fs/reiserfs/
Dhashes.c44 u32 keyed_hash(const signed char *msg, int len) in keyed_hash() argument
55 pad = (u32) len | ((u32) len << 8); in keyed_hash()
58 while (len >= 16) { in keyed_hash()
72 len -= 16; in keyed_hash()
76 if (len >= 12) { in keyed_hash()
86 for (i = 12; i < len; i++) { in keyed_hash()
90 } else if (len >= 8) { in keyed_hash()
97 for (i = 8; i < len; i++) { in keyed_hash()
101 } else if (len >= 4) { in keyed_hash()
106 for (i = 4; i < len; i++) { in keyed_hash()
[all …]
/linux-4.1.27/sound/oss/
Dmsnd.c106 f->len = 0; in msnd_fifo_alloc()
116 f->len = f->tail = f->head = 0; in msnd_fifo_make_empty()
119 int msnd_fifo_write_io(msnd_fifo *f, char __iomem *buf, size_t len) in msnd_fifo_write_io() argument
123 while ((count < len) && (f->len != f->n)) { in msnd_fifo_write_io()
128 nwritten = len - count; in msnd_fifo_write_io()
134 if (nwritten > len - count) in msnd_fifo_write_io()
135 nwritten = len - count; in msnd_fifo_write_io()
142 f->len += nwritten; in msnd_fifo_write_io()
150 int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len) in msnd_fifo_write() argument
154 while ((count < len) && (f->len != f->n)) { in msnd_fifo_write()
[all …]
/linux-4.1.27/tools/perf/bench/
Dmem-memcpy.c133 u64 (*do_cycle)(const struct routine *r, size_t len, bool prefault);
134 double (*do_gettimeofday)(const struct routine *r, size_t len, bool prefault);
138 static void __bench_mem_routine(struct bench_mem_info *info, int r_idx, size_t len, double totallen) in __bench_mem_routine() argument
155 result_cycle[0] = info->do_cycle(r, len, false); in __bench_mem_routine()
156 result_cycle[1] = info->do_cycle(r, len, true); in __bench_mem_routine()
158 result_bps[0] = info->do_gettimeofday(r, len, false); in __bench_mem_routine()
159 result_bps[1] = info->do_gettimeofday(r, len, true); in __bench_mem_routine()
163 result_cycle[pf] = info->do_cycle(r, len, only_prefault); in __bench_mem_routine()
165 result_bps[pf] = info->do_gettimeofday(r, len, only_prefault); in __bench_mem_routine()
225 size_t len; in bench_mem_common() local
[all …]
/linux-4.1.27/drivers/isdn/hysdn/
Dhysdn_sched.c31 hysdn_sched_rx(hysdn_card *card, unsigned char *buf, unsigned short len, in hysdn_sched_rx() argument
39 hysdn_rx_netpkt(card, buf, len); in hysdn_sched_rx()
44 hysdn_card_errlog(card, (tErrLogEntry *) buf, len); in hysdn_sched_rx()
52 hycapi_rx_capipkt(card, buf, len); in hysdn_sched_rx()
57 printk(KERN_INFO "irq message channel %d len %d unhandled \n", chan, len); in hysdn_sched_rx()
75 unsigned short volatile *len, unsigned short volatile *chan, in hysdn_sched_tx() argument
88 *len = card->async_len; in hysdn_sched_tx()
98 *len = ERRLOG_CMD_REQ_SIZE; /* buffer length */ in hysdn_sched_tx()
106 *len = ERRLOG_CMD_STOP_SIZE; /* buffer length */ in hysdn_sched_tx()
115 if (skb->len <= maxlen) { in hysdn_sched_tx()
[all …]
/linux-4.1.27/net/ipv4/
Dxfrm4_input.c52 iph->tot_len = htons(skb->len); in xfrm4_transport_finish()
73 int iphlen, len; in xfrm4_udp_encap_rcv() local
85 len = skb->len - sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
86 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm4_udp_encap_rcv()
98 if (len == 1 && udpdata[0] == 0xff) { in xfrm4_udp_encap_rcv()
100 } else if (len > sizeof(struct ip_esp_hdr) && udpdata32[0] != 0) { in xfrm4_udp_encap_rcv()
102 len = sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
109 if (len == 1 && udpdata[0] == 0xff) { in xfrm4_udp_encap_rcv()
111 } else if (len > 2 * sizeof(u32) + sizeof(struct ip_esp_hdr) && in xfrm4_udp_encap_rcv()
115 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm4_udp_encap_rcv()
[all …]
/linux-4.1.27/include/linux/ceph/
Ddecode.h108 u32 len; in ceph_extract_encoded_string() local
112 ceph_decode_32_safe(&sp, end, len, bad); in ceph_extract_encoded_string()
113 if (!ceph_has_room(&sp, end, len)) in ceph_extract_encoded_string()
116 buf = kmalloc(len + 1, gfp); in ceph_extract_encoded_string()
120 if (len) in ceph_extract_encoded_string()
121 memcpy(buf, sp, len); in ceph_extract_encoded_string()
122 buf[len] = '\0'; in ceph_extract_encoded_string()
124 *p = (char *) *p + sizeof (u32) + len; in ceph_extract_encoded_string()
126 *lenp = (size_t) len; in ceph_extract_encoded_string()
188 static inline void ceph_encode_copy(void **p, const void *s, int len) in ceph_encode_copy() argument
[all …]
/linux-4.1.27/drivers/net/wireless/ath/carl9170/
Drx.c49 static void carl9170_dbg_message(struct ar9170 *ar, const char *buf, u32 len) in carl9170_dbg_message() argument
54 if (len > 3) { in carl9170_dbg_message()
70 wiphy_info(ar->hw->wiphy, "FW: %.*s\n", len, buf); in carl9170_dbg_message()
129 static void carl9170_cmd_callback(struct ar9170 *ar, u32 len, void *buffer) in carl9170_cmd_callback() argument
136 if (unlikely(ar->readlen != (len - 4))) { in carl9170_cmd_callback()
138 "got %d, instead of %d\n", len - 4, ar->readlen); in carl9170_cmd_callback()
140 ar->cmd_buf, (ar->cmd.hdr.len + 4) & 0x3f); in carl9170_cmd_callback()
142 buffer, len); in carl9170_cmd_callback()
152 if (len >= 4) in carl9170_cmd_callback()
153 memcpy(ar->readbuf, buffer + 4, len - 4); in carl9170_cmd_callback()
[all …]
/linux-4.1.27/drivers/isdn/mISDN/
Dl1oip_codec.c226 l1oip_law_to_4bit(u8 *data, int len, u8 *result, u32 *state) in l1oip_law_to_4bit() argument
230 if (!len) in l1oip_law_to_4bit()
236 len--; in l1oip_law_to_4bit()
240 ii = len >> 1; in l1oip_law_to_4bit()
250 if (len & 1) in l1oip_law_to_4bit()
263 l1oip_4bit_to_law(u8 *data, int len, u8 *result) in l1oip_4bit_to_law() argument
268 while (i < len) { in l1oip_4bit_to_law()
275 return len << 1; in l1oip_4bit_to_law()
283 l1oip_alaw_to_ulaw(u8 *data, int len, u8 *result) in l1oip_alaw_to_ulaw() argument
287 while (i < len) { in l1oip_alaw_to_ulaw()
[all …]
/linux-4.1.27/include/linux/
Dseq_buf.h21 size_t len; member
27 s->len = 0; in seq_buf_clear()
46 return s->len > s->size; in seq_buf_has_overflowed()
52 s->len = s->size + 1; in seq_buf_set_overflow()
64 return s->size - s->len; in seq_buf_buffer_left()
70 return min(s->len, s->size); in seq_buf_used()
83 WARN_ON(s->len > s->size + 1); in seq_buf_get_buf()
85 if (s->len < s->size) { in seq_buf_get_buf()
86 *bufp = s->buffer + s->len; in seq_buf_get_buf()
87 return s->size - s->len; in seq_buf_get_buf()
[all …]
/linux-4.1.27/ipc/
Dmsgutil.c51 static struct msg_msg *alloc_msg(size_t len) in alloc_msg() argument
57 alen = min(len, DATALEN_MSG); in alloc_msg()
65 len -= alen; in alloc_msg()
67 while (len > 0) { in alloc_msg()
69 alen = min(len, DATALEN_SEG); in alloc_msg()
76 len -= alen; in alloc_msg()
86 struct msg_msg *load_msg(const void __user *src, size_t len) in load_msg() argument
93 msg = alloc_msg(len); in load_msg()
97 alen = min(len, DATALEN_MSG); in load_msg()
102 len -= alen; in load_msg()
[all …]
/linux-4.1.27/drivers/video/fbdev/core/
Dfbcmap.c64 .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
92 int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags) in fb_alloc_cmap_gfp() argument
94 int size = len * sizeof(u16); in fb_alloc_cmap_gfp()
97 if (cmap->len != len) { in fb_alloc_cmap_gfp()
99 if (!len) in fb_alloc_cmap_gfp()
120 cmap->len = len; in fb_alloc_cmap_gfp()
121 ret = fb_copy_cmap(fb_default_cmap(len), cmap); in fb_alloc_cmap_gfp()
[all …]
/linux-4.1.27/include/trace/events/
Di2c.h38 __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 )
[all …]
/linux-4.1.27/include/uapi/linux/
Dnetlink.h80 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) argument
82 #define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN) argument
83 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) argument
85 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument
87 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ argument
89 (nlh)->nlmsg_len <= (len))
90 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
181 #define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) argument
/linux-4.1.27/fs/ubifs/
Dscan.c40 static int scan_padding_bytes(void *buf, int len) in scan_padding_bytes() argument
42 int pad_len = 0, max_pad_len = min_t(int, UBIFS_PAD_NODE_SZ, len); in scan_padding_bytes()
69 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, in ubifs_scan_a_node() argument
83 return scan_padding_bytes(buf, len); in ubifs_scan_a_node()
85 if (len < UBIFS_CH_SZ) in ubifs_scan_a_node()
97 int node_len = le32_to_cpu(ch->len); in ubifs_scan_a_node()
208 snod->len = le32_to_cpu(ch->len); in ubifs_add_snod()
241 int len; in ubifs_scanned_corruption() local
244 len = c->leb_size - offs; in ubifs_scanned_corruption()
245 if (len > 8192) in ubifs_scanned_corruption()
[all …]
/linux-4.1.27/arch/nios2/lib/
Dmemcpy.c72 static void _wordcopy_fwd_aligned(long int dstp, long int srcp, size_t len) in _wordcopy_fwd_aligned() argument
74 while (len > 7) { in _wordcopy_fwd_aligned()
96 len -= 8; in _wordcopy_fwd_aligned()
98 while (len > 0) { in _wordcopy_fwd_aligned()
103 len -= 1; in _wordcopy_fwd_aligned()
113 size_t len) in _wordcopy_fwd_dest_aligned() argument
130 while (len > 3) { in _wordcopy_fwd_dest_aligned()
145 len -= 4; in _wordcopy_fwd_dest_aligned()
147 while (len > 0) { in _wordcopy_fwd_dest_aligned()
156 len -= 1; in _wordcopy_fwd_dest_aligned()
[all …]
/linux-4.1.27/fs/gfs2/
Dacl.c47 int len; in gfs2_get_acl() local
56 len = gfs2_xattr_acl_get(ip, name, &data); in gfs2_get_acl()
57 if (len < 0) in gfs2_get_acl()
58 return ERR_PTR(len); in gfs2_get_acl()
59 if (len == 0) in gfs2_get_acl()
62 acl = posix_acl_from_xattr(&init_user_ns, data, len); in gfs2_get_acl()
70 int len; in gfs2_set_acl() local
96 len = posix_acl_to_xattr(&init_user_ns, acl, NULL, 0); in gfs2_set_acl()
97 if (len == 0) in gfs2_set_acl()
99 data = kmalloc(len, GFP_NOFS); in gfs2_set_acl()
[all …]
/linux-4.1.27/arch/parisc/include/asm/
Dchecksum.h33 void *dst, int len, __wsum sum, int *errp);
88 unsigned short len, in csum_tcpudp_nofold() argument
98 : "r" (daddr), "r"(saddr), "r"(proto+len), "0"(sum)); in csum_tcpudp_nofold()
107 unsigned short len, in csum_tcpudp_magic() argument
111 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic()
118 static inline __sum16 ip_compute_csum(const void *buf, int len) in ip_compute_csum() argument
120 return csum_fold (csum_partial(buf, len, 0)); in ip_compute_csum()
127 __u32 len, unsigned short proto, in csum_ipv6_magic() argument
183 : "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len) in csum_ipv6_magic()
184 : "0" (sum), "1" (saddr), "2" (daddr), "3" (len), "r" (proto) in csum_ipv6_magic()
[all …]
/linux-4.1.27/fs/
Dsplice.c211 buf->len = spd->partial[page_nr].len; in splice_to_pipe()
219 ret += buf->len; in splice_to_pipe()
307 struct pipe_inode_info *pipe, size_t len, in __generic_file_splice_read() argument
332 req_pages = (len + loff + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; in __generic_file_splice_read()
393 if (!len) in __generic_file_splice_read()
399 this_len = min_t(unsigned long, len, PAGE_CACHE_SIZE - loff); in __generic_file_splice_read()
482 len = this_len; in __generic_file_splice_read()
486 spd.partial[page_nr].len = this_len; in __generic_file_splice_read()
487 len -= this_len; in __generic_file_splice_read()
523 struct pipe_inode_info *pipe, size_t len, in generic_file_splice_read() argument
[all …]
/linux-4.1.27/drivers/media/usb/tm6000/
Dtm6000-i2c.c46 __u8 reg, char *buf, int len) in tm6000_i2c_send_regs() argument
57 if (len < 1 || len > i2c_packet_limit) { in tm6000_i2c_send_regs()
59 len, i2c_packet_limit); in tm6000_i2c_send_regs()
66 addr | reg << 8, 0, buf, len); in tm6000_i2c_send_regs()
79 __u8 reg, char *buf, int len) in tm6000_i2c_recv_regs() argument
91 if (len < 1 || len > i2c_packet_limit) { in tm6000_i2c_recv_regs()
93 len, i2c_packet_limit); in tm6000_i2c_recv_regs()
103 len += 1; in tm6000_i2c_recv_regs()
106 REQ_16_SET_GET_I2C_WR1_RDN, addr | reg << 8, 0, b, len); in tm6000_i2c_recv_regs()
111 REQ_16_SET_GET_I2C_WR1_RDN, addr | reg << 8, 0, buf, len); in tm6000_i2c_recv_regs()
[all …]
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
Ddisp.c30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *sub) in nvbios_disp_table() argument
44 *len = nv_ro08(bios, data + 0x02); in nvbios_disp_table()
59 nvbios_disp_entry(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len, u8 *sub) in nvbios_disp_entry() argument
62 u16 data = nvbios_disp_table(bios, ver, &hdr, &cnt, len, sub); in nvbios_disp_entry()
64 return data + hdr + (idx * *len); in nvbios_disp_entry()
70 nvbios_disp_parse(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len, u8 *sub, in nvbios_disp_parse() argument
73 u16 data = nvbios_disp_entry(bios, idx, ver, len, sub); in nvbios_disp_parse()
74 if (data && *len >= 2) { in nvbios_disp_parse()
83 u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_outp_entry() argument
86 u16 data = nvbios_disp_parse(bios, idx, ver, len, hdr, &info); in nvbios_outp_entry()
[all …]
Ddp.c29 nvbios_dp_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_dp_table() argument
44 *len = nv_ro08(bios, data + 0x02); in nvbios_dp_table()
59 u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_dpout_entry() argument
61 u16 data = nvbios_dp_table(bios, ver, hdr, cnt, len); in nvbios_dpout_entry()
63 u16 outp = nv_ro16(bios, data + *hdr + idx * *len); in nvbios_dpout_entry()
68 *len = nv_ro08(bios, data + 0x05); in nvbios_dpout_entry()
75 *len = 0; in nvbios_dpout_entry()
88 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, in nvbios_dpout_parse() argument
91 u16 data = nvbios_dpout_entry(bios, idx, ver, hdr, cnt, len); in nvbios_dpout_parse()
103 if (*len >= 0x0f) { in nvbios_dpout_parse()
[all …]
Dboost.c30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz) in nvbios_boostTe() argument
45 *len = nv_ro08(bios, boost + 2); in nvbios_boostTe()
60 u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_boostEe() argument
63 u16 data = nvbios_boostTe(bios, ver, hdr, cnt, len, &snr, &ssz); in nvbios_boostEe()
65 data = data + *hdr + (idx * (*len + (snr * ssz))); in nvbios_boostEe()
66 *hdr = *len; in nvbios_boostEe()
68 *len = ssz; in nvbios_boostEe()
76 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_boostE *info) in nvbios_boostEp() argument
78 u16 data = nvbios_boostEe(bios, idx, ver, hdr, cnt, len); in nvbios_boostEp()
90 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_boostE *info) in nvbios_boostEm() argument
[all …]
/linux-4.1.27/arch/avr32/include/asm/
Dchecksum.h23 __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) in csum_partial_copy_nocheck() argument
47 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
52 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
54 return csum_partial_copy_generic((const void __force *)src, dst, len, in csum_partial_copy_from_user()
114 unsigned short len, in csum_tcpudp_nofold() argument
123 : "r"(daddr), "r"(saddr), "r"(len + proto), in csum_tcpudp_nofold()
135 unsigned short len, in csum_tcpudp_magic() argument
139 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic()
[all …]
/linux-4.1.27/arch/mips/lib/
Dmemcpy.S38 #define len a2 macro
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
345 beqz len, .Ldone\@
346 sltu t0, len, 4*NBYTES
348 and rem, len, (NBYTES-1) # rem = len % NBYTES
[all …]
/linux-4.1.27/drivers/nfc/microread/
Di2c.c65 16, 1, (skb)->data, (skb)->len, 0); \
72 int len; in microread_i2c_add_len_crc() local
74 len = skb->len; in microread_i2c_add_len_crc()
75 *skb_push(skb, 1) = len; in microread_i2c_add_len_crc()
77 for (i = 0; i < skb->len; i++) in microread_i2c_add_len_crc()
94 for (i = 0; i < skb->len - 1; i++) in check_crc()
97 if (crc != skb->data[skb->len-1]) { in check_crc()
98 pr_err("CRC error 0x%x != 0x%x\n", crc, skb->data[skb->len-1]); in check_crc()
131 r = i2c_master_send(client, skb->data, skb->len); in microread_i2c_write()
135 r = i2c_master_send(client, skb->data, skb->len); in microread_i2c_write()
[all …]
/linux-4.1.27/drivers/media/i2c/smiapp/
Dsmiapp-regs.c76 u16 len, u32 *val) in ____smiapp_read() argument
86 msg.len = 2; in ____smiapp_read()
99 msg.len = len; in ____smiapp_read()
110 switch (len) { in ____smiapp_read()
135 u16 len, u32 *val) in ____smiapp_read_8only() argument
142 for (i = 0; i < len; i++) { in ____smiapp_read_8only()
148 *val |= val8 << ((len - i - 1) << 3); in ____smiapp_read_8only()
162 u8 len = SMIAPP_REG_WIDTH(reg); in __smiapp_read() local
165 if (len != SMIAPP_REG_8BIT && len != SMIAPP_REG_16BIT in __smiapp_read()
166 && len != SMIAPP_REG_32BIT) in __smiapp_read()
[all …]
/linux-4.1.27/kernel/printk/
Dprintk.c217 u16 len; /* length of entire record */ member
304 if (!msg->len) in log_from_idx()
320 if (!msg->len) { in log_next()
322 return msg->len; in log_next()
324 return idx + msg->len; in log_next()
457 msg->len = size; in log_store()
460 log_next_idx += msg->len; in log_store()
525 size_t len = iov_iter_count(from); in devkmsg_write() local
526 ssize_t ret = len; in devkmsg_write()
528 if (len > LOG_LINE_MAX) in devkmsg_write()
[all …]
/linux-4.1.27/net/x25/
Dx25_facilities.c50 unsigned int len; in x25_parse_facilities() local
68 len = skb->data[0]; in x25_parse_facilities()
70 if (!pskb_may_pull(skb, 1 + len)) in x25_parse_facilities()
75 while (len > 0) { in x25_parse_facilities()
78 if (len < 2) in x25_parse_facilities()
120 len -= 2; in x25_parse_facilities()
123 if (len < 3) in x25_parse_facilities()
143 len -= 3; in x25_parse_facilities()
146 if (len < 4) in x25_parse_facilities()
152 len -= 4; in x25_parse_facilities()
[all …]
/linux-4.1.27/fs/affs/
Dnamei.c18 unsigned int len, const char *str, const struct qstr *name);
22 unsigned int len, const char *str, const struct qstr *name);
69 u32 len; in __affs_hash_dentry() local
71 retval = affs_check_name(qstr->name, qstr->len, notruncate); in __affs_hash_dentry()
76 len = min(qstr->len, AFFSNAMEMAX); in __affs_hash_dentry()
77 for (; len > 0; name++, len--) in __affs_hash_dentry()
100 static inline int __affs_compare_dentry(unsigned int len, in __affs_compare_dentry() argument
112 if (affs_check_name(name->name, name->len, notruncate)) in __affs_compare_dentry()
119 if (len >= AFFSNAMEMAX) { in __affs_compare_dentry()
120 if (name->len < AFFSNAMEMAX) in __affs_compare_dentry()
[all …]
/linux-4.1.27/drivers/s390/cio/
Dqdio_debug.h34 static inline void DBF_HEX(void *addr, int len) in DBF_HEX() argument
36 while (len > 0) { in DBF_HEX()
37 debug_event(qdio_dbf_setup, DBF_ERR, addr, len); in DBF_HEX()
38 len -= qdio_dbf_setup->buf_size; in DBF_HEX()
50 static inline void DBF_ERROR_HEX(void *addr, int len) in DBF_ERROR_HEX() argument
52 while (len > 0) { in DBF_ERROR_HEX()
53 debug_event(qdio_dbf_error, DBF_ERR, addr, len); in DBF_ERROR_HEX()
54 len -= qdio_dbf_error->buf_size; in DBF_ERROR_HEX()
69 int len, int level) in DBF_DEV_HEX() argument
71 while (len > 0) { in DBF_DEV_HEX()
[all …]
/linux-4.1.27/crypto/
Dalgif_rng.c54 unsigned int len; member
58 static int rng_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, in rng_recvmsg() argument
68 if (len == 0) in rng_recvmsg()
70 if (len > MAXSIZE) in rng_recvmsg()
71 len = MAXSIZE; in rng_recvmsg()
77 memset(result, 0, len); in rng_recvmsg()
85 genlen = crypto_rng_get_bytes(ctx->drng, result, len); in rng_recvmsg()
89 err = memcpy_to_msg(msg, result, len); in rng_recvmsg()
90 memzero_explicit(result, len); in rng_recvmsg()
92 return err ? err : len; in rng_recvmsg()
[all …]
Dxcbc.c57 unsigned int len; member
89 ctx->len = 0; in crypto_xcbc_digest_init()
96 unsigned int len) in crypto_xcbc_digest_update() argument
108 if ((ctx->len + len) <= bs) { in crypto_xcbc_digest_update()
109 memcpy(odds + ctx->len, p, len); in crypto_xcbc_digest_update()
110 ctx->len += len; in crypto_xcbc_digest_update()
115 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_xcbc_digest_update()
116 len -= bs - ctx->len; in crypto_xcbc_digest_update()
117 p += bs - ctx->len; in crypto_xcbc_digest_update()
123 ctx->len = 0; in crypto_xcbc_digest_update()
[all …]
Ddrbg.c314 size_t len = curr->len; in drbg_ctr_bcc() local
316 while (len) { in drbg_ctr_bcc()
327 len--; in drbg_ctr_bcc()
415 inputlen += seed->len; in drbg_ctr_df()
519 unsigned int len = 0; in drbg_ctr_update() local
537 while (len < (drbg_statelen(drbg))) { in drbg_ctr_update()
542 ret = drbg_kcapi_sym(drbg, drbg->C, temp + len, &cipherin); in drbg_ctr_update()
546 len += drbg_blocklen(drbg); in drbg_ctr_update()
552 for (len = 0; len < drbg_statelen(drbg); len++) { in drbg_ctr_update()
579 int len = 0; in drbg_ctr_generate() local
[all …]
Dcmac.c50 unsigned int len; member
115 ctx->len = 0; in crypto_cmac_digest_init()
122 unsigned int len) in crypto_cmac_digest_update() argument
134 if ((ctx->len + len) <= bs) { in crypto_cmac_digest_update()
135 memcpy(odds + ctx->len, p, len); in crypto_cmac_digest_update()
136 ctx->len += len; in crypto_cmac_digest_update()
141 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_cmac_digest_update()
142 len -= bs - ctx->len; in crypto_cmac_digest_update()
143 p += bs - ctx->len; in crypto_cmac_digest_update()
149 ctx->len = 0; in crypto_cmac_digest_update()
[all …]
/linux-4.1.27/security/keys/
Dtrusted.h21 int len; member
25 #define INIT_BUF(tb) (tb->len = 0)
87 int len; in dump_tpm_buf() local
90 len = LOAD32(buf, TPM_SIZE_OFFSET); in dump_tpm_buf()
91 print_hex_dump(KERN_INFO, "", DUMP_PREFIX_NONE, 16, 1, buf, len, 0); in dump_tpm_buf()
113 buf->data[buf->len++] = value; in store8()
118 *(uint16_t *) & buf->data[buf->len] = htons(value); in store16()
119 buf->len += sizeof value; in store16()
124 *(uint32_t *) & buf->data[buf->len] = htonl(value); in store32()
125 buf->len += sizeof value; in store32()
[all …]
/linux-4.1.27/drivers/net/wireless/ti/wlcore/
Dsysfs.c32 ssize_t len; in wl1271_sysfs_show_bt_coex_state() local
34 len = PAGE_SIZE; in wl1271_sysfs_show_bt_coex_state()
37 len = snprintf(buf, len, "%d\n\n0 - off\n1 - on\n", in wl1271_sysfs_show_bt_coex_state()
41 return len; in wl1271_sysfs_show_bt_coex_state()
92 ssize_t len; in wl1271_sysfs_show_hw_pg_ver() local
94 len = PAGE_SIZE; in wl1271_sysfs_show_hw_pg_ver()
98 len = snprintf(buf, len, "%d\n", wl->hw_pg_ver); in wl1271_sysfs_show_hw_pg_ver()
100 len = snprintf(buf, len, "n/a\n"); in wl1271_sysfs_show_hw_pg_ver()
103 return len; in wl1271_sysfs_show_hw_pg_ver()
115 ssize_t len; in wl1271_sysfs_read_fwlog() local
[all …]
/linux-4.1.27/drivers/net/ethernet/cisco/enic/
Denic_res.h44 void *os_buf, dma_addr_t dma_addr, unsigned int len, in enic_queue_wq_desc_ex() argument
56 (u16)len, in enic_queue_wq_desc_ex()
65 vnic_wq_post(wq, os_buf, dma_addr, len, sop, eop, desc_skip_cnt, in enic_queue_wq_desc_ex()
70 void *os_buf, dma_addr_t dma_addr, unsigned int len, in enic_queue_wq_desc_cont() argument
73 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, in enic_queue_wq_desc_cont()
79 dma_addr_t dma_addr, unsigned int len, int vlan_tag_insert, in enic_queue_wq_desc() argument
82 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, in enic_queue_wq_desc()
89 void *os_buf, dma_addr_t dma_addr, unsigned int len, in enic_queue_wq_desc_csum() argument
93 enic_queue_wq_desc_ex(wq, os_buf, dma_addr, len, in enic_queue_wq_desc_csum()
101 void *os_buf, dma_addr_t dma_addr, unsigned int len, in enic_queue_wq_desc_csum_l4() argument
[all …]
/linux-4.1.27/arch/mips/lasat/
Dsysctl.c90 int len; in proc_lasat_ip() local
100 len = 0; in proc_lasat_ip()
102 while (len < *lenp) { in proc_lasat_ip()
107 len++; in proc_lasat_ip()
109 if (len >= sizeof(ipbuf)-1) in proc_lasat_ip()
110 len = sizeof(ipbuf) - 1; in proc_lasat_ip()
111 if (copy_from_user(ipbuf, buffer, len)) in proc_lasat_ip()
113 ipbuf[len] = 0; in proc_lasat_ip()
126 len = strlen(ipbuf); in proc_lasat_ip()
127 if (len > *lenp) in proc_lasat_ip()
[all …]
/linux-4.1.27/drivers/vhost/
Dvringh.c73 void *ptr, size_t len, in vringh_iov_xfer() argument
75 size_t len)) in vringh_iov_xfer()
79 while (len && iov->i < iov->used) { in vringh_iov_xfer()
82 partlen = min(iov->iov[iov->i].iov_len, len); in vringh_iov_xfer()
87 len -= partlen; in vringh_iov_xfer()
106 static inline bool range_check(struct vringh *vrh, u64 addr, size_t *len, in range_check() argument
118 if (unlikely(addr + *len == 0)) { in range_check()
125 if (addr + *len < addr) { in range_check()
127 *len, (unsigned long long)addr); in range_check()
131 if (unlikely(addr + *len - 1 > range->end_incl)) in range_check()
[all …]
/linux-4.1.27/arch/sh/kernel/
Dsys_sh.c31 asmlinkage int old_mmap(unsigned long addr, unsigned long len, in old_mmap() argument
37 return sys_mmap_pgoff(addr, len, prot, flags, fd, off>>PAGE_SHIFT); in old_mmap()
40 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, in sys_mmap2() argument
53 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); in sys_mmap2()
57 asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op) in sys_cacheflush() argument
68 if (addr + len < addr) in sys_cacheflush()
73 if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end) { in sys_cacheflush()
80 __flush_invalidate_region((void *)addr, len); in sys_cacheflush()
83 __flush_wback_region((void *)addr, len); in sys_cacheflush()
86 __flush_purge_region((void *)addr, len); in sys_cacheflush()
[all …]
/linux-4.1.27/arch/mn10300/include/asm/
Dchecksum.h14 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, in csum_tcpudp_nofold() argument
48 tmp = (__wsum) ntohs(len) << 16; in csum_tcpudp_nofold()
69 unsigned short len, in csum_tcpudp_magic() argument
73 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
[all …]
/linux-4.1.27/tools/perf/ui/tui/
Dutil.c75 int x, y, len, key; in ui_browser__input_window() local
86 len = sep - t; in ui_browser__input_window()
87 if (max_len < len) in ui_browser__input_window()
88 max_len = len; in ui_browser__input_window()
114 len = 5; in ui_browser__input_window()
115 while (len--) { in ui_browser__input_window()
116 SLsmg_gotorc(y + len - 1, x); in ui_browser__input_window()
128 len = 0; in ui_browser__input_window()
134 if (len == 0) { in ui_browser__input_window()
138 SLsmg_gotorc(y, x + --len); in ui_browser__input_window()
[all …]
/linux-4.1.27/arch/metag/mm/
Dhugetlbpage.c31 unsigned long len) in prepare_hugepage_range() argument
37 if (len & ~huge_page_mask(h)) in prepare_hugepage_range()
41 if (TASK_SIZE - len < addr) in prepare_hugepage_range()
50 if (addr + len > vma->vm_start) in prepare_hugepage_range()
53 (ALIGN_HUGEPT(addr + len) > vma->vm_start)) in prepare_hugepage_range()
122 hugetlb_get_unmapped_area_existing(unsigned long len) in hugetlb_get_unmapped_area_existing() argument
128 hugetlb_get_unmapped_area_existing(unsigned long len) in hugetlb_get_unmapped_area_existing() argument
146 if ((!vma && !after_huge) || TASK_SIZE - len < addr) { in hugetlb_get_unmapped_area_existing()
161 if (after_huge && (!vma || ALIGN_HUGEPT(addr + len) in hugetlb_get_unmapped_area_existing()
163 unsigned long end = addr + len; in hugetlb_get_unmapped_area_existing()
[all …]
/linux-4.1.27/include/linux/mtd/
Dmtd.h48 uint64_t len; member
88 size_t len; member
190 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len,
192 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len);
194 unsigned long len,
197 int (*_read) (struct mtd_info *mtd, loff_t from, size_t len,
199 int (*_write) (struct mtd_info *mtd, loff_t to, size_t len,
201 int (*_panic_write) (struct mtd_info *mtd, loff_t to, size_t len,
207 int (*_get_fact_prot_info) (struct mtd_info *mtd, size_t len,
210 size_t len, size_t *retlen, u_char *buf);
[all …]
/linux-4.1.27/tools/lib/symbol/
Dkallsyms.c21 int line_len, len; in kallsyms__parse() local
31 len = hex2u64(line, &start); in kallsyms__parse()
33 len++; in kallsyms__parse()
34 if (len + 2 >= line_len) in kallsyms__parse()
37 symbol_type = line[len]; in kallsyms__parse()
38 len += 2; in kallsyms__parse()
39 symbol_name = line + len; in kallsyms__parse()
40 len = line_len - len; in kallsyms__parse()
42 if (len >= KSYM_NAME_LEN) { in kallsyms__parse()
/linux-4.1.27/drivers/usb/host/
Duhci-debug.c43 int len, int space) in uhci_show_td() argument
65 if (out - buf > len) in uhci_show_td()
94 if (out - buf > len) in uhci_show_td()
100 char *buf, int len, int space) in uhci_show_urbp() argument
114 if (out - buf > len) in uhci_show_urbp()
134 if (out - buf > len) in uhci_show_urbp()
143 len - (out - buf), 0); in uhci_show_urbp()
144 if (out - buf > len) in uhci_show_urbp()
158 if (out - buf > len) in uhci_show_urbp()
165 struct uhci_qh *qh, char *buf, int len, int space) in uhci_show_qh() argument
[all …]
/linux-4.1.27/fs/f2fs/
Dhash.c45 static void str2hashbuf(const unsigned char *msg, size_t len, in str2hashbuf() argument
51 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf()
55 if (len > num * 4) in str2hashbuf()
56 len = num * 4; in str2hashbuf()
57 for (i = 0; i < len; i++) { in str2hashbuf()
80 size_t len = name_info->len; in f2fs_dentry_hash() local
82 if ((len <= 2) && (name[0] == '.') && in f2fs_dentry_hash()
94 str2hashbuf(p, len, in, 4); in f2fs_dentry_hash()
97 if (len <= 16) in f2fs_dentry_hash()
99 len -= 16; in f2fs_dentry_hash()
/linux-4.1.27/net/bridge/
Dbr_sysfs_br.c32 const char *buf, size_t len, in store_bridge_parm() argument
48 return err ? err : len; in store_bridge_parm()
61 const char *buf, size_t len) in forward_delay_store() argument
63 return store_bridge_parm(d, buf, len, br_set_forward_delay); in forward_delay_store()
76 size_t len) in hello_time_store() argument
78 return store_bridge_parm(d, buf, len, br_set_hello_time); in hello_time_store()
90 const char *buf, size_t len) in max_age_store() argument
92 return store_bridge_parm(d, buf, len, br_set_max_age); in max_age_store()
111 const char *buf, size_t len) in ageing_time_store() argument
113 return store_bridge_parm(d, buf, len, set_ageing_time); in ageing_time_store()
[all …]
/linux-4.1.27/arch/x86/um/asm/
Dchecksum.h19 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
31 int len, __wsum sum) in csum_partial_copy_nocheck() argument
33 memcpy(dst, src, len); in csum_partial_copy_nocheck()
34 return csum_partial(dst, len, sum); in csum_partial_copy_nocheck()
47 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
49 if (copy_from_user(dst, src, len)) { in csum_partial_copy_from_user()
54 return csum_partial(dst, len, sum); in csum_partial_copy_from_user()
89 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, in csum_tcpudp_nofold() argument
97 : "g" (daddr), "g" (saddr), "g" ((len + proto) << 8), "0" (sum)); in csum_tcpudp_nofold()
106 unsigned short len, in csum_tcpudp_magic() argument
[all …]
/linux-4.1.27/drivers/media/usb/usbvision/
Dusbvision-i2c.c52 short len);
54 short len);
150 ret = (usbvision_i2c_read(usbvision, addr, pmsg->buf, pmsg->len)); in usbvision_i2c_xfer()
151 if (ret < pmsg->len) in usbvision_i2c_xfer()
155 ret = (usbvision_i2c_write(usbvision, addr, pmsg->buf, pmsg->len)); in usbvision_i2c_xfer()
156 if (ret < pmsg->len) in usbvision_i2c_xfer()
277 char *buf, short len) in usbvision_i2c_read_max4() argument
290 (len & 0x07) | 0x18); in usbvision_i2c_read_max4()
315 switch (len) { in usbvision_i2c_read_max4()
333 for (idx = 0; idx < len; idx++) in usbvision_i2c_read_max4()
[all …]
/linux-4.1.27/drivers/staging/gdm72xx/
Dnetlink_k.c29 #define ND_NLMSG_SPACE(len) (nlmsg_total_size(len) + ND_IFINDEX_LEN) argument
32 #define ND_NLMSG_S_LEN(len) (len+ND_IFINDEX_LEN) argument
45 static void (*rcv_cb)(struct net_device *dev, u16 type, void *msg, int len);
55 if (skb->len >= NLMSG_HDRLEN) { in netlink_rcv_cb()
58 if (skb->len < nlh->nlmsg_len || in netlink_rcv_cb()
61 skb->len, nlh->nlmsg_len); in netlink_rcv_cb()
92 void *msg, int len)) in netlink_init() argument
116 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) in netlink_send() argument
129 skb = nlmsg_new(len, GFP_ATOMIC); in netlink_send()
136 nlh = nlmsg_put(skb, 0, seq, type, len, 0); in netlink_send()
[all …]
/linux-4.1.27/drivers/staging/gdm724x/
Dnetlink_k.c34 #define ND_NLMSG_SPACE(len) (NLMSG_SPACE(len) + ND_IFINDEX_LEN) argument
37 #define ND_NLMSG_S_LEN(len) (len+ND_IFINDEX_LEN) argument
42 static void (*rcv_cb)(struct net_device *dev, u16 type, void *msg, int len);
57 if (skb->len < NLMSG_HDRLEN) { in netlink_rcv_cb()
64 if (skb->len < nlh->nlmsg_len || nlh->nlmsg_len > ND_MAX_MSG_LEN) { in netlink_rcv_cb()
66 skb->len, nlh->nlmsg_len); in netlink_rcv_cb()
91 void (*cb)(struct net_device *dev, u16 type, void *msg, int len)) in netlink_init() argument
115 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) in netlink_send() argument
128 skb = alloc_skb(NLMSG_SPACE(len), GFP_ATOMIC); in netlink_send()
134 nlh = nlmsg_put(skb, 0, seq, type, len, 0); in netlink_send()
[all …]
/linux-4.1.27/arch/arm/mach-davinci/
Dsram.c26 void *sram_alloc(size_t len, dma_addr_t *dma) in sram_alloc() argument
35 return gen_pool_dma_alloc(sram_pool, len, dma); in sram_alloc()
40 void sram_free(void *addr, size_t len) in sram_free() argument
42 gen_pool_free(sram_pool, (unsigned long) addr, len); in sram_free()
56 unsigned len = davinci_soc_info.sram_len; in sram_init() local
60 if (len) { in sram_init()
61 len = min_t(unsigned, len, SRAM_SIZE); in sram_init()
68 addr = ioremap(phys, len); in sram_init()
72 phys, len, -1); in sram_init()
/linux-4.1.27/scripts/dtc/libfdt/
Dfdt_ro.c59 const char *s, int len) in _fdt_nodename_eq() argument
61 const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1); in _fdt_nodename_eq()
67 if (memcmp(p, s, len) != 0) in _fdt_nodename_eq()
70 if (p[len] == '\0') in _fdt_nodename_eq()
72 else if (!memchr(s, '@', len) && (p[len] == '@')) in _fdt_nodename_eq()
84 const char *s, int len) in _fdt_string_eq() argument
88 return (strlen(p) == len) && (memcmp(p, s, len) == 0); in _fdt_string_eq()
201 const char *fdt_get_name(const void *fdt, int nodeoffset, int *len) in fdt_get_name() argument
210 if (len) in fdt_get_name()
211 *len = strlen(nh->name); in fdt_get_name()
[all …]
/linux-4.1.27/arch/m32r/include/asm/
Dchecksum.h34 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
43 int len, __wsum sum);
50 int len, __wsum sum,
117 unsigned short len, in csum_tcpudp_nofold() argument
122 unsigned long len_proto = (proto + len) << 8; in csum_tcpudp_nofold()
124 unsigned long len_proto = proto + len; in csum_tcpudp_nofold()
148 unsigned short len, in csum_tcpudp_magic() argument
152 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic()
160 static inline __sum16 ip_compute_csum(const void *buff, int len) in ip_compute_csum() argument
162 return csum_fold (csum_partial(buff, len, 0)); in ip_compute_csum()
[all …]
/linux-4.1.27/arch/arm/include/asm/
Dchecksum.h26 __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, in csum_tcpudp_nofold() argument
90 u32 lenprot = len | proto << 16; in csum_tcpudp_nofold()
124 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, in csum_tcpudp_magic() argument
127 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
136 ip_compute_csum(const void *buff, int len) in ip_compute_csum() argument
138 return csum_fold(csum_partial(buff, len, 0)); in ip_compute_csum()
143 __csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __be32 len,
[all …]
/linux-4.1.27/scripts/mod/
Dsumversion.c170 const unsigned char *data, unsigned int len) in md4_update() argument
174 mctx->byte_count += len; in md4_update()
176 if (avail > len) { in md4_update()
178 data, len); in md4_update()
187 len -= avail; in md4_update()
189 while (len >= sizeof(mctx->block)) { in md4_update()
193 len -= sizeof(mctx->block); in md4_update()
196 memcpy(mctx->block, data, len); in md4_update()
199 static void md4_final_ascii(struct md4_ctx *mctx, char *out, unsigned int len) in md4_final_ascii() argument
221 snprintf(out, len, "%08X%08X%08X%08X", in md4_final_ascii()
[all …]
/linux-4.1.27/drivers/staging/rtl8712/
Dusb_ops.c43 u16 len; in usb_read8() local
51 len = 1; in usb_read8()
52 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, in usb_read8()
63 u16 len; in usb_read16() local
71 len = 2; in usb_read16()
72 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, in usb_read16()
83 u16 len; in usb_read32() local
91 len = 4; in usb_read32()
92 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, in usb_read32()
103 u16 len; in usb_write8() local
[all …]
/linux-4.1.27/net/ipv4/netfilter/
Dnf_nat_snmp_basic.c149 unsigned int len; member
154 unsigned int len) in asn1_open() argument
157 ctx->end = buf + len; in asn1_open()
211 unsigned int *len) in asn1_length_decode() argument
224 *len = ch; in asn1_length_decode()
227 *len = 0; in asn1_length_decode()
232 *len <<= 8; in asn1_length_decode()
233 *len |= ch; in asn1_length_decode()
240 if (*len > ctx->end - ctx->pointer) in asn1_length_decode()
252 unsigned int def, len; in asn1_header_decode() local
[all …]

12345678910>>...38