Lines Matching +full:0 +full:pointer

8  *  @msg: Pointer to message block
11 * This function return success if provided with a valid message pointer
15 /* verify pointer is not NULL */ in fm10k_tlv_msg_init()
21 return 0; in fm10k_tlv_msg_init()
26 * @msg: Pointer to message block
28 * @string: Pointer to string to be stored in attribute
37 u32 attr_data = 0, len = 0; in fm10k_tlv_attr_put_null_string()
51 attr_data = 0; in fm10k_tlv_attr_put_null_string()
66 attr[0] = len | attr_id; in fm10k_tlv_attr_put_null_string()
72 return 0; in fm10k_tlv_attr_put_null_string()
77 * @attr: Pointer to attribute
78 * @string: Pointer to location of destination string
98 return 0; in fm10k_tlv_attr_get_null_string()
103 * @msg: Pointer to message block
125 attr[0] = len | attr_id; in fm10k_tlv_attr_put_mac_vlan()
128 attr[1] = le32_to_cpu(*(const __le32 *)&mac_addr[0]); in fm10k_tlv_attr_put_mac_vlan()
136 return 0; in fm10k_tlv_attr_put_mac_vlan()
141 * @attr: Pointer to attribute
155 *(__le32 *)&mac_addr[0] = cpu_to_le32(attr[1]); in fm10k_tlv_attr_get_mac_vlan()
159 return 0; in fm10k_tlv_attr_get_mac_vlan()
164 * @msg: Pointer to message block
184 return 0; in fm10k_tlv_attr_put_bool()
189 * @msg: Pointer to message block
196 * that msg is a valid pointer, and len is 1, 2, 4, or 8.
218 attr[0] = len | attr_id; in fm10k_tlv_attr_put_value()
224 return 0; in fm10k_tlv_attr_put_value()
229 * @attr: Pointer to attribute
230 * @value: Pointer to destination buffer
256 return 0; in fm10k_tlv_attr_get_value()
261 * @msg: Pointer to message block
263 * @le_struct: Pointer to structure to be written
284 for (i = 0; i < (len / 4); i++) in fm10k_tlv_attr_put_le_struct()
289 attr[0] = len | attr_id; in fm10k_tlv_attr_put_le_struct()
295 return 0; in fm10k_tlv_attr_put_le_struct()
300 * @attr: Pointer to attribute
301 * @le_struct: Pointer to structure to be written
323 for (i = 0; len; i++, len -= 4) in fm10k_tlv_attr_get_le_struct()
326 return 0; in fm10k_tlv_attr_get_le_struct()
331 * @msg: Pointer to message block
337 * function will return NULL on failure, and a pointer to the start
344 /* verify pointer is not NULL */ in fm10k_tlv_attr_nest_start()
350 attr[0] = attr_id; in fm10k_tlv_attr_nest_start()
352 /* return pointer to nest header */ in fm10k_tlv_attr_nest_start()
358 * @msg: Pointer to message block
361 * message pointer should be pointing to the parent of the nest. So in
362 * the case of a nest within the nest this would be the outer nest pointer.
370 /* verify pointer is not NULL */ in fm10k_tlv_attr_nest_stop()
376 len = (attr[0] >> FM10K_TLV_LEN_SHIFT) << FM10K_TLV_LEN_SHIFT; in fm10k_tlv_attr_nest_stop()
384 return 0; in fm10k_tlv_attr_nest_stop()
389 * @attr: Pointer to attribute
396 * it returns 0.
422 (attr[(len - 1) / 4] & (0xFF << (8 * ((len - 1) % 4))))) in fm10k_tlv_attr_validate()
455 return 0; in fm10k_tlv_attr_validate()
460 * @attr: Pointer to attribute list
461 * @results: Pointer array to store pointers to attributes
468 * and 0 on success. Any attributes not found in tlv_attr will be silently
474 u32 i, attr_id, offset = 0; in fm10k_tlv_attr_parse()
483 for (i = 0; i < FM10K_TLV_RESULTS_MAX; i++) in fm10k_tlv_attr_parse()
491 return 0; in fm10k_tlv_attr_parse()
495 results[0] = attr; in fm10k_tlv_attr_parse()
496 return 0; in fm10k_tlv_attr_parse()
528 return 0; in fm10k_tlv_attr_parse()
533 * @hw: Pointer to hardware structure
534 * @msg: Pointer to message
535 * @mbx: Pointer to mailbox information structure
536 * @data: Pointer to message handler data structure
552 /* verify pointer is not NULL */ in fm10k_tlv_msg_parse()
574 if (err < 0) in fm10k_tlv_msg_parse()
582 * @hw: Pointer to hardware structure
583 * @results: Pointer array to message, results[0] is pointer to message
584 * @mbx: Unused mailbox pointer
598 static const unsigned char test_mac[ETH_ALEN] = { 0x12, 0x34, 0x56,
599 0x78, 0x9a, 0xbc };
600 static const u16 test_vlan = 0x0FED;
601 static const u64 test_u64 = 0xfedcba9876543210ull;
602 static const u32 test_u32 = 0x87654321;
603 static const u16 test_u16 = 0x8765;
604 static const u8 test_u8 = 0x87;
605 static const s64 test_s64 = -0x123456789abcdef0ll;
606 static const s32 test_s32 = -0x1235678;
607 static const s16 test_s16 = -0x1234;
608 static const s8 test_s8 = -0x12;
609 static const __le32 test_le[2] = { cpu_to_le32(0x12345678),
610 cpu_to_le32(0x9abcdef0)};
635 * @msg: Pointer to message
671 * @msg: Pointer to message
699 * @hw: Pointer to hardware structure
700 * @results: Pointer array to attributes in the message
701 * @mbx: Pointer to mailbox information structure
713 s32 err = 0; in fm10k_tlv_msg_test()
829 memset(nest_results, 0, sizeof(nest_results)); in fm10k_tlv_msg_test()