Message ID | 1393327183.6723.5.camel@phoenix (mailing list archive) |
---|---|
State | Accepted |
Commit | f8c717a567158cdd703b39118eec20cfffdcf585 |
Headers | show |
On Tue, 25 Feb 2014 19:19:43 +0800, Axel Lin <axel.lin@ingics.com> wrote: > 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 <axel.lin@ingics.com> > --- > drivers/spi/spi-txx9.c | 4 ---- Thank you. It looks good for me. Reviewed-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Feb 25, 2014 at 07:19:43PM +0800, Axel Lin wrote: > 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.
diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c index 523f13d..b5f5dc8 100644 --- a/drivers/spi/spi-txx9.c +++ b/drivers/spi/spi-txx9.c @@ -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);
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 <axel.lin@ingics.com> --- drivers/spi/spi-txx9.c | 4 ---- 1 file changed, 4 deletions(-)