linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/6] spi: Remove the use of dev_err_probe()
@ 2025-08-19  9:20 Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 1/6] spi: spi_amd: " Xichao Zhao
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Xichao Zhao @ 2025-08-19  9:20 UTC (permalink / raw)
  To: Raju Rangoju, Mark Brown, Sunny Luo, Xianwei Zhao, Conor Dooley,
	Daire McNamara, Matthias Brugger, AngeloGioacchino Del Regno,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Andi Shyti,
	Tudor Ambarus, Krzysztof Kozlowski, Alim Akhtar,
	open list:AMD SPI DRIVER, open list,
	open list:AMLOGIC SPISG DRIVER,
	open list:RISC-V MICROCHIP FPGA SUPPORT,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support,
	open list:SAMSUNG SPI DRIVERS
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Xichao Zhao (6):
  spi: spi_amd: Remove the use of dev_err_probe()
  spi: SPISG: Remove the use of dev_err_probe()
  spi: Remove the use of dev_err_probe()
  spi: mt65xx: Remove the use of dev_err_probe()
  spi: pxa2xx: Remove the use of dev_err_probe()
  spi: s3c64xx: Remove the use of dev_err_probe()

 drivers/spi/spi-amd-pci.c             | 5 ++---
 drivers/spi/spi-amd.c                 | 2 +-
 drivers/spi/spi-amlogic-spisg.c       | 2 +-
 drivers/spi/spi-microchip-core-qspi.c | 3 +--
 drivers/spi/spi-microchip-core.c      | 3 +--
 drivers/spi/spi-mt65xx.c              | 2 +-
 drivers/spi/spi-pxa2xx.c              | 2 +-
 drivers/spi/spi-s3c64xx.c             | 3 +--
 8 files changed, 9 insertions(+), 13 deletions(-)

-- 
2.34.1


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

* [PATCH v1 1/6] spi: spi_amd: Remove the use of dev_err_probe()
  2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
@ 2025-08-19  9:20 ` Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 2/6] spi: SPISG: " Xichao Zhao
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Xichao Zhao @ 2025-08-19  9:20 UTC (permalink / raw)
  To: Raju Rangoju, Mark Brown, open list:AMD SPI DRIVER, open list; +Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/spi/spi-amd-pci.c | 5 ++---
 drivers/spi/spi-amd.c     | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-amd-pci.c b/drivers/spi/spi-amd-pci.c
index e5faab414c17..d48c3a5da303 100644
--- a/drivers/spi/spi-amd-pci.c
+++ b/drivers/spi/spi-amd-pci.c
@@ -38,7 +38,7 @@ static int amd_spi_pci_probe(struct pci_dev *pdev,
 	/* Allocate storage for host and driver private data */
 	host = devm_spi_alloc_host(dev, sizeof(struct amd_spi));
 	if (!host)
-		return dev_err_probe(dev, -ENOMEM, "Error allocating SPI host\n");
+		return -ENOMEM;
 
 	amd_spi = spi_controller_get_devdata(host);
 
@@ -47,8 +47,7 @@ static int amd_spi_pci_probe(struct pci_dev *pdev,
 	amd_spi->io_remap_addr = devm_ioremap(dev, io_base_addr, AMD_HID2_MEM_SIZE);
 
 	if (!amd_spi->io_remap_addr)
-		return dev_err_probe(dev, -ENOMEM,
-				"ioremap of SPI registers failed\n");
+		return -ENOMEM;
 
 	dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr);
 
diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index 02e7fe095a0b..4d1dce4f4974 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -857,7 +857,7 @@ static int amd_spi_probe(struct platform_device *pdev)
 	/* Allocate storage for host and driver private data */
 	host = devm_spi_alloc_host(dev, sizeof(struct amd_spi));
 	if (!host)
-		return dev_err_probe(dev, -ENOMEM, "Error allocating SPI host\n");
+		return -ENOMEM;
 
 	amd_spi = spi_controller_get_devdata(host);
 	amd_spi->io_remap_addr = devm_platform_ioremap_resource(pdev, 0);
-- 
2.34.1


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

* [PATCH v1 2/6] spi: SPISG: Remove the use of dev_err_probe()
  2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 1/6] spi: spi_amd: " Xichao Zhao
@ 2025-08-19  9:20 ` Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 3/6] spi: " Xichao Zhao
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Xichao Zhao @ 2025-08-19  9:20 UTC (permalink / raw)
  To: Sunny Luo, Xianwei Zhao, Mark Brown,
	open list:AMLOGIC SPISG DRIVER, open list:AMLOGIC SPISG DRIVER,
	open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/spi/spi-amlogic-spisg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
