lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 14 Jun 2024 14:55:31 +0200
From: Takashi Iwai <tiwai@...e.de>
To: bo liu <bo.liu@...arytech.com>
Cc: perex@...ex.cz,
	tiwai@...e.com,
	linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3] ALSA: hda/senarytech: add senarytech codec support

On Fri, 14 Jun 2024 05:16:30 +0200,
bo liu wrote:
> 
> +static void senary_auto_parse_eapd(struct hda_codec *codec)
> +{
> +	struct senary_spec *spec = codec->spec;
> +	hda_nid_t nid;
> +
> +	for_each_hda_codec_node(nid, codec) {
> +		if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN)
> +			continue;
> +		if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD))
> +			continue;
> +		spec->eapds[spec->num_eapds++] = nid;
> +		if (spec->num_eapds >= ARRAY_SIZE(spec->eapds))
> +			break;
> +	}
> +
> +	/* chips always have more than two EAPDs, we can control EAPD per pin. */
> +	spec->dynamic_eapd = 1;

So it's a fixed value, and we can drop this flag and the
conditionals.  Let's clean up the code.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