Lines Matching refs:structure
38 static u64 value_read(int offset, int size, void *structure)
41 case 1: return *(u8 *) (structure + offset);
42 case 2: return be16_to_cpup((__be16 *) (structure + offset));
43 case 4: return be32_to_cpup((__be32 *) (structure + offset));
44 case 8: return be64_to_cpup((__be64 *) (structure + offset));
52 * ib_pack - Pack a structure into a buffer
53 * @desc:Array of structure field descriptions
55 * @structure:Structure to pack from
58 * ib_pack() packs a list of structure fields into a buffer,
63 void *structure,
79 structure) << shift;
96 structure) << shift;
114 structure + desc[i].struct_offset_bytes,
126 static void value_write(int offset, int size, u64 val, void *structure)
129 case 8: *( u8 *) (structure + offset) = val; break;
130 case 16: *(__be16 *) (structure + offset) = cpu_to_be16(val); break;
131 case 32: *(__be32 *) (structure + offset) = cpu_to_be32(val); break;
132 case 64: *(__be64 *) (structure + offset) = cpu_to_be64(val); break;
139 * ib_unpack - Unpack a buffer into a structure
140 * @desc:Array of structure field descriptions
143 * @structure:Structure to unpack into
145 * ib_pack() unpacks a list of structure fields from a buffer,
151 void *structure)
172 structure);
186 structure);
195 memcpy(structure + desc[i].struct_offset_bytes,