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:   Tue, 01 Feb 2022 08:11:24 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        LKML <linux-kernel@...r.kernel.org>,
        Linux ACPI <linux-acpi@...r.kernel.org>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH] sound: Replace acpi_bus_get_device()

On Wed, 26 Jan 2022 20:48:49 +0100,
Rafael J. Wysocki wrote:
> 
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Replace acpi_bus_get_device() that is going to be dropped with
> acpi_fetch_acpi_dev().
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Thanks, applied now to for-linus branch.

Mark, JFYI, this touches an ASoC code slightly, too.


Takashi

> ---
>  sound/hda/intel-sdw-acpi.c |    7 +++----
>  sound/soc/soc-acpi.c       |    7 ++-----
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> Index: linux-pm/sound/hda/intel-sdw-acpi.c
> ===================================================================
> --- linux-pm.orig/sound/hda/intel-sdw-acpi.c
> +++ linux-pm/sound/hda/intel-sdw-acpi.c
> @@ -50,11 +50,11 @@ static bool is_link_enabled(struct fwnod
>  static int
>  sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
>  {
> -	struct acpi_device *adev;
> +	struct acpi_device *adev = acpi_fetch_acpi_dev(info->handle);
>  	int ret, i;
>  	u8 count;
>  
> -	if (acpi_bus_get_device(info->handle, &adev))
> +	if (!adev)
>  		return -EINVAL;
>  
>  	/* Found controller, find links supported */
> @@ -119,7 +119,6 @@ static acpi_status sdw_intel_acpi_cb(acp
>  				     void *cdata, void **return_value)
>  {
>  	struct sdw_intel_acpi_info *info = cdata;
> -	struct acpi_device *adev;
>  	acpi_status status;
>  	u64 adr;
>  
> @@ -127,7 +126,7 @@ static acpi_status sdw_intel_acpi_cb(acp
>  	if (ACPI_FAILURE(status))
>  		return AE_OK; /* keep going */
>  
> -	if (acpi_bus_get_device(handle, &adev)) {
> +	if (!acpi_fetch_acpi_dev(handle)) {
>  		pr_err("%s: Couldn't find ACPI handle\n", __func__);
>  		return AE_NOT_FOUND;
>  	}
> Index: linux-pm/sound/soc/soc-acpi.c
> ===================================================================
> --- linux-pm.orig/sound/soc/soc-acpi.c
> +++ linux-pm/sound/soc/soc-acpi.c
> @@ -55,16 +55,13 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_find_mach
>  static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level,
>  					     void *context, void **ret)
>  {
> -	struct acpi_device *adev;
> +	struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
>  	acpi_status status;
>  	struct snd_soc_acpi_package_context *pkg_ctx = context;
>  
>  	pkg_ctx->data_valid = false;
>  
> -	if (acpi_bus_get_device(handle, &adev))
> -		return AE_OK;
> -
> -	if (adev->status.present && adev->status.functional) {
> +	if (adev && adev->status.present && adev->status.functional) {
>  		struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
>  		union acpi_object  *myobj = NULL;
>  
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