• Home
  • Raw
  • Download

Lines Matching refs:b

109 #define get_input_data(p, o, b)						\  argument
110 be##b##_to_cpu(get_unaligned((__be##b *)((p)->in + (o))))
112 #define init_hashtable_nodes(p, b) do { \ argument
114 hash_init((p)->htable##b); \
115 for (_i = 0; _i < ARRAY_SIZE((p)->node##b); _i++) { \
116 (p)->node##b[_i].index = _i; \
117 (p)->node##b[_i].data = 0; \
118 INIT_HLIST_NODE(&(p)->node##b[_i].node); \
122 #define find_index(p, b, n) ({ \ argument
123 struct sw842_hlist_node##b *_n; \
124 p->index##b[n] = INDEX_NOT_FOUND; \
125 hash_for_each_possible(p->htable##b, _n, node, p->data##b[n]) { \
126 if (p->data##b[n] == _n->data) { \
127 p->index##b[n] = _n->index; \
131 p->index##b[n] >= 0; \
134 #define check_index(p, b, n) \ argument
135 ((p)->index##b[n] == INDEX_NOT_CHECKED \
136 ? find_index(p, b, n) \
137 : (p)->index##b[n] >= 0)
139 #define replace_hash(p, b, i, d) do { \ argument
140 struct sw842_hlist_node##b *_n = &(p)->node##b[(i)+(d)]; \
142 _n->data = (p)->data##b[d]; \
143 pr_debug("add hash index%x %x pos %x data %lx\n", b, \
147 hash_add((p)->htable##b, &_n->node, _n->data); \
169 int b = p->bit, bits = b + n, s = round_up(bits, 8) - bits; in add_bits() local
191 o = *out & bmask[b]; in add_bits()
224 int ret, i, b = 0; in add_template() local
242 if (b) in add_template()
252 if (b == 2 && t[i] & OP_ACTION_DATA) in add_template()
254 else if (b != 0 && b != 4) in add_template()
257 ret = add_bits(p, p->index4[b >> 2], I4_BITS); in add_template()
259 ret = add_bits(p, p->data4[b >> 2], 32); in add_template()
264 if (b != 0 && b != 2 && b != 4 && b != 6) in add_template()
267 ret = add_bits(p, p->index2[b >> 1], I2_BITS); in add_template()
269 ret = add_bits(p, p->data2[b >> 1], 16); in add_template()
274 inv = (b != 8) || !(t[i] & OP_ACTION_NOOP); in add_template()
290 b += t[i] & OP_AMOUNT; in add_template()
293 if (b != 8) { in add_template()
295 c, b, t[0], t[1], t[2], t[3]); in add_template()
327 static int add_short_data_template(struct sw842_param *p, u8 b) in add_short_data_template() argument
331 if (!b || b > SHORT_DATA_BITS_MAX) in add_short_data_template()
338 ret = add_bits(p, b, SHORT_DATA_BITS); in add_short_data_template()
342 for (i = 0; i < b; i++) { in add_short_data_template()
383 int i, match, b = 0; in check_template() local
391 match = check_index(p, 2, b >> 1); in check_template()
393 match = check_index(p, 4, b >> 2); in check_template()
402 b += t[i] & OP_AMOUNT; in check_template()