Revision a1e9185d20b56af04022d2e656802254f4ea47eb authored by Linus Torvalds on 02 December 2022, 23:40:35 UTC, committed by Linus Torvalds on 02 December 2022, 23:40:35 UTC
Pull sound fixes from Takashi Iwai:
 "Likely the last piece for 6.1; the only significant fixes are ASoC
  core ops fixes, while others are device-specific (rather minor) fixes
  in ASoC and FireWire drivers.

  All appear safe enough to take as a late stage material"

* tag 'sound-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: dice: fix regression for Lexicon I-ONIX FW810S
  ASoC: cs42l51: Correct PGA Volume minimum value
  ASoC: ops: Correct bounds check for second channel on SX controls
  ASoC: tlv320adc3xxx: Fix build error for implicit function declaration
  ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()
  ASoC: ops: Fix bounds check for _sx controls
  ASoC: fsl_micfil: explicitly clear CHnF flags
  ASoC: fsl_micfil: explicitly clear software reset bit
2 parent s c290db0 + b47068b
Raw File
btree-128.h
/* SPDX-License-Identifier: GPL-2.0 */
extern struct btree_geo btree_geo128;

struct btree_head128 { struct btree_head h; };

static inline void btree_init_mempool128(struct btree_head128 *head,
					 mempool_t *mempool)
{
	btree_init_mempool(&head->h, mempool);
}

static inline int btree_init128(struct btree_head128 *head)
{
	return btree_init(&head->h);
}

static inline void btree_destroy128(struct btree_head128 *head)
{
	btree_destroy(&head->h);
}

static inline void *btree_lookup128(struct btree_head128 *head, u64 k1, u64 k2)
{
	u64 key[2] = {k1, k2};
	return btree_lookup(&head->h, &btree_geo128, (unsigned long *)&key);
}

static inline void *btree_get_prev128(struct btree_head128 *head,
				      u64 *k1, u64 *k2)
{
	u64 key[2] = {*k1, *k2};
	void *val;

	val = btree_get_prev(&head->h, &btree_geo128,
			     (unsigned long *)&key);
	*k1 = key[0];
	*k2 = key[1];
	return val;
}

static inline int btree_insert128(struct btree_head128 *head, u64 k1, u64 k2,
				  void *val, gfp_t gfp)
{
	u64 key[2] = {k1, k2};
	return btree_insert(&head->h, &btree_geo128,
			    (unsigned long *)&key, val, gfp);
}

static inline int btree_update128(struct btree_head128 *head, u64 k1, u64 k2,
				  void *val)
{
	u64 key[2] = {k1, k2};
	return btree_update(&head->h, &btree_geo128,
			    (unsigned long *)&key, val);
}

static inline void *btree_remove128(struct btree_head128 *head, u64 k1, u64 k2)
{
	u64 key[2] = {k1, k2};
	return btree_remove(&head->h, &btree_geo128, (unsigned long *)&key);
}

static inline void *btree_last128(struct btree_head128 *head, u64 *k1, u64 *k2)
{
	u64 key[2];
	void *val;

	val = btree_last(&head->h, &btree_geo128, (unsigned long *)&key[0]);
	if (val) {
		*k1 = key[0];
		*k2 = key[1];
	}

	return val;
}

static inline int btree_merge128(struct btree_head128 *target,
				 struct btree_head128 *victim,
				 gfp_t gfp)
{
	return btree_merge(&target->h, &victim->h, &btree_geo128, gfp);
}

void visitor128(void *elem, unsigned long opaque, unsigned long *__key,
		size_t index, void *__func);

typedef void (*visitor128_t)(void *elem, unsigned long opaque,
			     u64 key1, u64 key2, size_t index);

static inline size_t btree_visitor128(struct btree_head128 *head,
				      unsigned long opaque,
				      visitor128_t func2)
{
	return btree_visitor(&head->h, &btree_geo128, opaque,
			     visitor128, func2);
}

static inline size_t btree_grim_visitor128(struct btree_head128 *head,
					   unsigned long opaque,
					   visitor128_t func2)
{
	return btree_grim_visitor(&head->h, &btree_geo128, opaque,
				  visitor128, func2);
}

#define btree_for_each_safe128(head, k1, k2, val)	\
	for (val = btree_last128(head, &k1, &k2);	\
	     val;					\
	     val = btree_get_prev128(head, &k1, &k2))

back to top