From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Philipp Stanner <phasta@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
sound-open-firmware@alsa-project.org,
"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>,
"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
"Charles Keepax" <ckeepax@opensource.cirrus.com>,
"Damien Le Moal" <dlemoal@kernel.org>
Subject: Re: [PATCH v2 4/4] AsoC: intel/atom: Return -ENOMEM if pcim_iomap() fails
Date: Wed, 23 Apr 2025 14:28:24 +0200 [thread overview]
Message-ID: <7e856661-e7ad-4571-b033-8aba83239a78@intel.com> (raw)
In-Reply-To: <20250423082858.49780-6-phasta@kernel.org>
On 2025-04-23 10:28 AM, Philipp Stanner wrote:
> The error checks for pcim_iomap() have the function return -EINVAL.
> -ENOMEM is a more appropriate error code.
>
> Replace -EINVAL with -ENOMEM.
Nitpicks:
I believe the last sentence is redundant, the title and the message say
it all.
Next, the suggest scope for the atom-driver is: 'ASoC: Intel: atom:'.
> Signed-off-by: Philipp Stanner <phasta@kernel.org>
> ---
> sound/soc/intel/atom/sst/sst_pci.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/sound/soc/intel/atom/sst/sst_pci.c b/sound/soc/intel/atom/sst/sst_pci.c
> index eadcf24cbdc3..edc86519816d 100644
> --- a/sound/soc/intel/atom/sst/sst_pci.c
> +++ b/sound/soc/intel/atom/sst/sst_pci.c
> @@ -49,7 +49,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
>
> ctx->ddr = pcim_iomap(pci, 0, 0);
> if (!ctx->ddr)
> - return -EINVAL;
> + return -ENOMEM;
>
> dev_dbg(ctx->dev, "sst: DDR Ptr %p\n", ctx->ddr);
> } else {
> @@ -59,7 +59,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
> ctx->shim_phy_add = pci_resource_start(pci, 1);
> ctx->shim = pcim_iomap(pci, 1, 0);
> if (!ctx->shim)
> - return -EINVAL;
> + return -ENOMEM;
>
> dev_dbg(ctx->dev, "SST Shim Ptr %p\n", ctx->shim);
>
> @@ -67,7 +67,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
> ctx->mailbox_add = pci_resource_start(pci, 2);
> ctx->mailbox = pcim_iomap(pci, 2, 0);
> if (!ctx->mailbox)
> - return -EINVAL;
> + return -ENOMEM;
>
> dev_dbg(ctx->dev, "SRAM Ptr %p\n", ctx->mailbox);
>
> @@ -76,7 +76,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
> ctx->iram_base = pci_resource_start(pci, 3);
> ctx->iram = pcim_iomap(pci, 3, 0);
> if (!ctx->iram)
> - return -EINVAL;
> + return -ENOMEM;
>
> dev_dbg(ctx->dev, "IRAM Ptr %p\n", ctx->iram);
>
> @@ -85,7 +85,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
> ctx->dram_base = pci_resource_start(pci, 4);
> ctx->dram = pcim_iomap(pci, 4, 0);
> if (!ctx->dram)
> - return -EINVAL;
> + return -ENOMEM;
>
> dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram);
> return 0;
Hi Philipp,
Thanks for the patch, this is certainly an additional effort, on top of
the pcim_xxx one. Couple of nitpicks above but nothing major. Regardless
if you decide to address them or not, feel free to add:
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
next prev parent reply other threads:[~2025-04-23 12:28 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
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 [this message]
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=7e856661-e7ad-4571-b033-8aba83239a78@intel.com \
--to=cezary.rojewski@intel.com \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.