/openbmc/linux/tools/verification/dot2/ |
H A D | dot2c.py | 29 def __buff_to_string(self, buff): argument 32 for line in buff: 39 buff = [] 40 buff.append("\t%s%s = 0," % (self.initial_state, self.enum_suffix)) 43 buff.append("\t%s%s," % (state, self.enum_suffix)) 44 buff.append("\tstate_max%s" % (self.enum_suffix)) 46 return buff 49 buff = self.__get_enum_states_content() 50 return self.__buff_to_string(buff) 53 buff = [] [all …]
|
H A D | dot2k.py | 63 def __buff_to_string(self, buff): argument 66 for line in buff: 73 buff = [] 75 buff.append("static void handle_%s(void *data, /* XXX: fill header */)" % event) 76 buff.append("{") 78 buff.append("\tstruct task_struct *p = /* XXX: how do I get p? */;"); 79 … buff.append("\tda_handle_event_%s(p, %s%s);" % (self.name, event, self.enum_suffix)); 81 buff.append("\tda_handle_event_%s(%s%s);" % (self.name, event, self.enum_suffix)); 82 buff.append("}") 83 buff.append("") [all …]
|
/openbmc/linux/drivers/hid/ |
H A D | hid-picolcd_debugfs.c | 389 char *buff; in picolcd_debug_out_report() local 396 buff = kmalloc(BUFF_SZ, GFP_ATOMIC); in picolcd_debug_out_report() 397 if (!buff) in picolcd_debug_out_report() 402 kfree(buff); in picolcd_debug_out_report() 406 snprintf(buff, BUFF_SZ, "\nout report %d (size %d) = ", in picolcd_debug_out_report() 408 hid_debug_event(hdev, buff); in picolcd_debug_out_report() 411 dump_buff_as_hex(buff, BUFF_SZ, raw_data, raw_size); in picolcd_debug_out_report() 412 hid_debug_event(hdev, buff); in picolcd_debug_out_report() 417 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n", in picolcd_debug_out_report() 419 hid_debug_event(hdev, buff); in picolcd_debug_out_report() [all …]
|
/openbmc/slpd-lite/ |
H A D | slp_parser.cpp | 19 std::tuple<int, Message> parseHeader(const buffer& buff) in parseHeader() argument 36 if (buff.size() < slp::header::MIN_LEN) in parseHeader() 38 std::cerr << "Invalid msg size: " << buff.size() << std::endl; in parseHeader() 43 std::copy_n(buff.data(), slp::header::SIZE_VERSION, in parseHeader() 46 std::copy_n(buff.data() + slp::header::OFFSET_FUNCTION, in parseHeader() 49 std::copy_n(buff.data() + slp::header::OFFSET_LENGTH, in parseHeader() 52 std::copy_n(buff.data() + slp::header::OFFSET_FLAGS, in parseHeader() 56 std::copy_n(buff.data() + slp::header::OFFSET_EXT, in parseHeader() 59 std::copy_n(buff.data() + slp::header::OFFSET_XID, in parseHeader() 66 std::copy_n(buff.data() + slp::header::OFFSET_LANG_LEN, in parseHeader() [all …]
|
H A D | slp_message_handler.cpp | 31 buffer buff(length, 0); in prepareHeader() local 33 buff[slp::header::OFFSET_VERSION] = req.header.version; in prepareHeader() 36 buff[slp::header::OFFSET_FUNCTION] = req.header.functionID + 1; in prepareHeader() 39 buff.data() + slp::header::OFFSET_LENGTH); in prepareHeader() 44 buff.data() + slp::header::OFFSET_FLAGS); in prepareHeader() 47 buff.data() + slp::header::OFFSET_EXT); in prepareHeader() 52 buff.data() + slp::header::OFFSET_XID); in prepareHeader() 57 buff.data() + slp::header::OFFSET_LANG_LEN); in prepareHeader() 61 buff.data() + slp::header::OFFSET_LANG); in prepareHeader() 62 return buff; in prepareHeader() [all …]
|
/openbmc/linux/arch/parisc/lib/ |
H A D | checksum.c | 37 static inline unsigned int do_csum(const unsigned char * buff, int len) in do_csum() argument 44 odd = 1 & (unsigned long) buff; in do_csum() 46 result = be16_to_cpu(*buff); in do_csum() 48 buff++; in do_csum() 52 if (2 & (unsigned long) buff) { in do_csum() 53 result += *(unsigned short *) buff; in do_csum() 56 buff += 2; in do_csum() 62 r1 = *(unsigned int *)(buff + 0); in do_csum() 63 r2 = *(unsigned int *)(buff + 4); in do_csum() 64 r3 = *(unsigned int *)(buff + 8); in do_csum() [all …]
|
/openbmc/linux/arch/x86/lib/ |
H A D | csum-partial_64.c | 44 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument 52 temp64 = update_csum_40b(temp64, buff); in csum_partial() 53 temp64_2 = update_csum_40b(temp64_2, buff + 40); in csum_partial() 54 buff += 80; in csum_partial() 68 temp64 = update_csum_40b(temp64, buff); in csum_partial() 72 buff += 40; in csum_partial() 82 : [src] "r"(buff), "m"(*(const char(*)[32])buff)); in csum_partial() 83 buff += 32; in csum_partial() 90 : [src] "r"(buff), "m"(*(const char(*)[16])buff)); in csum_partial() 91 buff += 16; in csum_partial() [all …]
|
/openbmc/linux/arch/ia64/lib/ |
H A D | csum_partial_copy.c | 35 unsigned long do_csum_c(const unsigned char * buff, int len, unsigned int psum) in do_csum_c() argument 42 odd = 1 & (unsigned long) buff; in do_csum_c() 44 result = *buff << 8; in do_csum_c() 46 buff++; in do_csum_c() 50 if (2 & (unsigned long) buff) { in do_csum_c() 51 result += *(unsigned short *) buff; in do_csum_c() 54 buff += 2; in do_csum_c() 58 if (4 & (unsigned long) buff) { in do_csum_c() 59 result += *(unsigned int *) buff; in do_csum_c() 62 buff += 4; in do_csum_c() [all …]
|
/openbmc/linux/drivers/net/ethernet/aquantia/atlantic/ |
H A D | aq_ring.c | 23 static void aq_get_rxpages_xdp(struct aq_ring_buff_s *buff, in aq_get_rxpages_xdp() argument 38 page_ref_inc(buff->rxdata.page); in aq_get_rxpages_xdp() 292 struct aq_ring_buff_s *buff = &self->buff_ring[self->sw_head]; in aq_ring_tx_clean() local 294 if (likely(buff->is_mapped)) { in aq_ring_tx_clean() 295 if (unlikely(buff->is_sop)) { in aq_ring_tx_clean() 296 if (!buff->is_eop && in aq_ring_tx_clean() 297 buff->eop_index != 0xffffU && in aq_ring_tx_clean() 299 buff->eop_index, in aq_ring_tx_clean() 303 dma_unmap_single(dev, buff->pa, buff->len, in aq_ring_tx_clean() 306 dma_unmap_page(dev, buff->pa, buff->len, in aq_ring_tx_clean() [all …]
|
/openbmc/linux/drivers/rtc/ |
H A D | rtc-rc5t619.c | 119 u8 buff[7]; in rc5t619_rtc_read_time() local 137 buff, sizeof(buff)); in rc5t619_rtc_read_time() 141 if (buff[5] & MONTH_CENTFLAG) in rc5t619_rtc_read_time() 146 tm->tm_sec = bcd2bin(buff[0]); in rc5t619_rtc_read_time() 147 tm->tm_min = bcd2bin(buff[1]); in rc5t619_rtc_read_time() 150 tm->tm_hour = bcd2bin(buff[2]); in rc5t619_rtc_read_time() 152 tm->tm_hour = rtc5t619_12hour_bcd2bin(buff[2]); in rc5t619_rtc_read_time() 154 tm->tm_wday = bcd2bin(buff[3]); in rc5t619_rtc_read_time() 155 tm->tm_mday = bcd2bin(buff[4]); in rc5t619_rtc_read_time() 156 tm->tm_mon = bcd2bin(buff[5] & 0x1f) - 1; /* back to system 0-11 */ in rc5t619_rtc_read_time() [all …]
|
H A D | rtc-tps6586x.c | 61 u8 buff[6]; in tps6586x_rtc_read_time() local 65 ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD, sizeof(buff), buff); in tps6586x_rtc_read_time() 71 for (i = 1; i < sizeof(buff); i++) { in tps6586x_rtc_read_time() 73 ticks |= buff[i]; in tps6586x_rtc_read_time() 87 u8 buff[5]; in tps6586x_rtc_set_time() local 93 buff[0] = (ticks >> 32) & 0xff; in tps6586x_rtc_set_time() 94 buff[1] = (ticks >> 24) & 0xff; in tps6586x_rtc_set_time() 95 buff[2] = (ticks >> 16) & 0xff; in tps6586x_rtc_set_time() 96 buff[3] = (ticks >> 8) & 0xff; in tps6586x_rtc_set_time() 97 buff[4] = ticks & 0xff; in tps6586x_rtc_set_time() [all …]
|
/openbmc/linux/lib/ |
H A D | checksum.c | 46 static unsigned int do_csum(const unsigned char *buff, int len) in do_csum() argument 53 odd = 1 & (unsigned long) buff; in do_csum() 56 result += (*buff << 8); in do_csum() 58 result = *buff; in do_csum() 61 buff++; in do_csum() 64 if (2 & (unsigned long) buff) { in do_csum() 65 result += *(unsigned short *) buff; in do_csum() 67 buff += 2; in do_csum() 70 const unsigned char *end = buff + ((unsigned)len & ~3); in do_csum() 73 unsigned int w = *(unsigned int *) buff; in do_csum() [all …]
|
/openbmc/linux/arch/alpha/lib/ |
H A D | checksum.c | 79 static inline unsigned long do_csum(const unsigned char * buff, int len) in do_csum() argument 86 odd = 1 & (unsigned long) buff; in do_csum() 88 result = *buff << 8; in do_csum() 90 buff++; in do_csum() 94 if (2 & (unsigned long) buff) { in do_csum() 95 result += *(unsigned short *) buff; in do_csum() 98 buff += 2; in do_csum() 102 if (4 & (unsigned long) buff) { in do_csum() 103 result += *(unsigned int *) buff; in do_csum() 106 buff += 4; in do_csum() [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/dispnv04/ |
H A D | nvreg.h | 471 #define NV_PVIDEO_UVPLANE_BASE(buff) (0x00008800+(buff)*4) argument 472 #define NV_PVIDEO_UVPLANE_LIMIT(buff) (0x00008808+(buff)*4) argument 473 #define NV_PVIDEO_UVPLANE_OFFSET_BUFF(buff) (0x00008820+(buff)*4) argument 474 #define NV_PVIDEO_BASE(buff) (0x00008900+(buff)*4) argument 475 #define NV_PVIDEO_LIMIT(buff) (0x00008908+(buff)*4) argument 476 #define NV_PVIDEO_LUMINANCE(buff) (0x00008910+(buff)*4) argument 477 #define NV_PVIDEO_CHROMINANCE(buff) (0x00008918+(buff)*4) argument 478 #define NV_PVIDEO_OFFSET_BUFF(buff) (0x00008920+(buff)*4) argument 479 #define NV_PVIDEO_SIZE_IN(buff) (0x00008928+(buff)*4) argument 480 #define NV_PVIDEO_POINT_IN(buff) (0x00008930+(buff)*4) argument [all …]
|
/openbmc/linux/net/netrom/ |
H A D | nr_dev.c | 69 unsigned char *buff = skb_push(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN); in nr_header() local 71 memcpy(buff, (saddr != NULL) ? saddr : dev->dev_addr, dev->addr_len); in nr_header() 72 buff[6] &= ~AX25_CBIT; in nr_header() 73 buff[6] &= ~AX25_EBIT; in nr_header() 74 buff[6] |= AX25_SSSID_SPARE; in nr_header() 75 buff += AX25_ADDR_LEN; in nr_header() 78 memcpy(buff, daddr, dev->addr_len); in nr_header() 79 buff[6] &= ~AX25_CBIT; in nr_header() 80 buff[6] |= AX25_EBIT; in nr_header() 81 buff[6] |= AX25_SSSID_SPARE; in nr_header() [all …]
|
/openbmc/linux/net/ax25/ |
H A D | ax25_ip.c | 49 unsigned char *buff; in ax25_hard_header() local 56 buff = skb_push(skb, AX25_HEADER_LEN); in ax25_hard_header() 57 *buff++ = 0x00; /* KISS DATA */ in ax25_hard_header() 60 memcpy(buff, daddr, dev->addr_len); /* Address specified */ in ax25_hard_header() 62 buff[6] &= ~AX25_CBIT; in ax25_hard_header() 63 buff[6] &= ~AX25_EBIT; in ax25_hard_header() 64 buff[6] |= AX25_SSSID_SPARE; in ax25_hard_header() 65 buff += AX25_ADDR_LEN; in ax25_hard_header() 68 memcpy(buff, saddr, dev->addr_len); in ax25_hard_header() 70 memcpy(buff, dev->dev_addr, dev->addr_len); in ax25_hard_header() [all …]
|
/openbmc/u-boot/cmd/ |
H A D | trace.c | 12 static int get_args(int argc, char * const argv[], char **buff, in get_args() argument 19 *buff = map_sysmem(env_get_ulong("profbase", 16, 0), in get_args() 24 *buff = map_sysmem(simple_strtoul(argv[2], NULL, 16), in get_args() 35 char *buff; in create_func_list() local 38 if (get_args(argc, argv, &buff, &buff_ptr, &buff_size)) in create_func_list() 42 err = trace_list_functions(buff + buff_ptr, avail, &needed); in create_func_list() 47 (ulong)map_to_sysmem(buff + buff_ptr), used); in create_func_list() 48 env_set_hex("profbase", map_to_sysmem(buff)); in create_func_list() 59 char *buff; in create_call_list() local 62 if (get_args(argc, argv, &buff, &buff_ptr, &buff_size)) in create_call_list() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | assign_reuse.c | 39 char buff[1] = {}; in echo_test_udp() local 46 ASSERT_EQ(send(fd_cl, buff, sizeof(buff), 0), 1, "send_client"); in echo_test_udp() 48 ret = recv(fd_sv, buff, sizeof(buff), 0); in echo_test_udp() 55 ASSERT_EQ(sendto(fd_sv, buff, sizeof(buff), 0, (void *)&addr, len), 1, "send_server"); in echo_test_udp() 56 ASSERT_EQ(recv(fd_cl, buff, sizeof(buff), 0), 1, "recv_client"); in echo_test_udp() 63 char buff[1] = {}; in echo_test_tcp() local 73 ASSERT_EQ(send(fd_cl, buff, sizeof(buff), 0), 1, "send_client"); in echo_test_tcp() 74 ASSERT_EQ(recv(fd_sv_cl, buff, sizeof(buff), 0), 1, "recv_server"); in echo_test_tcp() 75 ASSERT_EQ(send(fd_sv_cl, buff, sizeof(buff), 0), 1, "send_server"); in echo_test_tcp() 76 ASSERT_EQ(recv(fd_cl, buff, sizeof(buff), 0), 1, "recv_client"); in echo_test_tcp()
|
/openbmc/linux/drivers/net/wireless/ath/ath11k/ |
H A D | dbring.c | 41 struct ath11k_dbring_element *buff, in ath11k_dbring_bufs_replenish() argument 58 ptr_unaligned = buff->payload; in ath11k_dbring_bufs_replenish() 69 buf_id = idr_alloc(&ring->bufs_idr, buff, 0, ring->bufs_max, GFP_ATOMIC); in ath11k_dbring_bufs_replenish() 82 buff->paddr = paddr; in ath11k_dbring_bufs_replenish() 110 struct ath11k_dbring_element *buff; in ath11k_dbring_fill_bufs() local 127 buff = kzalloc(sizeof(*buff), GFP_ATOMIC); in ath11k_dbring_fill_bufs() 128 if (!buff) in ath11k_dbring_fill_bufs() 131 buff->payload = kzalloc(size, GFP_ATOMIC); in ath11k_dbring_fill_bufs() 132 if (!buff->payload) { in ath11k_dbring_fill_bufs() 133 kfree(buff); in ath11k_dbring_fill_bufs() [all …]
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | optprobes.c | 158 kprobe_opcode_t *buff; in arch_prepare_optimized_kprobe() local 168 buff = get_optinsn_slot(); in arch_prepare_optimized_kprobe() 169 if (!buff) in arch_prepare_optimized_kprobe() 181 b_offset = (unsigned long)buff - (unsigned long)p->addr; in arch_prepare_optimized_kprobe() 186 b_offset = (unsigned long)(buff + TMPL_RET_IDX) - nip; in arch_prepare_optimized_kprobe() 193 pr_devel("Copying template to %p, size %lu\n", buff, size); in arch_prepare_optimized_kprobe() 195 rc = patch_instruction(buff + i, ppc_inst(*(optprobe_template_entry + i))); in arch_prepare_optimized_kprobe() 204 patch_imm_load_insns((unsigned long)op, 3, buff + TMPL_OP_IDX); in arch_prepare_optimized_kprobe() 216 rc = create_branch(&branch_op_callback, buff + TMPL_CALL_HDLR_IDX, in arch_prepare_optimized_kprobe() 219 rc |= create_branch(&branch_emulate_step, buff + TMPL_EMULATE_IDX, in arch_prepare_optimized_kprobe() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/fm10k/ |
H A D | fm10k_ethtool.c | 299 static void fm10k_get_reg_q(struct fm10k_hw *hw, u32 *buff, int i) in fm10k_get_reg_q() argument 303 buff[idx++] = fm10k_read_reg(hw, FM10K_RDBAL(i)); in fm10k_get_reg_q() 304 buff[idx++] = fm10k_read_reg(hw, FM10K_RDBAH(i)); in fm10k_get_reg_q() 305 buff[idx++] = fm10k_read_reg(hw, FM10K_RDLEN(i)); in fm10k_get_reg_q() 306 buff[idx++] = fm10k_read_reg(hw, FM10K_TPH_RXCTRL(i)); in fm10k_get_reg_q() 307 buff[idx++] = fm10k_read_reg(hw, FM10K_RDH(i)); in fm10k_get_reg_q() 308 buff[idx++] = fm10k_read_reg(hw, FM10K_RDT(i)); in fm10k_get_reg_q() 309 buff[idx++] = fm10k_read_reg(hw, FM10K_RXQCTL(i)); in fm10k_get_reg_q() 310 buff[idx++] = fm10k_read_reg(hw, FM10K_RXDCTL(i)); in fm10k_get_reg_q() 311 buff[idx++] = fm10k_read_reg(hw, FM10K_RXINT(i)); in fm10k_get_reg_q() [all …]
|
/openbmc/linux/drivers/staging/most/net/ |
H A D | net.c | 77 u8 *buff = mbo->virt_address; in skb_to_mamac() local 103 *buff++ = HB(mdp_len - 2); in skb_to_mamac() 104 *buff++ = LB(mdp_len - 2); in skb_to_mamac() 106 *buff++ = PMHL; in skb_to_mamac() 107 *buff++ = (PMS_FIFONO_MDP << PMS_FIFONO_SHIFT) | PMS_MSGTYPE_DATA; in skb_to_mamac() 108 *buff++ = PMS_DEF_PRIO; in skb_to_mamac() 109 *buff++ = dest_addr[0]; in skb_to_mamac() 110 *buff++ = dest_addr[1]; in skb_to_mamac() 111 *buff++ = 0x00; in skb_to_mamac() 113 *buff++ = HB(payload_len + 6); in skb_to_mamac() [all …]
|
/openbmc/linux/arch/powerpc/include/asm/ |
H A D | checksum.h | 171 __wsum __csum_partial(const void *buff, int len, __wsum sum); 173 static __always_inline __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument 177 sum = csum_add(sum, (__force __wsum)*(const u16 *)buff); in csum_partial() 179 sum = csum_add(sum, (__force __wsum)*(const u32 *)buff); in csum_partial() 182 *(const u16 *)(buff + 4)); in csum_partial() 185 *(const u32 *)(buff + 4)); in csum_partial() 188 *(const u16 *)(buff + 8)); in csum_partial() 191 *(const u32 *)(buff + 8)); in csum_partial() 194 *(const u16 *)(buff + 12)); in csum_partial() 197 *(const u32 *)(buff + 12)); in csum_partial() [all …]
|
/openbmc/linux/drivers/net/wireless/ath/ath12k/ |
H A D | dbring.c | 12 struct ath12k_dbring_element *buff, in ath12k_dbring_bufs_replenish() argument 29 ptr_unaligned = buff->payload; in ath12k_dbring_bufs_replenish() 39 buf_id = idr_alloc(&ring->bufs_idr, buff, 0, ring->bufs_max, gfp); in ath12k_dbring_bufs_replenish() 52 buff->paddr = paddr; in ath12k_dbring_bufs_replenish() 79 struct ath12k_dbring_element *buff; in ath12k_dbring_fill_bufs() local 94 size = sizeof(*buff) + ring->buf_sz + align - 1; in ath12k_dbring_fill_bufs() 97 buff = kzalloc(size, gfp); in ath12k_dbring_fill_bufs() 98 if (!buff) in ath12k_dbring_fill_bufs() 101 ret = ath12k_dbring_bufs_replenish(ar, ring, buff, gfp); in ath12k_dbring_fill_bufs() 105 kfree(buff); in ath12k_dbring_fill_bufs() [all …]
|
/openbmc/linux/fs/squashfs/ |
H A D | lz4_wrapper.c | 33 void *buff, int len) in lz4_comp_opts() argument 35 struct lz4_comp_opts *comp_opts = buff; in lz4_comp_opts() 52 static void *lz4_init(struct squashfs_sb_info *msblk, void *buff) in lz4_init() argument 98 void *buff = stream->input, *data; in lz4_uncompress() local 105 memcpy(buff, data + offset, avail); in lz4_uncompress() 106 buff += avail; in lz4_uncompress() 119 buff = stream->output; in lz4_uncompress() 123 memcpy(data, buff, bytes); in lz4_uncompress() 127 memcpy(data, buff, PAGE_SIZE); in lz4_uncompress() 128 buff += PAGE_SIZE; in lz4_uncompress()
|