Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-18 Thread Mark Brown
On Tue, Feb 18, 2014 at 08:37:47PM +0100, Gerhard Sittig wrote: > On Tue, Feb 18, 2014 at 09:09 +0900, Mark Brown wrote: > > It seems fairly clear to me - if we're transferring 16 bit words we need > > the transfer to me a multiple of 16 bits and so on? The requirement for > > padding is unclear

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-18 Thread Gerhard Sittig
On Tue, Feb 18, 2014 at 09:09 +0900, Mark Brown wrote: > > On Sun, Feb 16, 2014 at 03:25:12PM +0100, Gerhard Sittig wrote: > > On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: > > > - the total length of the SPI transfer cannot be empty (which I'd > > consider an optimization, not a

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-18 Thread Gerhard Sittig
On Tue, Feb 18, 2014 at 09:09 +0900, Mark Brown wrote: On Sun, Feb 16, 2014 at 03:25:12PM +0100, Gerhard Sittig wrote: On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: - the total length of the SPI transfer cannot be empty (which I'd consider an optimization, not a

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-18 Thread Mark Brown
On Tue, Feb 18, 2014 at 08:37:47PM +0100, Gerhard Sittig wrote: On Tue, Feb 18, 2014 at 09:09 +0900, Mark Brown wrote: It seems fairly clear to me - if we're transferring 16 bit words we need the transfer to me a multiple of 16 bits and so on? The requirement for padding is unclear I have

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-17 Thread Mark Brown
On Sun, Feb 16, 2014 at 03:25:12PM +0100, Gerhard Sittig wrote: > On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: > - the total length of the SPI transfer cannot be empty (which I'd > consider an optimization, not a violation, and may need a > separate discussion) We probably want

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-17 Thread Ivan T. Ivanov
Hi, Please ignore this patch. On Sat, 2014-02-15 at 08:09 +0200, Ivan T. Ivanov wrote: > > + /* > + * SPI transfer length should be multiple of SPI word size > + * where SPI word size should be power-of-two multiple > + */ > + if

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-17 Thread Ivan T. Ivanov
Hi, Please ignore this patch. On Sat, 2014-02-15 at 08:09 +0200, Ivan T. Ivanov wrote: + /* + * SPI transfer length should be multiple of SPI word size + * where SPI word size should be power-of-two multiple + */ + if

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-17 Thread Mark Brown
On Sun, Feb 16, 2014 at 03:25:12PM +0100, Gerhard Sittig wrote: On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: - the total length of the SPI transfer cannot be empty (which I'd consider an optimization, not a violation, and may need a separate discussion) We probably want to

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-16 Thread Ivan T. Ivanov
Hi, On Sun, 2014-02-16 at 15:25 +0100, Gerhard Sittig wrote: > On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: > > > > From: "Ivan T. Ivanov" > > > > SPI transfer lenght should be a power-of-two multiple > > of eight bits. > > Please re-check for "lenght" typos in subjects and

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-16 Thread Gerhard Sittig
On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > SPI transfer lenght should be a power-of-two multiple > of eight bits. Please re-check for "lenght" typos in subjects and commit logs (code comments appear to be correct already). The commit message

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-16 Thread Gerhard Sittig
On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: From: Ivan T. Ivanov iiva...@mm-sol.com SPI transfer lenght should be a power-of-two multiple of eight bits. Please re-check for lenght typos in subjects and commit logs (code comments appear to be correct already). The commit

Re: [PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-16 Thread Ivan T. Ivanov
Hi, On Sun, 2014-02-16 at 15:25 +0100, Gerhard Sittig wrote: On Sat, Feb 15, 2014 at 08:09 +0200, Ivan T. Ivanov wrote: From: Ivan T. Ivanov iiva...@mm-sol.com SPI transfer lenght should be a power-of-two multiple of eight bits. Please re-check for lenght typos in subjects and

[PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-14 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" SPI transfer lenght should be a power-of-two multiple of eight bits. Signed-off-by: Ivan T. Ivanov --- drivers/spi/spi.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index d0b28bb..9bed365 100644 ---

[PATCH v2] spi: core: Validate lenght of the transfers in message

2014-02-14 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com SPI transfer lenght should be a power-of-two multiple of eight bits. Signed-off-by: Ivan T. Ivanov iiva...@mm-sol.com --- drivers/spi/spi.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c