From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Haotian Zhang <vulab@iscas.ac.cn>,
hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86/intel/speed_select_if: Convert PCIBIOS_* return codes to errnos
Date: Mon, 17 Nov 2025 09:30:09 -0800 [thread overview]
Message-ID: <7383cdac5f30f374ee928fdb9b4f5d6e97e93607.camel@linux.intel.com> (raw)
In-Reply-To: <20251117033354.132-1-vulab@iscas.ac.cn>
On Mon, 2025-11-17 at 11:33 +0800, Haotian Zhang wrote:
> isst_if_probe() uses pci_read_config_dword() that returns PCIBIOS_*
> codes. The return code is returned from the probe function as is but
> probe functions should return normal errnos. A proper implementation
> can be found in drivers/leds/leds-ss4200.c.
>
> Convert PCIBIOS_* return codes using pcibios_err_to_errno() into
> normal errno before returning.
>
> Fixes: d3a23584294c ("platform/x86: ISST: Add Intel Speed Select mmio
> interface")
> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
> a/drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c
> b/drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c
> index 3f4343147dad..950ede5eab76 100644
> --- a/drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c
> +++ b/drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c
> @@ -108,11 +108,11 @@ static int isst_if_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
>
> ret = pci_read_config_dword(pdev, 0xD0, &mmio_base);
> if (ret)
> - return ret;
> + return pcibios_err_to_errno(ret);
>
> ret = pci_read_config_dword(pdev, 0xFC, &pcu_base);
> if (ret)
> - return ret;
> + return pcibios_err_to_errno(ret);
>
> pcu_base &= GENMASK(10, 0);
> base_addr = (u64)mmio_base << 23 | (u64) pcu_base << 12;
next prev parent reply other threads:[~2025-11-17 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 3:33 [PATCH] platform/x86/intel/speed_select_if: Convert PCIBIOS_* return codes to errnos Haotian Zhang
2025-11-17 17:30 ` srinivas pandruvada [this message]
2025-11-18 8:11 ` Ilpo Järvinen
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=7383cdac5f30f374ee928fdb9b4f5d6e97e93607.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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