Lines Matching refs:structure
39 static u64 value_read(int offset, int size, void *structure) in value_read() argument
42 case 1: return *(u8 *) (structure + offset); in value_read()
43 case 2: return be16_to_cpup((__be16 *) (structure + offset)); in value_read()
44 case 4: return be32_to_cpup((__be32 *) (structure + offset)); in value_read()
45 case 8: return be64_to_cpup((__be64 *) (structure + offset)); in value_read()
64 void *structure, in ib_pack() argument
80 structure) << shift; in ib_pack()
97 structure) << shift; in ib_pack()
114 structure + desc[i].struct_offset_bytes, in ib_pack()
126 static void value_write(int offset, int size, u64 val, void *structure) in value_write() argument
129 case 8: *( u8 *) (structure + offset) = val; break; in value_write()
130 case 16: *(__be16 *) (structure + offset) = cpu_to_be16(val); break; in value_write()
131 case 32: *(__be32 *) (structure + offset) = cpu_to_be32(val); break; in value_write()
132 case 64: *(__be64 *) (structure + offset) = cpu_to_be64(val); break; in value_write()
151 void *structure) in ib_unpack() argument
172 structure); in ib_unpack()
186 structure); in ib_unpack()
194 memcpy(structure + desc[i].struct_offset_bytes, in ib_unpack()