Lines Matching refs:val

155  * @val: value whose bytes to swap.
161 static inline uint16_t bswap_16(uint16_t val)
163 return ((val & (uint16_t)0x00ffU) << 8)
164 | ((val & (uint16_t)0xff00U) >> 8);
169 * @val: value whose bytes to swap.
175 static inline uint32_t bswap_32(uint32_t val)
177 return ((val & (uint32_t)0x000000ffUL) << 24)
178 | ((val & (uint32_t)0x0000ff00UL) << 8)
179 | ((val & (uint32_t)0x00ff0000UL) >> 8)
180 | ((val & (uint32_t)0xff000000UL) >> 24);
187 * @val: value whose bytes to swap.
194 static inline uint64_t bswap_64(uint64_t val)
196 return ((val & (uint64_t)0x00000000000000ffULL) << 56)
197 | ((val & (uint64_t)0x000000000000ff00ULL) << 40)
198 | ((val & (uint64_t)0x0000000000ff0000ULL) << 24)
199 | ((val & (uint64_t)0x00000000ff000000ULL) << 8)
200 | ((val & (uint64_t)0x000000ff00000000ULL) >> 8)
201 | ((val & (uint64_t)0x0000ff0000000000ULL) >> 24)
202 | ((val & (uint64_t)0x00ff000000000000ULL) >> 40)
203 | ((val & (uint64_t)0xff00000000000000ULL) >> 56);
581 #define set_sb_le64(member, val) (sb->member = cpu_to_le64(val))
582 #define set_sb_le32(member, val) (sb->member = cpu_to_le32(val))
583 #define set_sb_le16(member, val) (sb->member = cpu_to_le16(val))
591 #define set_sb(member, val) \
593 typeof(sb->member) t = (val); \
622 #define set_cp_le64(member, val) (cp->member = cpu_to_le64(val))
623 #define set_cp_le32(member, val) (cp->member = cpu_to_le32(val))
624 #define set_cp_le16(member, val) (cp->member = cpu_to_le16(val))
629 #define set_cp(member, val) \
631 typeof(cp->member) t = (val); \
1616 #define SIZE_ALIGN(val, size) (((val) + (size) - 1) / (size))