spi: orion: Let spi core handle validating transfer length
Subsystems (3)
PATCH 1/3 spi: orion: Let spi core handle validating transfer length
spi core will handle validating transfer length since commit 4d94bd21b333 "spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.
--- drivers/spi/spi-orion.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/spi/spi-orion.c +0 -11
@@ -295,17 +295,6 @@ static int orion_spi_transfer_one_message(struct spi_master *master, goto msg_done;list_for_each_entry (t, &m->transfers, transfer_list) { -/* make sure buffer length is even when working in 16 -* bit mode*/ -if ((t->bits_per_word ==16 ) && (t->len &1 )) { -dev_err (&spi->dev, -"message rejected : " -"odd data length %d while in 16 bit mode\n" , - t->len); - status = -EIO ; - goto msg_done; - } -if (par_override || t->speed_hz || t->bits_per_word) { par_override =1 ; status =orion_spi_setup_transfer (spi, t);
Signature · 8 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/3 spi: s3c64xx: Let spi core handle validating transfer length
spi core will handle validating transfer length since commit 4d94bd21b333 "spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.
--- drivers/spi/spi-s3c64xx.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/spi/spi-s3c64xx.c +0 -7
@@ -697,13 +697,6 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, bpw = xfer->bits_per_word; speed = xfer->speed_hz ? : spi->max_speed_hz; -if (xfer->len % (bpw /8 )) { -dev_err (&spi->dev, -"Xfer length(%u) not a multiple of word size(%u)\n" , - xfer->len, bpw /8 ); -return -EIO ; - } -if (bpw != sdd->cur_bpw || speed != sdd->cur_speed) { sdd->cur_bpw = bpw; sdd->cur_speed = speed;
Signature · 8 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedRe: [PATCH 2/3] spi: s3c64xx: Let spi core handle validating transfer length
Quoted 3 lines · Axel Lin
spi core will handle validating transfer length since commit
4d94bd21b333"spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.
Applied, thanks.
PATCH 3/3 spi: txx9: Let spi core handle validating transfer length
In reply to Axel Linspi core will handle validating transfer length since commit 4d94bd21b333 "spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.
--- drivers/spi/spi-txx9.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/spi/spi-txx9.c +0 -4
@@ -306,12 +306,8 @@ static int txx9spi_transfer(struct spi_device *spi, struct spi_message *m)/* check each transfer's parameters */ list_for_each_entry (t, &m->transfers, transfer_list) { -u8 bits_per_word = t->bits_per_word; -if (!t->tx_buf && !t->rx_buf && t->len)return -EINVAL ; -if (t->len & ((bits_per_word >>3 ) -1 )) -return -EINVAL ; }spin_lock_irqsave (&c->lock, flags);
Signature · 8 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] spi: txx9: Let spi core handle validating transfer length
Quoted 7 lines · Axel Lin
spi core will handle validating transfer length since commit
4d94bd21b333"spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.Signed-off-by Axel Lin <[email protected]>--- drivers/spi/spi-txx9.c | 4 ----
Thank you. It looks good for me.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedRe: [PATCH 3/3] spi: txx9: Let spi core handle validating transfer length
In reply to Axel LinQuoted 3 lines · Axel Lin
spi core will handle validating transfer length since commit
4d94bd21b333"spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.
Applied, thanks.
Mark Brown
AppliedQuoted 3 lines · Axel Lin
spi core will handle validating transfer length since commit
4d94bd21b333"spi: core: Validate length of the transfers in message".
So remove the same checking in this driver.
Applied, thanks.