drivers/spi/spi-qpic-snand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Change the qcom_spi_read_page_ecc() function to use NANDC_STEP_SIZE
instead of a magic number while calculating the data size to keep it
consistent with other functions like qcom_spi_program_{raw,ecc,oob}
and qcom_spi_read_cw_{raw,page_oob}.
No functional changes.
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
drivers/spi/spi-qpic-snand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
index fd129650434f0129e24d3bdac7e7c4d5542627e6..037178d6576e82c3f19c3cc2c6c78f056dc488af 100644
--- a/drivers/spi/spi-qpic-snand.c
+++ b/drivers/spi/spi-qpic-snand.c
@@ -821,7 +821,7 @@ static int qcom_spi_read_page_ecc(struct qcom_nand_controller *snandc,
int data_size, oob_size;
if (i == (num_cw - 1)) {
- data_size = 512 - ((num_cw - 1) << 2);
+ data_size = NANDC_STEP_SIZE - ((num_cw - 1) << 2);
oob_size = (num_cw << 2) + ecc_cfg->ecc_bytes_hw +
ecc_cfg->spare_bytes;
} else {
---
base-commit: b00d6864a4c948529dc6ddd2df76bf175bf27c63
change-id: 20250525-qpic-snand-nandc_step_size-5606f4aaeda0
Best regards,
--
Gabor Juhos <j4g8y7@gmail.com>
On Sun, 25 May 2025 16:15:25 +0200, Gabor Juhos wrote:
> Change the qcom_spi_read_page_ecc() function to use NANDC_STEP_SIZE
> instead of a magic number while calculating the data size to keep it
> consistent with other functions like qcom_spi_program_{raw,ecc,oob}
> and qcom_spi_read_cw_{raw,page_oob}.
>
> No functional changes.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: spi-qpic-snand: use NANDC_STEP_SIZE consistently
commit: 6c1ca9928ed48499f75101057079b92072077d44
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
Hi,
On 5/25/2025 7:45 PM, Gabor Juhos wrote:
> Change the qcom_spi_read_page_ecc() function to use NANDC_STEP_SIZE
> instead of a magic number while calculating the data size to keep it
> consistent with other functions like qcom_spi_program_{raw,ecc,oob}
> and qcom_spi_read_cw_{raw,page_oob}.
>
> No functional changes.
>
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> ---
> drivers/spi/spi-qpic-snand.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
> index fd129650434f0129e24d3bdac7e7c4d5542627e6..037178d6576e82c3f19c3cc2c6c78f056dc488af 100644
> --- a/drivers/spi/spi-qpic-snand.c
> +++ b/drivers/spi/spi-qpic-snand.c
> @@ -821,7 +821,7 @@ static int qcom_spi_read_page_ecc(struct qcom_nand_controller *snandc,
> int data_size, oob_size;
>
> if (i == (num_cw - 1)) {
> - data_size = 512 - ((num_cw - 1) << 2);
> + data_size = NANDC_STEP_SIZE - ((num_cw - 1) << 2);
> oob_size = (num_cw << 2) + ecc_cfg->ecc_bytes_hw +
> ecc_cfg->spare_bytes;
> } else {
>
> ---
> base-commit: b00d6864a4c948529dc6ddd2df76bf175bf27c63
> change-id: 20250525-qpic-snand-nandc_step_size-5606f4aaeda0
>
> Best regards,
Reviewed-by: Md Sadre Alam <quic_mdalam@quicinc.com>
© 2016 - 2025 Red Hat, Inc.