Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Philipp Stanner <phasta@kernel.org>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Damien Le Moal <dlemoal@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	sound-open-firmware@alsa-project.org
Subject: Re: [PATCH v2 2/4] ASoC: intel/avs: Use pure devres PCI
Date: Thu, 24 Apr 2025 12:21:57 +0200	[thread overview]
Message-ID: <ebf0ccd0-9429-43b6-b56b-73feeb856593@linux.intel.com> (raw)
In-Reply-To: <20250423082858.49780-4-phasta@kernel.org>



On 2025-04-23 10:28, Philipp Stanner wrote:
> pci_request_regions() is a hybrid function which becomes managed if
> pcim_enable_device() was called before. This hybrid nature is deprecated
> and should not be used anymore.
> 
> Replace pci_request_regions() with the always-managed function
> pcim_request_all_regions().
> 
> Remove the goto jump to pci_release_regions(), since pcim_ functions
> clean up automatically.
> 
> Signed-off-by: Philipp Stanner <phasta@kernel.org>
> ---
>   sound/soc/intel/avs/core.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
> index 8fbf33e30dfc..dafe46973146 100644
> --- a/sound/soc/intel/avs/core.c
> +++ b/sound/soc/intel/avs/core.c
> @@ -445,7 +445,7 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
>   		return ret;
>   	}
>   
> -	ret = pci_request_regions(pci, "AVS HDAudio");
> +	ret = pcim_request_all_regions(pci, "AVS HDAudio");
>   	if (ret < 0)
>   		return ret;
>   
> @@ -454,8 +454,7 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
>   	bus->remap_addr = pci_ioremap_bar(pci, 0);
>   	if (!bus->remap_addr) {
>   		dev_err(bus->dev, "ioremap error\n");
> -		ret = -ENXIO;
> -		goto err_remap_bar0;
> +		return -ENXIO;
>   	}
>   
>   	adev->dsp_ba = pci_ioremap_bar(pci, 4);
> @@ -512,8 +511,6 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
>   	iounmap(adev->dsp_ba);
>   err_remap_bar4:
>   	iounmap(bus->remap_addr);
> -err_remap_bar0:
> -	pci_release_regions(pci);

Hm... shouldn't we also drop call to pci_release_regions() in 
avs_pci_remove()?

>   	return ret;
>   }
>   

Nitpick: If there will be v2, can you also align title with how it 
usually is in this directory:
ASoC: Intel: avs: Use pure devres PCI


  reply	other threads:[~2025-04-24 10:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  8:28 [PATCH v2 0/4] AsoC: Phase out hybrid PCI devres Philipp Stanner
2025-04-23  8:28 ` [PATCH v2 1/4] ASoC: sof: Use pure devres PCI Philipp Stanner
2025-04-23  8:28 ` [PATCH v2 2/4] ASoC: intel/avs: " Philipp Stanner
2025-04-24 10:21   ` Amadeusz Sławiński [this message]
2025-04-24 11:33     ` Philipp Stanner
2025-04-23  8:28 ` [PATCH v2 3/4] AsoC: intel/atom: " Philipp Stanner
2025-04-23  8:28 ` [PATCH v2 4/4] AsoC: intel/atom: Return -ENOMEM if pcim_iomap() fails Philipp Stanner
2025-04-23 12:28   ` Cezary Rojewski
2025-04-23 12:33 ` [PATCH v2 0/4] AsoC: Phase out hybrid PCI devres Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebf0ccd0-9429-43b6-b56b-73feeb856593@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=daniel.baluta@nxp.com \
    --cc=dlemoal@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=phasta@kernel.org \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox