Lines Matching refs:b
118 #define get_input_data(p, o, b) \ argument
119 be##b##_to_cpu(get_unaligned((__be##b *)((p)->in + (o))))
121 #define init_hashtable_nodes(p, b) do { \ argument
123 hash_init((p)->htable##b); \
124 for (_i = 0; _i < ARRAY_SIZE((p)->node##b); _i++) { \
125 (p)->node##b[_i].index = _i; \
126 (p)->node##b[_i].data = 0; \
127 INIT_HLIST_NODE(&(p)->node##b[_i].node); \
131 #define find_index(p, b, n) ({ \ argument
132 struct sw842_hlist_node##b *_n; \
133 p->index##b[n] = INDEX_NOT_FOUND; \
134 hash_for_each_possible(p->htable##b, _n, node, p->data##b[n]) { \
135 if (p->data##b[n] == _n->data) { \
136 p->index##b[n] = _n->index; \
140 p->index##b[n] >= 0; \
143 #define check_index(p, b, n) \ argument
144 ((p)->index##b[n] == INDEX_NOT_CHECKED \
145 ? find_index(p, b, n) \
146 : (p)->index##b[n] >= 0)
148 #define replace_hash(p, b, i, d) do { \ argument
149 struct sw842_hlist_node##b *_n = &(p)->node##b[(i)+(d)]; \
151 _n->data = (p)->data##b[d]; \
152 pr_debug("add hash index%x %x pos %x data %lx\n", b, \
156 hash_add((p)->htable##b, &_n->node, _n->data); \
178 int b = p->bit, bits = b + n, s = round_up(bits, 8) - bits; in add_bits() local
200 o = *out & bmask[b]; in add_bits()
233 int ret, i, b = 0; in add_template() local
251 if (b) in add_template()
261 if (b == 2 && t[i] & OP_ACTION_DATA) in add_template()
263 else if (b != 0 && b != 4) in add_template()
266 ret = add_bits(p, p->index4[b >> 2], I4_BITS); in add_template()
268 ret = add_bits(p, p->data4[b >> 2], 32); in add_template()
273 if (b != 0 && b != 2 && b != 4 && b != 6) in add_template()
276 ret = add_bits(p, p->index2[b >> 1], I2_BITS); in add_template()
278 ret = add_bits(p, p->data2[b >> 1], 16); in add_template()
283 inv = (b != 8) || !(t[i] & OP_ACTION_NOOP); in add_template()
299 b += t[i] & OP_AMOUNT; in add_template()
302 if (b != 8) { in add_template()
304 c, b, t[0], t[1], t[2], t[3]); in add_template()
336 static int add_short_data_template(struct sw842_param *p, u8 b) in add_short_data_template() argument
340 if (!b || b > SHORT_DATA_BITS_MAX) in add_short_data_template()
347 ret = add_bits(p, b, SHORT_DATA_BITS); in add_short_data_template()
351 for (i = 0; i < b; i++) { in add_short_data_template()
392 int i, match, b = 0; in check_template() local
400 match = check_index(p, 2, b >> 1); in check_template()
402 match = check_index(p, 4, b >> 2); in check_template()
411 b += t[i] & OP_AMOUNT; in check_template()