/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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()
|
H A D | global_data_init.c | 8 __u8 *buff = NULL, *newval = NULL; in test_global_data_init() local 46 buff = malloc(sz); in test_global_data_init() 47 if (buff) in test_global_data_init() 48 err = bpf_map_lookup_elem(map_fd, &zero, buff); in test_global_data_init() 49 if (CHECK(!buff || err || memcmp(buff, newval, sz), in test_global_data_init() 59 free(buff); in test_global_data_init()
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/linux/arch/riscv/lib/ |
H A D | csum.c | 130 do_csum_with_alignment(const unsigned char *buff, int len) in do_csum_with_alignment() argument 141 offset = (unsigned long)buff & OFFSET_MASK; in do_csum_with_alignment() 142 kasan_check_read(buff, len); in do_csum_with_alignment() 143 ptr = (const unsigned long *)(buff - offset); in do_csum_with_alignment() 156 end = (const unsigned long *)(buff + len); in do_csum_with_alignment() 234 do_csum_no_alignment(const unsigned char *buff, int len) in do_csum_no_alignment() argument 239 ptr = (const unsigned long *)(buff); in do_csum_no_alignment() 242 kasan_check_read(buff, len); in do_csum_no_alignment() 244 end = (const unsigned long *)(buff + len); in do_csum_no_alignment() 306 unsigned int do_csum(const unsigned char *buff, int len) in do_csum() argument [all …]
|
/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 …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | verifier_const.c | 18 char buff[] = { '8', '4', '\0' }; in tcx1() local 19 bpf_strtol(buff, sizeof(buff), 0, (long *)&foo); in tcx1() 28 char buff[] = { '8', '4', '\0' }; in tcx2() local 29 bpf_strtol(buff, sizeof(buff), 0, &bar); in tcx2() 38 char buff[] = { '8', '4', '\0' }; in tcx3() local 39 bpf_strtol(buff, sizeof(buff), 0, &bart); in tcx3()
|
/linux/tools/usb/usbip/libsrc/ |
H A D | usbip_common.c | 101 char buff[100]; in dump_usb_interface() local 103 usbip_names_get_class(buff, sizeof(buff), in dump_usb_interface() 107 dbg("%-20s = %s", "Interface(C/SC/P)", buff); in dump_usb_interface() 112 char buff[100]; in dump_usb_device() local 117 usbip_names_get_class(buff, sizeof(buff), in dump_usb_device() 121 dbg("%-20s = %s", "Device(C/SC/P)", buff); in dump_usb_device() 125 usbip_names_get_product(buff, sizeof(buff), in dump_usb_device() 128 dbg("%-20s = %s", "Vendor/Product", buff); in dump_usb_device() 278 void usbip_names_get_product(char *buff, size_t size, uint16_t vendor, in usbip_names_get_product() argument 292 snprintf(buff, size, "%s : %s (%04x:%04x)", vend, prod, vendor, product); in usbip_names_get_product() [all …]
|
/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()
|
H A D | lzo_wrapper.c | 28 static void *lzo_init(struct squashfs_sb_info *msblk, void *buff) in lzo_init() argument 72 void *buff = stream->input, *data; in lzo_uncompress() local 80 memcpy(buff, data + offset, avail); in lzo_uncompress() 81 buff += avail; in lzo_uncompress() 93 buff = stream->output; in lzo_uncompress() 97 memcpy(data, buff, bytes); in lzo_uncompress() 101 memcpy(data, buff, PAGE_SIZE); in lzo_uncompress() 102 buff += PAGE_SIZE; in lzo_uncompress()
|
/linux/kernel/trace/rv/ |
H A D | rv.c | 216 const char *buff; in monitor_enable_read_data() local 218 buff = mdef->monitor->enabled ? "1\n" : "0\n"; in monitor_enable_read_data() 220 return simple_read_from_buffer(user_buf, count, ppos, buff, strlen(buff)+1); in monitor_enable_read_data() 320 char buff[256]; in monitor_desc_read_data() local 322 memset(buff, 0, sizeof(buff)); in monitor_desc_read_data() 324 snprintf(buff, sizeof(buff), "%s\n", mdef->monitor->description); in monitor_desc_read_data() 326 return simple_read_from_buffer(user_buf, count, ppos, buff, strlen(buff) + 1); in monitor_desc_read_data() 513 char buff[MAX_RV_MONITOR_NAME_SIZE + 2]; in enabled_monitors_write() local 523 memset(buff, 0, sizeof(buff)); in enabled_monitors_write() 525 retval = simple_write_to_buffer(buff, sizeof(buff) - 1, ppos, user_buf, count); in enabled_monitors_write() [all …]
|
/linux/drivers/gpu/drm/i915/gt/ |
H A D | intel_gt_sysfs_pm.c | 100 struct attribute *attr, char *buff) \ 105 return sysfs_emit(buff, "%u\n", val); \ 108 struct kobj_attribute *attr, char *buff) \ 110 return _name ##_show_common(kobj, &attr->attr, buff); \ 113 struct device_attribute *attr, char *buff) \ 115 return _name##_show_common(&dev->kobj, &attr->attr, buff); \ 121 const char *buff, size_t count) \ 126 ret = kstrtou32(buff, 0, &val); \ 135 struct kobj_attribute *attr, const char *buff, \ 138 return _name##_store_common(kobj, &attr->attr, buff, count); \ [all …]
|
/linux/drivers/staging/rtl8723bs/os_dep/ |
H A D | mlme_linux.c | 136 u8 *buff, *p, i; in rtw_report_sec_ie() local 139 buff = NULL; in rtw_report_sec_ie() 141 buff = rtw_zmalloc(IW_CUSTOM_MAX); in rtw_report_sec_ie() 142 if (!buff) in rtw_report_sec_ie() 145 p = buff; in rtw_report_sec_ie() 147 p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "ASSOCINFO(ReqIEs ="); in rtw_report_sec_ie() 153 p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "%02x", sec_ie[i]); in rtw_report_sec_ie() 155 p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), ")"); in rtw_report_sec_ie() 159 wrqu.data.length = p - buff; in rtw_report_sec_ie() 163 kfree(buff); in rtw_report_sec_ie()
|