All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] spi: orion: Let spi core handle validating transfer length
@ 2014-02-25 11:16 Axel Lin
  2014-02-25 11:18 ` [PATCH 2/3] spi: s3c64xx: " Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Axel Lin @ 2014-02-25 11:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: Shadi Ammouri, linux-spi-u79uwXL29TY76Z2rM5mHXA

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-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/spi/spi-orion.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index 01bd85f..d018a4a 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -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);
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] spi: s3c64xx: Let spi core handle validating transfer length
  2014-02-25 11:16 [PATCH 1/3] spi: orion: Let spi core handle validating transfer length Axel Lin
@ 2014-02-25 11:18 ` Axel Lin
  2014-02-25 12:27   ` Mark Brown
  2014-02-25 11:19 ` [PATCH 3/3] spi: txx9: " Axel Lin
  2014-03-01  4:52 ` [PATCH 1/3] spi: orion: " Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Axel Lin @ 2014-02-25 11:18 UTC (permalink / raw)
  To: Mark Brown; +Cc: Jaswinder Singh, linux-spi-u79uwXL29TY76Z2rM5mHXA

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-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/spi/spi-s3c64xx.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 9ad5e3e..f19cd97 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -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;
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] spi: txx9: Let spi core handle validating transfer length
  2014-02-25 11:16 [PATCH 1/3] spi: orion: Let spi core handle validating transfer length Axel Lin
  2014-02-25 11:18 ` [PATCH 2/3] spi: s3c64xx: " Axel Lin
@ 2014-02-25 11:19 ` Axel Lin
  2014-02-28 14:13   ` Atsushi Nemoto
  2014-03-01  4:51   ` Mark Brown
  2014-03-01  4:52 ` [PATCH 1/3] spi: orion: " Mark Brown
  2 siblings, 2 replies; 7+ messages in thread
From: Axel Lin @ 2014-02-25 11:19 UTC (permalink / raw)
  To: Mark Brown; +Cc: Atsushi Nemoto, linux-spi-u79uwXL29TY76Z2rM5mHXA

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-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/spi/spi-txx9.c | 4 ----
 1 file changed, 4 deletions(-)

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);
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] spi: s3c64xx: Let spi core handle validating transfer length
  2014-02-25 11:18 ` [PATCH 2/3] spi: s3c64xx: " Axel Lin
@ 2014-02-25 12:27   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-02-25 12:27 UTC (permalink / raw)
  To: Axel Lin; +Cc: Jaswinder Singh, linux-spi-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

On Tue, Feb 25, 2014 at 07:18:29PM +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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] spi: txx9: Let spi core handle validating transfer length
  2014-02-25 11:19 ` [PATCH 3/3] spi: txx9: " Axel Lin
@ 2014-02-28 14:13   ` Atsushi Nemoto
  2014-03-01  4:51   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Atsushi Nemoto @ 2014-02-28 14:13 UTC (permalink / raw)
  To: axel.lin-8E1dMatC8ynQT0dZR+AlfA
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, linux-spi-u79uwXL29TY76Z2rM5mHXA

On Tue, 25 Feb 2014 19:19:43 +0800, Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org> 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-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/spi/spi-txx9.c | 4 ----

Thank you.  It looks good for me.

Reviewed-by: Atsushi Nemoto <anemo-7JcRY8pycbNHfZP73Gtkiw@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] spi: txx9: Let spi core handle validating transfer length
  2014-02-25 11:19 ` [PATCH 3/3] spi: txx9: " Axel Lin
  2014-02-28 14:13   ` Atsushi Nemoto
@ 2014-03-01  4:51   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-03-01  4:51 UTC (permalink / raw)
  To: Axel Lin; +Cc: Atsushi Nemoto, linux-spi-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] spi: orion: Let spi core handle validating transfer length
  2014-02-25 11:16 [PATCH 1/3] spi: orion: Let spi core handle validating transfer length Axel Lin
  2014-02-25 11:18 ` [PATCH 2/3] spi: s3c64xx: " Axel Lin
  2014-02-25 11:19 ` [PATCH 3/3] spi: txx9: " Axel Lin
@ 2014-03-01  4:52 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-03-01  4:52 UTC (permalink / raw)
  To: Axel Lin; +Cc: Shadi Ammouri, linux-spi-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

On Tue, Feb 25, 2014 at 07:16:57PM +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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-01  4:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-25 11:16 [PATCH 1/3] spi: orion: Let spi core handle validating transfer length Axel Lin
2014-02-25 11:18 ` [PATCH 2/3] spi: s3c64xx: " Axel Lin
2014-02-25 12:27   ` Mark Brown
2014-02-25 11:19 ` [PATCH 3/3] spi: txx9: " Axel Lin
2014-02-28 14:13   ` Atsushi Nemoto
2014-03-01  4:51   ` Mark Brown
2014-03-01  4:52 ` [PATCH 1/3] spi: orion: " Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.