index 2ab8bdf2a676..d1d5f3114fa8 100644
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -733,7 +733,7 @@ static int aml_spisg_probe(struct platform_device *pdev)
 	else
 		ctlr = spi_alloc_host(dev, sizeof(*spisg));
 	if (!ctlr)
-		return dev_err_probe(dev, -ENOMEM, "controller allocation failed\n");
+		return -ENOMEM;
 
 	spisg = spi_controller_get_devdata(ctlr);
 	spisg->controller = ctlr;
-- 
2.34.1


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

* [PATCH v1 3/6] spi: Remove the use of dev_err_probe()
  2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 1/6] spi: spi_amd: " Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 2/6] spi: SPISG: " Xichao Zhao
@ 2025-08-19  9:20 ` Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 4/6] spi: mt65xx: " Xichao Zhao
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Xichao Zhao @ 2025-08-19  9:20 UTC (permalink / raw)
  To: Conor Dooley, Daire McNamara, Mark Brown,
	open list:RISC-V MICROCHIP FPGA SUPPORT, open list:SPI SUBSYSTEM,
	open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/spi/spi-microchip-core-qspi.c | 3 +--
 drivers/spi/spi-microchip-core.c      | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-microchip-core-qspi.c b/drivers/spi/spi-microchip-core-qspi.c
index d13a9b755c7f..0a6f65c77eac 100644
--- a/drivers/spi/spi-microchip-core-qspi.c
+++ b/drivers/spi/spi-microchip-core-qspi.c
@@ -701,8 +701,7 @@ static int mchp_coreqspi_probe(struct platform_device *pdev)
 
 	ctlr = devm_spi_alloc_host(&pdev->dev, sizeof(*qspi));
 	if (!ctlr)
-		return dev_err_probe(&pdev->dev, -ENOMEM,
-				     "unable to allocate host for QSPI controller\n");
+		return -ENOMEM;
 
 	qspi = spi_controller_get_devdata(ctlr);
 	platform_set_drvdata(pdev, qspi);
diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index 62ba0bd9cbb7..9128b86c5366 100644
--- a/drivers/spi/spi-microchip-core.c
+++ b/drivers/spi/spi-microchip-core.c
@@ -534,8 +534,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
 
 	host = devm_spi_alloc_host(&pdev->dev, sizeof(*spi));
 	if (!host)
-		return dev_err_probe(&pdev->dev, -ENOMEM,
-				     "unable to allocate host for SPI controller\n");
+		return -ENOMEM;
 
 	platform_set_drvdata(pdev, host);
 
-- 
2.34.1


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

* [PATCH v1 4/6] spi: mt65xx: Remove the use of dev_err_probe()
  2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
                   ` (2 preceding siblings ...)
  2025-08-19  9:20 ` [PATCH v1 3/6] spi: " Xichao Zhao
@ 2025-08-19  9:20 ` Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 5/6] spi: pxa2xx: " Xichao Zhao
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Xichao Zhao @ 2025-08-19  9:20 UTC (permalink / raw)
  To: Mark Brown, Matthias Brugger, AngeloGioacchino Del Regno,
	open list:SPI SUBSYSTEM, open list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/spi/spi-mt65xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index a6032d44771b..8a3c00c3af42 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -1159,7 +1159,7 @@ static int mtk_spi_probe(struct platform_device *pdev)
 
 	host = devm_spi_alloc_host(dev, sizeof(*mdata));
 	if (!host)
