/openbmc/linux/drivers/media/dvb-frontends/ |
H A D | nxt200x.c | 58 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 …]
|
/openbmc/linux/sound/firewire/bebob/ |
H A D | bebob_command.c | 13 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 …]
|
/openbmc/linux/drivers/media/common/videobuf2/ |
H A D | videobuf2-dma-contig.c | 75 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_cookie() local 77 return &buf->dma_addr; in vb2_dc_cookie() 96 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_vaddr() local 98 if (buf->vaddr) in vb2_dc_vaddr() 99 return buf->vaddr; in vb2_dc_vaddr() 101 if (buf->db_attach) { in vb2_dc_vaddr() 104 if (!dma_buf_vmap_unlocked(buf->db_attach->dmabuf, &map)) in vb2_dc_vaddr() 105 buf->vaddr = map.vaddr; in vb2_dc_vaddr() 107 return buf->vaddr; in vb2_dc_vaddr() 110 if (buf->non_coherent_mem) in vb2_dc_vaddr() [all …]
|
H A D | videobuf2-dma-sg.c | 60 static int vb2_dma_sg_alloc_compacted(struct vb2_dma_sg_buf *buf, in vb2_dma_sg_alloc_compacted() argument 64 unsigned long size = buf->size; in vb2_dma_sg_alloc_compacted() 85 __free_page(buf->pages[last_page]); in vb2_dma_sg_alloc_compacted() 93 buf->pages[last_page++] = &pages[i]; in vb2_dma_sg_alloc_compacted() 104 struct vb2_dma_sg_buf *buf; in vb2_dma_sg_alloc() local 112 buf = kzalloc(sizeof *buf, GFP_KERNEL); in vb2_dma_sg_alloc() 113 if (!buf) in vb2_dma_sg_alloc() 116 buf->vaddr = NULL; in vb2_dma_sg_alloc() 117 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_dma_sg_alloc() 118 buf->offset = 0; in vb2_dma_sg_alloc() [all …]
|
H A D | videobuf2-vmalloc.c | 40 struct vb2_vmalloc_buf *buf; in vb2_vmalloc_alloc() local 42 buf = kzalloc(sizeof(*buf), GFP_KERNEL | vb->vb2_queue->gfp_flags); in vb2_vmalloc_alloc() 43 if (!buf) in vb2_vmalloc_alloc() 46 buf->size = size; in vb2_vmalloc_alloc() 47 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc() 48 if (!buf->vaddr) { in vb2_vmalloc_alloc() 49 pr_debug("vmalloc of size %ld failed\n", buf->size); in vb2_vmalloc_alloc() 50 kfree(buf); in vb2_vmalloc_alloc() 54 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_vmalloc_alloc() 55 buf->handler.refcount = &buf->refcount; in vb2_vmalloc_alloc() [all …]
|
/openbmc/linux/kernel/ |
H A D | relay.c | 36 struct rchan_buf *buf = vmf->vma->vm_private_data; in relay_buf_fault() local 39 if (!buf) in relay_buf_fault() 42 page = vmalloc_to_page(buf->start + (pgoff << PAGE_SHIFT)); in relay_buf_fault() 83 static int relay_mmap_buf(struct rchan_buf *buf, struct vm_area_struct *vma) in relay_mmap_buf() argument 87 if (!buf) in relay_mmap_buf() 90 if (length != (unsigned long)buf->chan->alloc_size) in relay_mmap_buf() 95 vma->vm_private_data = buf; in relay_mmap_buf() 108 static void *relay_alloc_buf(struct rchan_buf *buf, size_t *size) in relay_alloc_buf() argument 116 buf->page_array = relay_alloc_page_array(n_pages); in relay_alloc_buf() 117 if (!buf->page_array) in relay_alloc_buf() [all …]
|
/openbmc/linux/drivers/xen/ |
H A D | xen-front-pgdir-shbuf.c | 48 void (*calc_num_grefs)(struct xen_front_pgdir_shbuf *buf); 51 void (*fill_page_dir)(struct xen_front_pgdir_shbuf *buf); 54 int (*grant_refs_for_buffer)(struct xen_front_pgdir_shbuf *buf, 58 int (*map)(struct xen_front_pgdir_shbuf *buf); 61 int (*unmap)(struct xen_front_pgdir_shbuf *buf); 75 xen_front_pgdir_shbuf_get_dir_start(struct xen_front_pgdir_shbuf *buf) in xen_front_pgdir_shbuf_get_dir_start() argument 77 if (!buf->grefs) in xen_front_pgdir_shbuf_get_dir_start() 80 return buf->grefs[0]; in xen_front_pgdir_shbuf_get_dir_start() 95 int xen_front_pgdir_shbuf_map(struct xen_front_pgdir_shbuf *buf) in xen_front_pgdir_shbuf_map() argument 97 if (buf->ops && buf->ops->map) in xen_front_pgdir_shbuf_map() [all …]
|
/openbmc/linux/sound/firewire/oxfw/ |
H A D | oxfw-command.c | 13 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 …]
|
/openbmc/linux/drivers/media/pci/saa7164/ |
H A D | saa7164-buffer.c | 55 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 …]
|
/openbmc/u-boot/test/ |
H A D | unicode_ut.c | 80 char buf[20]; in unicode_test_string16() local 83 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16() 84 sprintf(buf, "%8.6ls", c2); in unicode_test_string16() 85 ut_asserteq(' ', buf[1]); in unicode_test_string16() 86 ut_assert(!strncmp(&buf[2], d2, 7)); in unicode_test_string16() 87 ut_assert(!buf[9]); in unicode_test_string16() 89 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16() 90 sprintf(buf, "%8.6ls", c4); in unicode_test_string16() 91 ut_asserteq(' ', buf[4]); in unicode_test_string16() 92 ut_assert(!strncmp(&buf[5], d4, 12)); in unicode_test_string16() [all …]
|
/openbmc/qemu/hw/ide/ |
H A D | atapi.c | 39 static void padstr8(uint8_t *buf, int buf_size, const char *src) in padstr8() argument 44 buf[i] = *src++; in padstr8() 46 buf[i] = ' '; in padstr8() 50 static void lba_to_msf(uint8_t *buf, int lba) in lba_to_msf() argument 53 buf[0] = (lba / 75) / 60; in lba_to_msf() 54 buf[1] = (lba / 75) % 60; in lba_to_msf() 55 buf[2] = lba % 75; in lba_to_msf() 74 static void cd_data_to_raw(uint8_t *buf, int lba) in cd_data_to_raw() argument 77 buf[0] = 0x00; in cd_data_to_raw() 78 memset(buf + 1, 0xff, 10); in cd_data_to_raw() [all …]
|
/openbmc/linux/arch/mips/mm/ |
H A D | page.c | 103 pg_addiu(u32 **buf, unsigned int reg1, unsigned int reg2, unsigned int off) in pg_addiu() argument 109 uasm_i_lui(buf, T9, uasm_rel_hi(off)); in pg_addiu() 110 uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off)); in pg_addiu() 112 uasm_i_addiu(buf, T9, ZERO, off); in pg_addiu() 113 uasm_i_daddu(buf, reg1, reg2, T9); in pg_addiu() 116 uasm_i_lui(buf, T9, uasm_rel_hi(off)); in pg_addiu() 117 uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off)); in pg_addiu() 118 UASM_i_ADDU(buf, reg1, reg2, T9); in pg_addiu() 120 UASM_i_ADDIU(buf, reg1, reg2, off); in pg_addiu() 233 static void build_clear_store(u32 **buf, int off) in build_clear_store() argument [all …]
|
/openbmc/linux/drivers/media/usb/dvb-usb-v2/ |
H A D | mxl111sf-i2c.c | 247 &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 …]
|
/openbmc/linux/drivers/net/wireless/ath/ath11k/ |
H A D | debugfs_htt_stats.c | 43 u8 *buf = stats_req->buf; in htt_print_stats_string_tlv() local 50 len += scnprintf(buf + len, buf_len - len, "HTT_STATS_STRING_TLV:\n"); in htt_print_stats_string_tlv() 52 len += scnprintf(buf + len, buf_len - len, in htt_print_stats_string_tlv() 55 len += scnprintf(buf + len, in htt_print_stats_string_tlv() 60 len += scnprintf(buf + len, buf_len - len, "\n\n"); in htt_print_stats_string_tlv() 63 buf[buf_len - 1] = 0; in htt_print_stats_string_tlv() 65 buf[len] = 0; in htt_print_stats_string_tlv() 74 u8 *buf = stats_req->buf; in htt_print_tx_pdev_stats_cmn_tlv() local 78 len += scnprintf(buf + len, buf_len - len, "HTT_TX_PDEV_STATS_CMN_TLV:\n"); in htt_print_tx_pdev_stats_cmn_tlv() 79 len += scnprintf(buf + len, buf_len - len, "mac_id = %lu\n", in htt_print_tx_pdev_stats_cmn_tlv() [all …]
|
/openbmc/linux/drivers/iio/test/ |
H A D | iio-test-format.c | 17 char *buf; in iio_test_iio_format_value_integer() local 21 buf = kunit_kmalloc(test, PAGE_SIZE, GFP_KERNEL); in iio_test_iio_format_value_integer() 22 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); in iio_test_iio_format_value_integer() 25 ret = iio_format_value(buf, IIO_VAL_INT, 1, &val); in iio_test_iio_format_value_integer() 26 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "42\n"); in iio_test_iio_format_value_integer() 29 ret = iio_format_value(buf, IIO_VAL_INT, 1, &val); in iio_test_iio_format_value_integer() 30 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-23\n"); in iio_test_iio_format_value_integer() 33 ret = iio_format_value(buf, IIO_VAL_INT, 1, &val); in iio_test_iio_format_value_integer() 34 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0\n"); in iio_test_iio_format_value_integer() 37 ret = iio_format_value(buf, IIO_VAL_INT, 1, &val); in iio_test_iio_format_value_integer() [all …]
|
/openbmc/linux/drivers/net/wireless/ath/ath5k/ |
H A D | debug.c | 179 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 …]
|
/openbmc/linux/net/bridge/ |
H A D | br_stp_bpdu.c | 81 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 …]
|
/openbmc/u-boot/lib/ |
H A D | circbuf.c | 13 int buf_init (circbuf_t * buf, unsigned int size) in buf_init() argument 15 assert (buf != NULL); in buf_init() 17 buf->size = 0; in buf_init() 18 buf->totalsize = size; in buf_init() 19 buf->data = (char *) malloc (sizeof (char) * size); in buf_init() 20 assert (buf->data != NULL); in buf_init() 22 buf->top = buf->data; in buf_init() 23 buf->tail = buf->data; in buf_init() 24 buf->end = &(buf->data[size]); in buf_init() 29 int buf_free (circbuf_t * buf) in buf_free() argument [all …]
|
/openbmc/linux/drivers/tty/ |
H A D | tty_audit.c | 25 struct tty_audit_buf *buf; in tty_audit_buf_ref() local 27 buf = current->signal->tty_audit_buf; in tty_audit_buf_ref() 28 WARN_ON(buf == ERR_PTR(-ESRCH)); in tty_audit_buf_ref() 29 return buf; in tty_audit_buf_ref() 34 struct tty_audit_buf *buf; in tty_audit_buf_alloc() local 36 buf = kzalloc(sizeof(*buf), GFP_KERNEL); in tty_audit_buf_alloc() 37 if (!buf) in tty_audit_buf_alloc() 40 buf->data = kmalloc(N_TTY_BUF_SIZE, GFP_KERNEL); in tty_audit_buf_alloc() 41 if (!buf->data) in tty_audit_buf_alloc() 44 mutex_init(&buf->mutex); in tty_audit_buf_alloc() [all …]
|
/openbmc/qemu/contrib/vhost-user-gpu/ |
H A D | vugbm.c | 14 mem_alloc_bo(struct vugbm_buffer *buf) in mem_alloc_bo() argument 16 buf->mmap = g_malloc(buf->width * buf->height * 4); in mem_alloc_bo() 17 buf->stride = buf->width * 4; in mem_alloc_bo() 22 mem_free_bo(struct vugbm_buffer *buf) in mem_free_bo() argument 24 g_free(buf->mmap); in mem_free_bo() 28 mem_map_bo(struct vugbm_buffer *buf) in mem_map_bo() argument 30 return buf->mmap != NULL; in mem_map_bo() 34 mem_unmap_bo(struct vugbm_buffer *buf) in mem_unmap_bo() argument 54 udmabuf_get_size(struct vugbm_buffer *buf) in udmabuf_get_size() argument 56 return ROUND_UP(buf->width * buf->height * 4, qemu_real_host_page_size()); in udmabuf_get_size() [all …]
|
/openbmc/linux/drivers/accel/habanalabs/common/ |
H A D | memory_mgr.c | 22 struct hl_mmap_mem_buf *buf; in hl_mmap_mem_buf_get() local 25 buf = idr_find(&mmg->handles, lower_32_bits(handle >> PAGE_SHIFT)); in hl_mmap_mem_buf_get() 26 if (!buf) { in hl_mmap_mem_buf_get() 31 kref_get(&buf->refcount); in hl_mmap_mem_buf_get() 33 return buf; in hl_mmap_mem_buf_get() 45 static void hl_mmap_mem_buf_destroy(struct hl_mmap_mem_buf *buf) in hl_mmap_mem_buf_destroy() argument 47 if (buf->behavior->release) in hl_mmap_mem_buf_destroy() 48 buf->behavior->release(buf); in hl_mmap_mem_buf_destroy() 50 kfree(buf); in hl_mmap_mem_buf_destroy() 63 struct hl_mmap_mem_buf *buf = in hl_mmap_mem_buf_release() local [all …]
|
/openbmc/u-boot/drivers/rtc/ |
H A D | rs5c372.c | 62 rs5c372_readram(unsigned char *buf, int len) in rs5c372_readram() argument 66 ret = i2c_read(CONFIG_SYS_I2C_RTC_ADDR, 0, 0, buf, len); in rs5c372_readram() 72 if (buf[0] & STATUS_XPT) in rs5c372_readram() 81 unsigned char buf[RS5C372_RAM_SIZE + 1]; in rs5c372_enable() local 85 ret = rs5c372_readram(&buf[1], RS5C372_RAM_SIZE); in rs5c372_enable() 91 buf[0] = 0; in rs5c372_enable() 95 buf[ret - 1] = buf[ret]; in rs5c372_enable() 97 buf[8] = RATE_32768HZ; /* reg. 7 */ in rs5c372_enable() 98 buf[9] = 0; /* reg. 8 */ in rs5c372_enable() 99 buf[10] = 0; /* reg. 9 */ in rs5c372_enable() [all …]
|
/openbmc/linux/tools/perf/util/arm-spe-decoder/ |
H A D | arm-spe-pkt-decoder.c | 60 static int arm_spe_get_payload(const unsigned char *buf, size_t len, in arm_spe_get_payload() argument 64 size_t payload_len = arm_spe_payload_len(buf[ext_hdr]); in arm_spe_get_payload() 69 buf += 1 + ext_hdr; in arm_spe_get_payload() 72 case 1: packet->payload = *(uint8_t *)buf; break; in arm_spe_get_payload() 73 case 2: packet->payload = le16_to_cpu(*(uint16_t *)buf); break; in arm_spe_get_payload() 74 case 4: packet->payload = le32_to_cpu(*(uint32_t *)buf); break; in arm_spe_get_payload() 75 case 8: packet->payload = le64_to_cpu(*(uint64_t *)buf); break; in arm_spe_get_payload() 88 static int arm_spe_get_alignment(const unsigned char *buf, size_t len, in arm_spe_get_alignment() argument 91 unsigned int alignment = 1 << ((buf[0] & 0xf) + 1); in arm_spe_get_alignment() 97 return alignment - (((uintptr_t)buf) & (alignment - 1)); in arm_spe_get_alignment() [all …]
|
/openbmc/linux/drivers/net/wireless/st/cw1200/ |
H A D | wsm.c | 27 #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 …]
|
/openbmc/linux/drivers/media/tuners/ |
H A D | mt20xx.c | 103 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 …]
|