public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: phasta@kernel.org
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Jaya Kumar" <jayakumar.alsa@gmail.com>,
	"Clemens Ladisch" <clemens@ladisch.de>,
	"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>,
	"Daniel Baluta" <daniel.baluta@nxp.com>,
	"Colin Ian King" <colin.i.king@gmail.com>,
	"David Rhodes" <drhodes@opensource.cirrus.com>,
	liujing <liujing@cmss.chinamobile.com>,
	"Jerome Brunet" <jbrunet@baylibre.com>,
	"Andres Urian Florez" <andres.emb.sys@gmail.com>,
	"Oswald Buddenhagen" <oswald.buddenhagen@gmx.de>,
	"Thorsten Blum" <thorsten.blum@linux.dev>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Charles Keepax" <ckeepax@opensource.cirrus.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	sound-open-firmware@alsa-project.org
Subject: Re: [PATCH 02/31] ASoC: intel/avs: Use pure devres PCI
Date: Wed, 16 Apr 2025 21:03:59 +0300	[thread overview]
Message-ID: <Z__xD0WcujiT-12-@smile.fi.intel.com> (raw)
In-Reply-To: <d035a74a2c6d53721df8d68fd75f439feb8da4a7.camel@mailbox.org>

On Wed, Apr 16, 2025 at 06:25:52PM +0200, Philipp Stanner wrote:
> On Wed, 2025-04-16 at 18:39 +0300, Andy Shevchenko wrote:
> > On Wed, Apr 16, 2025 at 03:12:12PM +0200, Philipp Stanner wrote:

...

> > >  	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;
> > 
> > Here and everywhere else these can now be converted to
> > dev_err_probe().
> > Are you planning to do so?
> 
> I want to do what's necessary to get PCI in better shape, since that's
> what the GPUs and accelerators we / I care about use :)
> 
> IOW, I want pci_request_regions() removed from here.

Okay!

...

> > >  err_remap_bar4:
> > >  	iounmap(bus->remap_addr);
> > 
> > This looks weird if the driver already is using pcim_enable_device().
> > Doesn't this look to you as an existing bug?
> 
> I looked briefly at it and it doesn't appear like an obvious bug to me
> because the drivers uses the (very old? deprecated?) pci_ioremap_bar().

> In any case the driver doesn't set up any devres callback, so has to
> iounmap() manually.

Okay, so they are using managed and non-managed APIs, but release / error path
ordering is fine. So, false alarm then.

> @Bjorn:
> Any comments on pci_ioremap_bar()? Should we mark that as deprecated?

> > > -err_remap_bar0:
> > > -	pci_release_regions(pci);
> > >  	return ret;

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-04-16 18:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 13:12 [PATCH 00/31] sound: Phase out hybrid PCI devres API Philipp Stanner
2025-04-16 13:12 ` [PATCH 01/31] ASoC: sof: Use pure devres PCI Philipp Stanner
2025-04-16 15:36   ` Andy Shevchenko
2025-04-16 13:12 ` [PATCH 02/31] ASoC: intel/avs: " Philipp Stanner
2025-04-16 15:39   ` Andy Shevchenko
2025-04-16 16:25     ` Philipp Stanner
2025-04-16 18:03       ` Andy Shevchenko [this message]
2025-04-16 13:12 ` [PATCH 03/31] AsoC: intel/atom: " Philipp Stanner
2025-04-16 15:41   ` Andy Shevchenko
2025-04-16 13:12 ` [PATCH 04/31] ALSA: sonicvibes: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 05/31] ALSA: rme96: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 06/31] ALSA: rme32: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 07/31] ALSA: ens1370: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 08/31] ALSA: cmipci: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 09/31] ALSA: via82: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 10/31] ALSA: sis7019: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 11/31] ALSA: intel8x: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 12/31] ALSA: fm801: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 13/31] ALSA: es19x8: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 14/31] ALSA: azt3328: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 15/31] ALSA: als: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 16/31] ALSA: oxygen: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 17/31] ALSA: lx6464es: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 18/31] ALSA: vx222: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 19/31] ALSA: trident: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 20/31] ALSA: rme9652: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 21/31] ALSA: ymfpci: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 22/31] ALSA: riptide: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 23/31] ALSA: nm256: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 24/31] ALSA: ice: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 25/31] ALSA: emu10k1: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 26/31] ALSA: echoaudio: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 27/31] ALSA: cs5535: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 28/31] ALSA: cs46xx: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 29/31] ALSA: ca0106: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 30/31] ALSA: ali5451: " Philipp Stanner
2025-04-16 13:12 ` [PATCH 31/31] ALSA: maestro3: " Philipp Stanner
2025-04-16 15:34 ` [PATCH 00/31] sound: Phase out hybrid PCI devres API Andy Shevchenko
2025-04-16 15:43   ` Andy Shevchenko

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=Z__xD0WcujiT-12-@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=andres.emb.sys@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=clemens@ladisch.de \
    --cc=colin.i.king@gmail.com \
    --cc=daniel.baluta@nxp.com \
    --cc=drhodes@opensource.cirrus.com \
    --cc=helgaas@kernel.org \
    --cc=jayakumar.alsa@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kwilczynski@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=liujing@cmss.chinamobile.com \
    --cc=mingo@kernel.org \
    --cc=oswald.buddenhagen@gmx.de \
    --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=tglx@linutronix.de \
    --cc=thorsten.blum@linux.dev \
    --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