]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: airoha: remove unnecessary restriction length
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Sun, 12 Oct 2025 12:16:53 +0000 (15:16 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 17 Oct 2025 12:30:45 +0000 (13:30 +0100)
The "length < 160" restriction is not needed because airoha_snand_write_data()
and airoha_snand_read_data() will properly handle data transfers above
SPI_MAX_TRANSFER_SIZE.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20251012121707.2296160-3-mikhail.kshevetskiy@iopsys.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-airoha-snfi.c

index b78163eaed61d40563a81db5ad79c158c33c1742..3d3233c525dff0b2489fc42a94567cdab9ca70d6 100644 (file)
@@ -619,13 +619,6 @@ static int airoha_snand_adjust_op_size(struct spi_mem *mem,
 
                if (op->data.nbytes > max_len)
                        op->data.nbytes = max_len;
-       } else {
-               max_len = 1 + op->addr.nbytes + op->dummy.nbytes;
-               if (max_len >= 160)
-                       return -EOPNOTSUPP;
-
-               if (op->data.nbytes > 160 - max_len)
-                       op->data.nbytes = 160 - max_len;
        }
 
        return 0;