mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] spi: ti-qspi: three cleanups
@ 2026-11-04 14:08 Felix Gu
  2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

This series contains three small cleanups for drivers/spi/spi-ti-qspi.c.

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Felix Gu (3):
      spi: ti-qspi: Remove unbalanced runtime PM put on removal
      spi: ti-qspi: Abort probe when clock lookup fails
      spi: ti-qspi: Correct runtime PM error message

 drivers/spi/spi-ti-qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97
change-id: 20261104-ti-qspi-183f6801a837

Best regards,
--  
Felix Gu <ustc.gu@gmail.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal
  2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
@ 2026-11-04 14:08 ` Felix Gu
  2026-11-04 14:08 ` [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails Felix Gu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

The driver holds no runtime PM reference to release in remove().
Drop the extra pm_runtime_put_sync() to avoid usage counter underflow.

Fixes: e6b5140b7066 ("spi: ti-qspi: improve ->remove() callback")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-ti-qspi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 6908dc3621fd..0cc8c2d52226 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -913,7 +913,6 @@ static void ti_qspi_remove(struct platform_device *pdev)
 
 	spi_unregister_controller(qspi->host);
 
-	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 	ti_qspi_dma_cleanup(qspi);

-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails
  2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
  2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
@ 2026-11-04 14:08 ` Felix Gu
  2026-11-04 14:08 ` [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message Felix Gu
  2026-11-09 12:35 ` [PATCH 0/3] spi: ti-qspi: three cleanups Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

Return the clock lookup error instead of continuing with an error
pointer that subsequent transfers can pass to clk_get_rate().

Fixes: 505a14954e2d ("spi/qspi: Add qspi flash controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-ti-qspi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 0cc8c2d52226..2026fbcbeb90 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -844,6 +844,7 @@ static int ti_qspi_probe(struct platform_device *pdev)
 	if (IS_ERR(qspi->fclk)) {
 		ret = PTR_ERR(qspi->fclk);
 		dev_err(&pdev->dev, "could not get clk: %d\n", ret);
+		return ret;
 	}
 
 	pm_runtime_use_autosuspend(&pdev->dev);

-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message
  2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
  2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
  2026-11-04 14:08 ` [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails Felix Gu
@ 2026-11-04 14:08 ` Felix Gu
  2026-11-09 12:35 ` [PATCH 0/3] spi: ti-qspi: three cleanups Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Felix Gu @ 2026-11-04 14:08 UTC (permalink / raw)
  To: Mark Brown, Felipe Balbi, Sourav Poddar
  Cc: linux-spi, linux-kernel, Mark Brown, Felix Gu

Update the error message to name pm_runtime_resume_and_get() instead
of the previously used pm_runtime_get_sync().

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-ti-qspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 2026fbcbeb90..c9fc0bf4b8fc 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -154,7 +154,7 @@ static int ti_qspi_setup(struct spi_device *spi)
 
 	ret = pm_runtime_resume_and_get(qspi->dev);
 	if (ret < 0) {
-		dev_err(qspi->dev, "pm_runtime_get_sync() failed\n");
+		dev_err(qspi->dev, "pm_runtime_resume_and_get() failed\n");
 		return ret;
 	}
 

-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] spi: ti-qspi: three cleanups
  2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
                   ` (2 preceding siblings ...)
  2026-11-04 14:08 ` [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message Felix Gu
@ 2026-11-09 12:35 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-11-09 12:35 UTC (permalink / raw)
  To: Felipe Balbi, Sourav Poddar, Felix Gu; +Cc: linux-spi, linux-kernel, Mark Brown

On Wed, 04 Nov 2026 22:08:09 +0800, Felix Gu wrote:
> spi: ti-qspi: three cleanups
> 
> This series contains three small cleanups for drivers/spi/spi-ti-qspi.c.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.5

Thanks!

[1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal
      https://git.kernel.org/broonie/spi/c/8b8678d3e894
[2/3] spi: ti-qspi: Abort probe when clock lookup fails
      https://git.kernel.org/broonie/spi/c/bcaf60556b8c
[3/3] spi: ti-qspi: Correct runtime PM error message
      https://git.kernel.org/broonie/spi/c/ee961969cfe9

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-09 19:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 14:08 [PATCH 0/3] spi: ti-qspi: three cleanups Felix Gu
2026-11-04 14:08 ` [PATCH 1/3] spi: ti-qspi: Remove unbalanced runtime PM put on removal Felix Gu
2026-11-04 14:08 ` [PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails Felix Gu
2026-11-04 14:08 ` [PATCH 3/3] spi: ti-qspi: Correct runtime PM error message Felix Gu
2026-11-09 12:35 ` [PATCH 0/3] spi: ti-qspi: three cleanups Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®