From: Shih-Yuan Lee <fourdollars@debian.org>
To: Mark Brown <broonie@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Lukas Wunner <lukas@wunner.de>, Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Shih-Yuan Lee <fourdollars@debian.org>
Subject: [PATCH v16 7/7] spi: pxa2xx: rename local status variable to ret
Date: Tue, 21 Jul 2026 00:21:16 +0800 [thread overview]
Message-ID: <20260720162117.32304-8-fourdollars@debian.org> (raw)
In-Reply-To: <20260720162117.32304-1-fourdollars@debian.org>
Rename the return value variable name from 'status' to 'ret' in the
pxa2xx_spi_probe(), pxa2xx_spi_suspend(), pxa2xx_spi_resume(), and
pxa2xx_spi_runtime_resume() functions to conform to standard Linux kernel
coding conventions.
Signed-off-by: Shih-Yuan Lee <fourdollars@debian.org>
---
drivers/spi/spi-pxa2xx.c | 66 +++++++++++++++++++---------------------
1 file changed, 32 insertions(+), 34 deletions(-)
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 851626ead25e..9379aac82c7a 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1313,7 +1313,7 @@ int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp,
struct spi_controller *controller;
struct driver_data *drv_data;
const struct lpss_config *config;
- int status;
+ int ret;
u32 tmp;
if (platform_info->is_target)
@@ -1372,8 +1372,8 @@ int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp,
/* Setup DMA if requested */
if (platform_info->enable_dma) {
- status = pxa2xx_spi_dma_setup(drv_data);
- if (status) {
+ ret = pxa2xx_spi_dma_setup(drv_data);
+ if (ret) {
dev_warn(dev, "no DMA channels available, using PIO\n");
platform_info->enable_dma = false;
} else {
@@ -1387,16 +1387,16 @@ int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp,
}
/* Enable SOC clock */
- status = pxa2xx_spi_clk_enable(drv_data);
- if (status)
+ ret = pxa2xx_spi_clk_enable(drv_data);
+ if (ret)
goto out_error_dma_alloc;
drv_data->suspended = false;
- status = request_irq(ssp->irq, ssp_int, IRQF_SHARED, dev_name(dev),
+ ret = request_irq(ssp->irq, ssp_int, IRQF_SHARED, dev_name(dev),
drv_data);
- if (status < 0) {
- status = dev_err_probe(dev, status, "cannot get IRQ %d\n", ssp->irq);
+ if (ret < 0) {
+ ret = dev_err_probe(dev, ret, "cannot get IRQ %d\n", ssp->irq);
goto out_error_clock_enabled;
}
@@ -1477,23 +1477,23 @@ int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp,
drv_data->gpiod_ready = devm_gpiod_get_optional(dev,
"ready", GPIOD_OUT_LOW);
if (IS_ERR(drv_data->gpiod_ready)) {
- status = PTR_ERR(drv_data->gpiod_ready);
+ ret = PTR_ERR(drv_data->gpiod_ready);
goto out_error_irq_alloc;
}
}
/* Register with the SPI framework */
dev_set_drvdata(dev, drv_data);
- status = spi_register_controller(controller);
- if (status) {
- dev_err_probe(dev, status, "problem registering SPI controller\n");
+ ret = spi_register_controller(controller);
+ if (ret) {
+ dev_err_probe(dev, ret, "problem registering SPI controller\n");
goto out_error_irq_alloc;
}
if (is_lpss_ssp(drv_data) && !platform_info->enable_dma)
pm_runtime_get_noresume(dev);
- return status;
+ return ret;
out_error_irq_alloc:
free_irq(ssp->irq, drv_data);
@@ -1504,7 +1504,7 @@ int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp,
out_error_dma_alloc:
pxa2xx_spi_dma_release(drv_data);
- return status;
+ return ret;
}
EXPORT_SYMBOL_NS_GPL(pxa2xx_spi_probe, "SPI_PXA2xx");
@@ -1547,15 +1547,14 @@ static int pxa2xx_spi_suspend(struct device *dev)
{
struct driver_data *drv_data = dev_get_drvdata(dev);
struct ssp_device *ssp = drv_data->ssp;
- int status;
-
- status = pm_runtime_resume_and_get(dev);
- if (status < 0)
- return status;
+ int ret;
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret < 0)
+ return ret;
- status = spi_controller_suspend(drv_data->controller);
- if (status)
+ ret = spi_controller_suspend(drv_data->controller);
+ if (ret)
goto out_put;
/* Disable SSP interrupt generation on hardware level while clock is active */
@@ -1586,19 +1585,19 @@ static int pxa2xx_spi_suspend(struct device *dev)
out_put:
pm_runtime_put_noidle(dev);
- return status;
+ return ret;
}
static int pxa2xx_spi_resume(struct device *dev)
{
struct driver_data *drv_data = dev_get_drvdata(dev);
struct ssp_device *ssp = drv_data->ssp;
- int status;
+ int ret;
/* Enable the SSP clock */
if (!pm_runtime_suspended(dev)) {
- status = pxa2xx_spi_clk_enable(drv_data);
- if (status)
+ ret = pxa2xx_spi_clk_enable(drv_data);
+ if (ret)
goto out_put;
}
@@ -1643,8 +1642,8 @@ static int pxa2xx_spi_resume(struct device *dev)
drv_data->suspended = false;
/* Start the queue running */
- status = spi_controller_resume(drv_data->controller);
- if (status) {
+ ret = spi_controller_resume(drv_data->controller);
+ if (ret) {
drv_data->suspended = true;
synchronize_irq(ssp->irq);
pxa2xx_spi_clk_disable(drv_data);
@@ -1653,7 +1652,7 @@ static int pxa2xx_spi_resume(struct device *dev)
out_put:
if (!pm_runtime_suspended(dev)) {
- if (status)
+ if (ret)
/*
* Clock is already disabled on the error path; align
* the PM runtime state with hardware reality before
@@ -1665,8 +1664,7 @@ static int pxa2xx_spi_resume(struct device *dev)
pm_runtime_put_noidle(dev);
}
- return status;
-
+ return ret;
}
static int pxa2xx_spi_runtime_suspend(struct device *dev)
@@ -1683,11 +1681,11 @@ static int pxa2xx_spi_runtime_suspend(struct device *dev)
static int pxa2xx_spi_runtime_resume(struct device *dev)
{
struct driver_data *drv_data = dev_get_drvdata(dev);
- int status;
+ int ret;
- status = pxa2xx_spi_clk_enable(drv_data);
- if (status)
- return status;
+ ret = pxa2xx_spi_clk_enable(drv_data);
+ if (ret)
+ return ret;
drv_data->suspended = false;
return 0;
--
2.39.5
next prev parent reply other threads:[~2026-07-20 16:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 16:21 [PATCH v16 0/7] spi: pxa2xx: Fix PM and interrupt issues on Intel LPSS SPI Shih-Yuan Lee
2026-07-20 16:21 ` [PATCH v16 1/7] spi: pxa2xx: introduce clock enable and disable helper functions Shih-Yuan Lee
2026-07-20 19:22 ` Andy Shevchenko
2026-07-20 16:21 ` [PATCH v16 2/7] spi: pxa2xx: introduce suspended flag for interrupt synchronization Shih-Yuan Lee
2026-07-20 17:18 ` Mark Brown
2026-07-20 16:21 ` [PATCH v16 3/7] spi: pxa2xx: overhaul teardown and suspend sequence using pxa2xx_spi_off Shih-Yuan Lee
2026-07-20 19:53 ` Andy Shevchenko
2026-07-20 16:21 ` [PATCH v16 4/7] spi: pxa2xx: lock out runtime autosuspend for Intel LPSS SPI in PIO mode Shih-Yuan Lee
2026-07-20 19:55 ` Andy Shevchenko
2026-07-20 16:21 ` [PATCH v16 5/7] spi: pxa2xx: disable DMA for Apple MacBook8,1 Shih-Yuan Lee
2026-07-20 19:27 ` Andy Shevchenko
2026-07-21 14:49 ` Shih-Yuan Lee (FourDollars)
2026-07-21 9:00 ` Lukas Wunner
2026-07-21 9:26 ` Shih-Yuan Lee (FourDollars)
2026-07-21 14:34 ` Shih-Yuan Lee (FourDollars)
2026-07-21 15:05 ` Mark Brown
2026-07-21 15:26 ` Shih-Yuan Lee (FourDollars)
2026-07-21 16:09 ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 6/7] spi: pxa2xx: restore LPSS private register state on S3 resume Shih-Yuan Lee
2026-07-20 19:59 ` Andy Shevchenko
2026-07-20 16:21 ` Shih-Yuan Lee [this message]
2026-07-20 19:56 ` [PATCH v16 7/7] spi: pxa2xx: rename local status variable to ret 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=20260720162117.32304-8-fourdollars@debian.org \
--to=fourdollars@debian.org \
--cc=andriy.shevchenko@intel.com \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=robert.jarzmik@free.fr \
/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