Skip to content

Commit 6c1ca99

Browse files
juhosgbroonie
authored andcommitted
spi: spi-qpic-snand: use NANDC_STEP_SIZE consistently
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> Reviewed-by: Md Sadre Alam <quic_mdalam@quicinc.com> Link: https://patch.msgid.link/20250525-qpic-snand-nandc_step_size-v1-1-6039e9bfe1c6@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 19272b3 commit 6c1ca99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/spi/spi-qpic-snand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ static int qcom_spi_read_page_ecc(struct qcom_nand_controller *snandc,
835835
int data_size, oob_size;
836836

837837
if (i == (num_cw - 1)) {
838-
data_size = 512 - ((num_cw - 1) << 2);
838+
data_size = NANDC_STEP_SIZE - ((num_cw - 1) << 2);
839839
oob_size = (num_cw << 2) + ecc_cfg->ecc_bytes_hw +
840840
ecc_cfg->spare_bytes;
841841
} else {

0 commit comments

Comments
 (0)