-		return dev_err_probe(dev, -ENOMEM, "failed to alloc spi host\n");
+		return -ENOMEM;
 
 	host->auto_runtime_pm = true;
 	host->dev.of_node = dev->of_node;
-- 
2.34.1


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

* [PATCH v1 5/6] spi: pxa2xx: Remove the use of dev_err_probe()
  2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
                   ` (3 preceding siblings ...)
  2025-08-19  9:20 ` [PATCH v1 4/6] spi: mt65xx: " Xichao Zhao
@ 2025-08-19  9:20 ` Xichao Zhao
  2025-08-19  9:20 ` [PATCH v1 6/6] spi: s3c64xx: " Xichao Zhao
  2025-08-19 18:52 ` [PATCH v1 0/6] spi: " Mark Brown
  6 siblings, 0 replies; 9+ messages in thread
From: Xichao Zhao @ 2025-08-19  9:20 UTC (permalink / raw)
  To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Mark Brown,
	moderated list:PXA2xx/PXA3xx SUPPORT, open list:SPI SUBSYSTEM,
	open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/spi/spi-pxa2xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 06711a62fa3d..ec7117a94d5f 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1283,7 +1283,7 @@ int pxa2xx_spi_probe(struct device *dev, struct ssp_device *ssp,
 	else
 		controller = devm_spi_alloc_host(dev, sizeof(*drv_data));
 	if (!controller)
-		return dev_err_probe(dev, -ENOMEM, "cannot alloc spi_controller\n");
+		return -ENOMEM;
 
 	drv_data = spi_controller_get_devdata(controller);
 	drv_data->controller = controller;
-- 
2.34.1


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

* [PATCH v1 6/6] spi: s3c64xx: Remove the use of dev_err_probe()
  2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
                   ` (4 preceding siblings ...)
  2025-08-19  9:20 ` [PATCH v1 5/6] spi: pxa2xx: " Xichao Zhao
@ 2025-08-19  9:20 ` Xichao Zhao
  2025-08-19 10:00   ` Tudor Ambarus
  2025-08-19 18:52 ` [PATCH v1 0/6] spi: " Mark Brown
  6 siblings, 1 reply; 9+ messages in thread
From: Xichao Zhao @ 2025-08-19  9:20 UTC (permalink / raw)
  To: Andi Shyti, Tudor Ambarus, Mark Brown, Krzysztof Kozlowski,
	Alim Akhtar, open list:SAMSUNG SPI DRIVERS,
	open list:SAMSUNG SPI DRIVERS,
	moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES,
	open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/spi/spi-s3c64xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index b1567243ae19..3a00f9e480c5 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1268,8 +1268,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 
 	host = devm_spi_alloc_host(&pdev->dev, sizeof(*sdd));
 	if (!host)
-		return dev_err_probe(&pdev->dev, -ENOMEM,
-				     "Unable to allocate SPI Host\n");
+		return -ENOMEM;
 
 	platform_set_drvdata(pdev, host);
 
-- 
2.34.1


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

* Re: [PATCH v1 6/6] spi: s3c64xx: Remove the use of dev_err_probe()
  2025-08-19  9:20 ` [PATCH v1 6/6] spi: s3c64xx: " Xichao Zhao
@ 2025-08-19 10:00   ` Tudor Ambarus
  0 siblings, 0 replies; 9+ messages in thread
From: Tudor Ambarus @ 2025-08-19 10:00 UTC (permalink / raw)
  To: Xichao Zhao, Andi Shyti, Mark Brown, Krzysztof Kozlowski,
	Alim Akhtar, open list:SAMSUNG SPI DRIVERS,
	open list:SAMSUNG SPI DRIVERS,
	moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES,
	open list



