Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 4716) sorted by relevance

12345678910>>...189

/kernel/linux/linux-5.10/Documentation/target/
Dtcm_mod_builder.py41 buf = ""
50 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
51 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
52 buf += "\n"
53 buf += "struct " + fabric_mod_name + "_tpg {\n"
54 buf += " /* FC lport target portal group tag for TCM */\n"
55 buf += " u16 lport_tpgt;\n"
56 buf += " /* Pointer back to " + fabric_mod_name + "_lport */\n"
57 buf += " struct " + fabric_mod_name + "_lport *lport;\n"
58 buf += " /* Returned by " + fabric_mod_name + "_make_tpg() */\n"
[all …]
/kernel/linux/linux-5.10/drivers/media/dvb-frontends/
Dnxt200x.c58 static int i2c_writebytes (struct nxt200x_state* state, u8 addr, u8 *buf, u8 len) in i2c_writebytes() argument
61 struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = len }; in i2c_writebytes()
71 static int i2c_readbytes(struct nxt200x_state *state, u8 addr, u8 *buf, u8 len) in i2c_readbytes() argument
74 struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, .buf = buf, .len = len }; in i2c_readbytes()
85 const u8 *buf, u8 len) in nxt200x_writebytes() argument
89 …struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf2, .len = len +… in nxt200x_writebytes()
98 memcpy(&buf2[1], buf, len); in nxt200x_writebytes()
108 static int nxt200x_readbytes(struct nxt200x_state *state, u8 reg, u8 *buf, u8 len) in nxt200x_readbytes() argument
112 …struct i2c_msg msg [] = { { .addr = state->config->demod_address, .flags = 0, .buf = reg2, .len = … in nxt200x_readbytes()
113 { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = buf, .len = len } }; in nxt200x_readbytes()
[all …]
/kernel/linux/linux-5.10/sound/firewire/bebob/
Dbebob_command.c13 u8 *buf; in avc_audio_set_selector() local
16 buf = kzalloc(12, GFP_KERNEL); in avc_audio_set_selector()
17 if (buf == NULL) in avc_audio_set_selector()
20 buf[0] = 0x00; /* AV/C CONTROL */ in avc_audio_set_selector()
21 buf[1] = 0x08 | (0x07 & subunit_id); /* AUDIO SUBUNIT ID */ in avc_audio_set_selector()
22 buf[2] = 0xb8; /* FUNCTION BLOCK */ in avc_audio_set_selector()
23 buf[3] = 0x80; /* type is 'selector'*/ in avc_audio_set_selector()
24 buf[4] = 0xff & fb_id; /* function block id */ in avc_audio_set_selector()
25 buf[5] = 0x10; /* control attribute is CURRENT */ in avc_audio_set_selector()
26 buf[6] = 0x02; /* selector length is 2 */ in avc_audio_set_selector()
[all …]
/kernel/linux/linux-5.10/drivers/media/common/videobuf2/
Dvideobuf2-dma-sg.c58 static int vb2_dma_sg_alloc_compacted(struct vb2_dma_sg_buf *buf, in vb2_dma_sg_alloc_compacted() argument
62 unsigned long size = buf->size; in vb2_dma_sg_alloc_compacted()
83 __free_page(buf->pages[last_page]); in vb2_dma_sg_alloc_compacted()
91 buf->pages[last_page++] = &pages[i]; in vb2_dma_sg_alloc_compacted()
103 struct vb2_dma_sg_buf *buf; in vb2_dma_sg_alloc() local
111 buf = kzalloc(sizeof *buf, GFP_KERNEL); in vb2_dma_sg_alloc()
112 if (!buf) in vb2_dma_sg_alloc()
115 buf->vaddr = NULL; in vb2_dma_sg_alloc()
116 buf->dma_dir = dma_dir; in vb2_dma_sg_alloc()
117 buf->offset = 0; in vb2_dma_sg_alloc()
[all …]
Dvideobuf2-dma-contig.c71 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_cookie() local
73 return &buf->dma_addr; in vb2_dc_cookie()
78 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_vaddr() local
80 if (!buf->vaddr && buf->db_attach) in vb2_dc_vaddr()
81 buf->vaddr = dma_buf_vmap(buf->db_attach->dmabuf); in vb2_dc_vaddr()
83 return buf->vaddr; in vb2_dc_vaddr()
88 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_num_users() local
90 return refcount_read(&buf->refcount); in vb2_dc_num_users()
95 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_prepare() local
96 struct sg_table *sgt = buf->dma_sgt; in vb2_dc_prepare()
[all …]
Dvideobuf2-vmalloc.c41 struct vb2_vmalloc_buf *buf; in vb2_vmalloc_alloc() local
43 buf = kzalloc(sizeof(*buf), GFP_KERNEL | gfp_flags); in vb2_vmalloc_alloc()
44 if (!buf) in vb2_vmalloc_alloc()
47 buf->size = size; in vb2_vmalloc_alloc()
48 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc()
49 if (!buf->vaddr) { in vb2_vmalloc_alloc()
50 pr_debug("vmalloc of size %ld failed\n", buf->size); in vb2_vmalloc_alloc()
51 kfree(buf); in vb2_vmalloc_alloc()
55 buf->dma_dir = dma_dir; in vb2_vmalloc_alloc()
56 buf->handler.refcount = &buf->refcount; in vb2_vmalloc_alloc()
[all …]
/kernel/linux/linux-5.10/sound/firewire/oxfw/
Doxfw-command.c13 u8 *buf; in avc_stream_set_format() local
16 buf = kmalloc(len + 10, GFP_KERNEL); in avc_stream_set_format()
17 if (buf == NULL) in avc_stream_set_format()
20 buf[0] = 0x00; /* CONTROL */ in avc_stream_set_format()
21 buf[1] = 0xff; /* UNIT */ in avc_stream_set_format()
22 buf[2] = 0xbf; /* EXTENDED STREAM FORMAT INFORMATION */ in avc_stream_set_format()
23 buf[3] = 0xc0; /* SINGLE subfunction */ in avc_stream_set_format()
24 buf[4] = dir; /* Plug Direction */ in avc_stream_set_format()
25 buf[5] = 0x00; /* UNIT */ in avc_stream_set_format()
26 buf[6] = 0x00; /* PCR (Isochronous Plug) */ in avc_stream_set_format()
[all …]
/kernel/linux/linux-5.10/drivers/xen/
Dxen-front-pgdir-shbuf.c56 void (*calc_num_grefs)(struct xen_front_pgdir_shbuf *buf);
59 void (*fill_page_dir)(struct xen_front_pgdir_shbuf *buf);
62 int (*grant_refs_for_buffer)(struct xen_front_pgdir_shbuf *buf,
66 int (*map)(struct xen_front_pgdir_shbuf *buf);
69 int (*unmap)(struct xen_front_pgdir_shbuf *buf);
83 xen_front_pgdir_shbuf_get_dir_start(struct xen_front_pgdir_shbuf *buf) in xen_front_pgdir_shbuf_get_dir_start() argument
85 if (!buf->grefs) in xen_front_pgdir_shbuf_get_dir_start()
88 return buf->grefs[0]; in xen_front_pgdir_shbuf_get_dir_start()
103 int xen_front_pgdir_shbuf_map(struct xen_front_pgdir_shbuf *buf) in xen_front_pgdir_shbuf_map() argument
105 if (buf->ops && buf->ops->map) in xen_front_pgdir_shbuf_map()
[all …]
/kernel/linux/linux-5.10/kernel/
Drelay.c35 struct rchan_buf *buf = vma->vm_private_data; in relay_file_mmap_close() local
36 buf->chan->cb->buf_unmapped(buf, vma->vm_file); in relay_file_mmap_close()
45 struct rchan_buf *buf = vmf->vma->vm_private_data; in relay_buf_fault() local
48 if (!buf) in relay_buf_fault()
51 page = vmalloc_to_page(buf->start + (pgoff << PAGE_SHIFT)); in relay_buf_fault()
96 static int relay_mmap_buf(struct rchan_buf *buf, struct vm_area_struct *vma) in relay_mmap_buf() argument
101 if (!buf) in relay_mmap_buf()
104 if (length != (unsigned long)buf->chan->alloc_size) in relay_mmap_buf()
109 vma->vm_private_data = buf; in relay_mmap_buf()
110 buf->chan->cb->buf_mapped(buf, filp); in relay_mmap_buf()
[all …]
/kernel/linux/linux-5.10/drivers/media/pci/saa7164/
Dsaa7164-buffer.c55 void saa7164_buffer_display(struct saa7164_buffer *buf) in saa7164_buffer_display() argument
57 struct saa7164_dev *dev = buf->port->dev; in saa7164_buffer_display()
61 __func__, buf, buf->idx); in saa7164_buffer_display()
63 buf->cpu, (long long)buf->dma, buf->pci_size); in saa7164_buffer_display()
65 buf->pt_cpu, (long long)buf->pt_dma, buf->pt_size); in saa7164_buffer_display()
71 i, buf->pt_cpu, (u64)*(buf->pt_cpu)); in saa7164_buffer_display()
82 struct saa7164_buffer *buf = NULL; in saa7164_buffer_alloc() local
91 buf = kzalloc(sizeof(*buf), GFP_KERNEL); in saa7164_buffer_alloc()
92 if (!buf) in saa7164_buffer_alloc()
95 buf->idx = -1; in saa7164_buffer_alloc()
[all …]
/kernel/linux/linux-5.10/arch/mips/mm/
Dpage.c104 pg_addiu(u32 **buf, unsigned int reg1, unsigned int reg2, unsigned int off) in pg_addiu() argument
108 uasm_i_lui(buf, T9, uasm_rel_hi(off)); in pg_addiu()
109 uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off)); in pg_addiu()
111 uasm_i_addiu(buf, T9, ZERO, off); in pg_addiu()
112 uasm_i_daddu(buf, reg1, reg2, T9); in pg_addiu()
115 uasm_i_lui(buf, T9, uasm_rel_hi(off)); in pg_addiu()
116 uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off)); in pg_addiu()
117 UASM_i_ADDU(buf, reg1, reg2, T9); in pg_addiu()
119 UASM_i_ADDIU(buf, reg1, reg2, off); in pg_addiu()
232 static void build_clear_store(u32 **buf, int off) in build_clear_store() argument
[all …]
/kernel/liteos_a/apps/lms/src/
Dsample_usr_lms.c36 static void BufWriteTest(void *buf, int start, int end) in BufWriteTest() argument
39 ((char *)buf)[i] = 'a'; in BufWriteTest()
43 static void BufReadTest(void *buf, int start, int end) in BufReadTest() argument
47 tmp = ((char *)buf)[i]; in BufReadTest()
55 char *buf = (char *)malloc(TEST_SIZE); in LmsMallocTest() local
56 if (buf == NULL) { in LmsMallocTest()
60 BufReadTest(buf, -1, TEST_SIZE); in LmsMallocTest()
62 BufWriteTest(buf, 0, TEST_SIZE); in LmsMallocTest()
64 free(buf); in LmsMallocTest()
73 char *buf = (char *)malloc(TEST_SIZE); in LmsReallocTest() local
[all …]
/kernel/linux/linux-5.10/drivers/media/usb/dvb-usb-v2/
Dmxl111sf-i2c.c247 &msg->buf[i]); in mxl111sf_i2c_sw_xfer_msg()
278 msg->buf[i]); in mxl111sf_i2c_sw_xfer_msg()
330 u8 buf[26]; in mxl111sf_i2c_check_status() local
334 buf[0] = USB_READ_I2C_CMD; in mxl111sf_i2c_check_status()
335 buf[1] = 0x00; in mxl111sf_i2c_check_status()
337 buf[2] = I2C_INT_STATUS_REG; in mxl111sf_i2c_check_status()
338 buf[3] = 0x00; in mxl111sf_i2c_check_status()
339 buf[4] = 0x00; in mxl111sf_i2c_check_status()
341 buf[5] = USB_END_I2C_CMD; in mxl111sf_i2c_check_status()
343 mxl111sf_i2c_get_data(state, 0, buf, buf); in mxl111sf_i2c_check_status()
[all …]
/kernel/linux/linux-5.10/drivers/tty/
Dtty_audit.c24 struct tty_audit_buf *buf; in tty_audit_buf_ref() local
26 buf = current->signal->tty_audit_buf; in tty_audit_buf_ref()
27 WARN_ON(buf == ERR_PTR(-ESRCH)); in tty_audit_buf_ref()
28 return buf; in tty_audit_buf_ref()
33 struct tty_audit_buf *buf; in tty_audit_buf_alloc() local
35 buf = kmalloc(sizeof(*buf), GFP_KERNEL); in tty_audit_buf_alloc()
36 if (!buf) in tty_audit_buf_alloc()
38 buf->data = kmalloc(N_TTY_BUF_SIZE, GFP_KERNEL); in tty_audit_buf_alloc()
39 if (!buf->data) in tty_audit_buf_alloc()
41 mutex_init(&buf->mutex); in tty_audit_buf_alloc()
[all …]
/kernel/linux/linux-5.10/tools/perf/util/arm-spe-decoder/
Darm-spe-pkt-decoder.c85 static int arm_spe_get_payload(const unsigned char *buf, size_t len, in arm_spe_get_payload() argument
88 size_t payload_len = payloadlen(buf[0]); in arm_spe_get_payload()
93 buf++; in arm_spe_get_payload()
96 case 1: packet->payload = *(uint8_t *)buf; break; in arm_spe_get_payload()
97 case 2: packet->payload = le16_to_cpu(*(uint16_t *)buf); break; in arm_spe_get_payload()
98 case 4: packet->payload = le32_to_cpu(*(uint32_t *)buf); break; in arm_spe_get_payload()
99 case 8: packet->payload = le64_to_cpu(*(uint64_t *)buf); break; in arm_spe_get_payload()
112 static int arm_spe_get_alignment(const unsigned char *buf, size_t len, in arm_spe_get_alignment() argument
115 unsigned int alignment = 1 << ((buf[0] & 0xf) + 1); in arm_spe_get_alignment()
121 return alignment - (((uintptr_t)buf) & (alignment - 1)); in arm_spe_get_alignment()
[all …]
/kernel/linux/linux-5.10/net/bridge/
Dbr_stp_bpdu.c81 unsigned char buf[35]; in br_send_config_bpdu() local
86 buf[0] = 0; in br_send_config_bpdu()
87 buf[1] = 0; in br_send_config_bpdu()
88 buf[2] = 0; in br_send_config_bpdu()
89 buf[3] = BPDU_TYPE_CONFIG; in br_send_config_bpdu()
90 buf[4] = (bpdu->topology_change ? 0x01 : 0) | in br_send_config_bpdu()
92 buf[5] = bpdu->root.prio[0]; in br_send_config_bpdu()
93 buf[6] = bpdu->root.prio[1]; in br_send_config_bpdu()
94 buf[7] = bpdu->root.addr[0]; in br_send_config_bpdu()
95 buf[8] = bpdu->root.addr[1]; in br_send_config_bpdu()
[all …]
/kernel/linux/linux-5.10/drivers/net/wireless/ath/ath5k/
Ddebug.c179 char buf[500]; in read_file_beacon() local
185 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
190 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n", in read_file_beacon()
193 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n\n", in read_file_beacon()
197 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
201 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
205 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
209 len += scnprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
213 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
217 if (len > sizeof(buf)) in read_file_beacon()
[all …]
/kernel/linux/linux-5.10/drivers/net/wireless/ath/ath11k/
Ddebugfs_htt_stats.c13 #define HTT_DBG_OUT(buf, len, fmt, ...) \ argument
14 scnprintf(buf, len, fmt "\n", ##__VA_ARGS__)
37 u8 *buf = stats_req->buf; in htt_print_stats_string_tlv() local
46 len += HTT_DBG_OUT(buf + len, buf_len - len, "HTT_STATS_STRING_TLV:"); in htt_print_stats_string_tlv()
56 len += HTT_DBG_OUT(buf + len, buf_len - len, "data = %s\n", data); in htt_print_stats_string_tlv()
59 buf[buf_len - 1] = 0; in htt_print_stats_string_tlv()
61 buf[len] = 0; in htt_print_stats_string_tlv()
70 u8 *buf = stats_req->buf; in htt_print_tx_pdev_stats_cmn_tlv() local
74 len += HTT_DBG_OUT(buf + len, buf_len - len, "HTT_TX_PDEV_STATS_CMN_TLV:"); in htt_print_tx_pdev_stats_cmn_tlv()
75 len += HTT_DBG_OUT(buf + len, buf_len - len, "mac_id = %u", in htt_print_tx_pdev_stats_cmn_tlv()
[all …]
/kernel/linux/linux-5.10/drivers/media/tuners/
Dmt20xx.c103 unsigned char *buf, in mt2032_compute_freq() argument
162 buf[0]=lo1n-1; in mt2032_compute_freq()
163 buf[1]=lo1a | (sel<<4); in mt2032_compute_freq()
164 buf[2]=0x86; // LOGC in mt2032_compute_freq()
165 buf[3]=0x0f; //reserved in mt2032_compute_freq()
166 buf[4]=0x1f; in mt2032_compute_freq()
167 buf[5]=(lo2n-1) | (lo2a<<5); in mt2032_compute_freq()
169 buf[6]=0xe4; in mt2032_compute_freq()
171 buf[6]=0xf4; // set PKEN per rev 1.2 in mt2032_compute_freq()
172 buf[7]=8+xogc; in mt2032_compute_freq()
[all …]
/kernel/linux/linux-5.10/drivers/net/wireless/st/cw1200/
Dwsm.c27 #define WSM_SKIP(buf, size) \ argument
29 if ((buf)->data + size > (buf)->end) \
31 (buf)->data += size; \
34 #define WSM_GET(buf, ptr, size) \ argument
36 if ((buf)->data + size > (buf)->end) \
38 memcpy(ptr, (buf)->data, size); \
39 (buf)->data += size; \
42 #define __WSM_GET(buf, type, type2, cvt) \ argument
45 if ((buf)->data + sizeof(type) > (buf)->end) \
47 val = cvt(*(type2 *)(buf)->data); \
[all …]
/kernel/linux/linux-5.10/fs/
Dstatfs.c55 static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) in statfs_by_dentry() argument
62 memset(buf, 0, sizeof(*buf)); in statfs_by_dentry()
66 retval = dentry->d_sb->s_op->statfs(dentry, buf); in statfs_by_dentry()
67 if (retval == 0 && buf->f_frsize == 0) in statfs_by_dentry()
68 buf->f_frsize = buf->f_bsize; in statfs_by_dentry()
86 int vfs_statfs(const struct path *path, struct kstatfs *buf) in vfs_statfs() argument
90 error = statfs_by_dentry(path->dentry, buf); in vfs_statfs()
92 buf->f_flags = calculate_f_flags(path->mnt); in vfs_statfs()
128 struct statfs buf; in do_statfs_native() local
130 if (sizeof(buf) == sizeof(*st)) in do_statfs_native()
[all …]
/kernel/linux/linux-5.10/drivers/ata/
Dsata_promise.h30 unsigned int devno, u8 *buf) in pdc_pkt_header() argument
33 __le32 *buf32 = (__le32 *) buf; in pdc_pkt_header()
64 buf[12] = (1 << 5) | PDC_PKT_CLEAR_BSY | ATA_REG_DEVICE; in pdc_pkt_header()
65 buf[13] = dev_reg; in pdc_pkt_header()
68 buf[14] = (1 << 5) | PDC_REG_DEVCTL; in pdc_pkt_header()
69 buf[15] = tf->ctl; in pdc_pkt_header()
74 static inline unsigned int pdc_pkt_footer(struct ata_taskfile *tf, u8 *buf, in pdc_pkt_footer() argument
78 buf[i++] = (1 << 5) | ATA_REG_DEVICE; in pdc_pkt_footer()
79 buf[i++] = tf->device; in pdc_pkt_footer()
83 buf[i++] = (1 << 5) | PDC_LAST_REG | ATA_REG_CMD; in pdc_pkt_footer()
[all …]
/kernel/linux/linux-5.10/tools/perf/util/intel-pt-decoder/
Dintel-pt-pkt-decoder.c76 static int intel_pt_get_long_tnt(const unsigned char *buf, size_t len, in intel_pt_get_long_tnt() argument
85 payload = le64_to_cpu(*(uint64_t *)buf); in intel_pt_get_long_tnt()
99 static int intel_pt_get_pip(const unsigned char *buf, size_t len, in intel_pt_get_pip() argument
108 memcpy_le64(&payload, buf + 2, 6); in intel_pt_get_pip()
122 static int intel_pt_get_cbr(const unsigned char *buf, size_t len, in intel_pt_get_cbr() argument
128 packet->payload = le16_to_cpu(*(uint16_t *)(buf + 2)); in intel_pt_get_cbr()
132 static int intel_pt_get_vmcs(const unsigned char *buf, size_t len, in intel_pt_get_vmcs() argument
145 memcpy_le64(&packet->payload, buf + 2, count); in intel_pt_get_vmcs()
156 static int intel_pt_get_psb(const unsigned char *buf, size_t len, in intel_pt_get_psb() argument
165 if (buf[i] != 2 || buf[i + 1] != 0x82) in intel_pt_get_psb()
[all …]
/kernel/linux/linux-5.10/drivers/target/
Dtarget_core_spc.c28 static void spc_fill_alua_data(struct se_lun *lun, unsigned char *buf) in spc_fill_alua_data() argument
35 buf[5] = 0x80; in spc_fill_alua_data()
46 buf[5] |= tg_pt_gp->tg_pt_gp_alua_access_type; in spc_fill_alua_data()
51 spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_inquiry_std() argument
59 buf[1] = 0x80; in spc_emulate_inquiry_std()
61 buf[2] = 0x05; /* SPC-3 */ in spc_emulate_inquiry_std()
73 buf[3] = 2; in spc_emulate_inquiry_std()
78 spc_fill_alua_data(lun, buf); in spc_emulate_inquiry_std()
84 buf[5] |= 0x8; in spc_emulate_inquiry_std()
93 buf[5] |= 0x1; in spc_emulate_inquiry_std()
[all …]
/kernel/linux/linux-5.10/lib/
Dvsprintf.c214 char *put_dec_trunc8(char *buf, unsigned r) in put_dec_trunc8() argument
224 *((u16 *)buf) = decpair[r - 100*q]; in put_dec_trunc8()
225 buf += 2; in put_dec_trunc8()
233 *((u16 *)buf) = decpair[q - 100*r]; in put_dec_trunc8()
234 buf += 2; in put_dec_trunc8()
242 *((u16 *)buf) = decpair[r - 100*q]; in put_dec_trunc8()
243 buf += 2; in put_dec_trunc8()
249 *((u16 *)buf) = decpair[r]; in put_dec_trunc8()
250 buf += r < 10 ? 1 : 2; in put_dec_trunc8()
251 return buf; in put_dec_trunc8()
[all …]

12345678910>>...189