public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase()
@ 2025-04-23 19:31 Gabor Juhos
  2025-04-24  7:00 ` Abel Vesa
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gabor Juhos @ 2025-04-23 19:31 UTC (permalink / raw)
  To: Mark Brown, Sricharan Ramabadhran, Varadarajan Narayanan,
	Md Sadre Alam
  Cc: linux-spi, linux-arm-msm, linux-mtd, linux-kernel, Gabor Juhos

The qcom_spi_block_erase() function returns with error in case of
failure. Change the qcom_spi_send_cmdaddr() function to propagate
these errors to the callers instead of returning with success.

Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
 drivers/spi/spi-qpic-snand.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
index 17eb67e19132612c4c1a84848fa6f7432b1130a8..ae32c452d0bcf852b69b76e595f3588ea7e1a670 100644
--- a/drivers/spi/spi-qpic-snand.c
+++ b/drivers/spi/spi-qpic-snand.c
@@ -1307,8 +1307,7 @@ static int qcom_spi_send_cmdaddr(struct qcom_nand_controller *snandc,
 		snandc->qspi->addr1 = cpu_to_le32(s_op.addr1_reg << 16);
 		snandc->qspi->addr2 = cpu_to_le32(s_op.addr2_reg);
 		snandc->qspi->cmd = cpu_to_le32(cmd);
-		qcom_spi_block_erase(snandc);
-		return 0;
+		return qcom_spi_block_erase(snandc);
 	default:
 		break;
 	}

---
base-commit: 9c32cda43eb78f78c73aee4aa344b777714e259b
change-id: 20250422-qpic-snand-propagate-error-9c95811ab811

Best regards,
-- 
Gabor Juhos <j4g8y7@gmail.com>


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase()
  2025-04-23 19:31 [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase() Gabor Juhos
@ 2025-04-24  7:00 ` Abel Vesa
  2025-04-24 11:31 ` Md Sadre Alam
  2025-04-25 12:17 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Abel Vesa @ 2025-04-24  7:00 UTC (permalink / raw)
  To: Gabor Juhos
  Cc: Mark Brown, Sricharan Ramabadhran, Varadarajan Narayanan,
	Md Sadre Alam, linux-spi, linux-arm-msm, linux-mtd, linux-kernel

On 25-04-23 21:31:57, Gabor Juhos wrote:
> The qcom_spi_block_erase() function returns with error in case of
> failure. Change the qcom_spi_send_cmdaddr() function to propagate
> these errors to the callers instead of returning with success.
> 
> Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>

Reviewed-by: Abel Vesa <abel.vesa@linaro.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase()
  2025-04-23 19:31 [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase() Gabor Juhos
  2025-04-24  7:00 ` Abel Vesa
@ 2025-04-24 11:31 ` Md Sadre Alam
  2025-04-25 12:17 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Md Sadre Alam @ 2025-04-24 11:31 UTC (permalink / raw)
  To: Gabor Juhos, Mark Brown, Sricharan Ramabadhran,
	Varadarajan Narayanan
  Cc: linux-spi, linux-arm-msm, linux-mtd, linux-kernel



On 4/24/2025 1:01 AM, Gabor Juhos wrote:
> The qcom_spi_block_erase() function returns with error in case of
> failure. Change the qcom_spi_send_cmdaddr() function to propagate
> these errors to the callers instead of returning with success.
> 
> Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> ---
>   drivers/spi/spi-qpic-snand.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
> index 17eb67e19132612c4c1a84848fa6f7432b1130a8..ae32c452d0bcf852b69b76e595f3588ea7e1a670 100644
> --- a/drivers/spi/spi-qpic-snand.c
> +++ b/drivers/spi/spi-qpic-snand.c
> @@ -1307,8 +1307,7 @@ static int qcom_spi_send_cmdaddr(struct qcom_nand_controller *snandc,
>   		snandc->qspi->addr1 = cpu_to_le32(s_op.addr1_reg << 16);
>   		snandc->qspi->addr2 = cpu_to_le32(s_op.addr2_reg);
>   		snandc->qspi->cmd = cpu_to_le32(cmd);
> -		qcom_spi_block_erase(snandc);
> -		return 0;
> +		return qcom_spi_block_erase(snandc);
>   	default:
>   		break;
>   	}
> 
> ---
> base-commit: 9c32cda43eb78f78c73aee4aa344b777714e259b
> change-id: 20250422-qpic-snand-propagate-error-9c95811ab811

Reviewed-by: Md Sadre Alam <quic_mdalam@quicinc.com>

> Best regards,

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase()
  2025-04-23 19:31 [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase() Gabor Juhos
  2025-04-24  7:00 ` Abel Vesa
  2025-04-24 11:31 ` Md Sadre Alam
@ 2025-04-25 12:17 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2025-04-25 12:17 UTC (permalink / raw)
  To: Sricharan Ramabadhran, Varadarajan Narayanan, Md Sadre Alam,
	Gabor Juhos
  Cc: linux-spi, linux-arm-msm, linux-mtd, linux-kernel

On Wed, 23 Apr 2025 21:31:57 +0200, Gabor Juhos wrote:
> The qcom_spi_block_erase() function returns with error in case of
> failure. Change the qcom_spi_send_cmdaddr() function to propagate
> these errors to the callers instead of returning with success.
> 
> 

Applied to

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

Thanks!

[1/1] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase()
      commit: 722a6ad4867ce8c4cb131a3371d0b5389a75dee0

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


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2025-04-25 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 19:31 [PATCH] spi: spi-qpic-snand: propagate errors from qcom_spi_block_erase() Gabor Juhos
2025-04-24  7:00 ` Abel Vesa
2025-04-24 11:31 ` Md Sadre Alam
2025-04-25 12:17 ` Mark Brown

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