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>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 10 Nov 2017 17:28:31 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     "Jeremy Cline" <jeremy@...ine.org>
Cc:     "Liam Girdwood" <lgirdwood@...il.com>,
        "Mark Brown" <broonie@...nel.org>, <alsa-devel@...a-project.org>,
        "Jaroslav Kysela" <perex@...ex.cz>,
        "Hans de Goede" <hdegoede@...hat.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present

On Fri, 10 Nov 2017 17:20:50 +0100,
Jeremy Cline wrote:
>  struct snd_soc_acpi_mach *
>  snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
>  {
>  	struct snd_soc_acpi_mach *mach;
>  
>  	for (mach = machines; mach->id[0]; mach++) {
> -		if (snd_soc_acpi_check_hid(mach->id) == true) {
> +		if (acpi_dev_present(mach->id, NULL, -1) == true) {

"== true" is redundant.  Just use a style
		if (acpi_dev_present(...)) {

You don't need to follow the original code style.


> @@ -163,7 +135,7 @@ struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
>  		return mach;
>  
>  	for (i = 0; i < codec_list->num_codecs; i++) {
> -		if (snd_soc_acpi_check_hid(codec_list->codecs[i]) != true)
> +		if (acpi_dev_present(codec_list->codecs[i], NULL, -1) != true)

Ditto, use
		if (!acpi_dev_present(...))


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