On 8/19/25 10:20 AM, Xichao Zhao wrote:
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
> remove the useless call to dev_err_probe(), and just return the value instead.
> 
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>

> ---
>  drivers/spi/spi-s3c64xx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index b1567243ae19..3a00f9e480c5 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -1268,8 +1268,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
>  
>  	host = devm_spi_alloc_host(&pdev->dev, sizeof(*sdd));
>  	if (!host)
> -		return dev_err_probe(&pdev->dev, -ENOMEM,
> -				     "Unable to allocate SPI Host\n");
> +		return -ENOMEM;
>  
>  	platform_set_drvdata(pdev, host);
>  


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

* Re: [PATCH v1 0/6] spi: Remove the use of dev_err_probe()
  2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
                   ` (5 preceding siblings ...)
  2025-08-19  9:20 ` [PATCH v1 6/6] spi: s3c64xx: " Xichao Zhao
@ 2025-08-19 18:52 ` Mark Brown
  6 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2025-08-19 18:52 UTC (permalink / raw)
  To: Raju Rangoju, Sunny Luo, Xianwei Zhao, Conor Dooley,
	Daire McNamara, Matthias Brugger, AngeloGioacchino Del Regno,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Andi Shyti,
	Tudor Ambarus, Krzysztof Kozlowski, Alim Akhtar, linux-spi,
	linux-kernel, linux-amlogic, linux-riscv, linux-arm-kernel,
	linux-mediatek, linux-samsung-soc, Xichao Zhao

On Tue, 19 Aug 2025 17:20:37 +0800, Xichao Zhao wrote:
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
> remove the useless call to dev_err_probe(), and just return the value instead.
> 
> Xichao Zhao (6):
>   spi: spi_amd: Remove the use of dev_err_probe()
>   spi: SPISG: Remove the use of dev_err_probe()
>   spi: Remove the use of dev_err_probe()
>   spi: mt65xx: Remove the use of dev_err_probe()
>   spi: pxa2xx: Remove the use of dev_err_probe()
>   spi: s3c64xx: Remove the use of dev_err_probe()
> 
> [...]

Applied to

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

Thanks!

[1/6] spi: spi_amd: Remove the use of dev_err_probe()
      commit: 2a5d410916d3a8dcac06f72494f252314e933cfb
[2/6] spi: SPISG: Remove the use of dev_err_probe()
      commit: 0d00ebc6b869f4df67c05522bc1e8d01d1c7daa7
[3/6] spi: Remove the use of dev_err_probe()
      commit: b875b97017050b92c64273178a0b0d282ea67874
[4/6] spi: mt65xx: Remove the use of dev_err_probe()
      commit: 2bee48c9d1cd1749922d0e2df54330c924e14a0e
[5/6] spi: pxa2xx: Remove the use of dev_err_probe()
      commit: 67259af78219bdbdea00491f32b1c0971a33401e
[6/6] spi: s3c64xx: Remove the use of dev_err_probe()
      commit: 27848c082ba0b22850fd9fb7b185c015423dcdc7

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] 9+ messages in thread

end of thread, other threads:[~2025-08-19 18:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19  9:20 [PATCH v1 0/6] spi: Remove the use of dev_err_probe() Xichao Zhao
2025-08-19  9:20 ` [PATCH v1 1/6] spi: spi_amd: " Xichao Zhao
2025-08-19  9:20 ` [PATCH v1 2/6] spi: SPISG: " Xichao Zhao
2025-08-19  9:20 ` [PATCH v1 3/6] spi: " Xichao Zhao
2025-08-19  9:20 ` [PATCH v1 4/6] spi: mt65xx: " Xichao Zhao
2025-08-19  9:20 ` [PATCH v1 5/6] spi: pxa2xx: " Xichao Zhao
2025-08-19  9:20 ` [PATCH v1 6/6] spi: s3c64xx: " Xichao Zhao
2025-08-19 10:00   ` Tudor Ambarus
2025-08-19 18:52 ` [PATCH v1 0/6] spi: " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).