Lines Matching refs:structure
43 static u64 value_read(int offset, int size, void *structure)
46 case 1: return *(u8 *) ((char *)structure + offset);
47 case 2: return be16_to_cpup((__be16 *) ((char *)structure + offset));
48 case 4: return be32_to_cpup((__be32 *) ((char *)structure + offset));
49 case 8: return be64_to_cpup((__be64 *) ((char *)structure + offset));
57 * ib_pack - Pack a structure into a buffer
58 * @desc:Array of structure field descriptions
60 * @structure:Structure to pack from
63 * ib_pack() packs a list of structure fields into a buffer,
68 void *structure,
84 structure) << shift;
101 structure) << shift;
118 (char *)structure + desc[i].struct_offset_bytes,
130 static void value_write(int offset, int size, u64 val, void *structure)
133 case 8: *( u8 *) ((char *)structure + offset) = val; break;
134 case 16: *(__be16 *) ((char *)structure + offset) = cpu_to_be16(val); break;
135 case 32: *(__be32 *) ((char *)structure + offset) = cpu_to_be32(val); break;
136 case 64: *(__be64 *) ((char *)structure + offset) = cpu_to_be64(val); break;
143 * ib_unpack - Unpack a buffer into a structure
144 * @desc:Array of structure field descriptions
147 * @structure:Structure to unpack into
149 * ib_pack() unpacks a list of structure fields from a buffer,
155 void *structure)
176 structure);
190 structure);
198 memcpy((char *)structure + desc[i].struct_offset_bytes,