[PATCH] spi-gpio: SPI_MASTER_NO_RX bit tested twice, missing SPI_MASTER_NO_TX?

2010-10-02 Thread Roel Kluin
The SPI_MASTER_NO_TX bit (can't do buffer write) wasn't tested. Signed-off-by: Roel Kluin --- drivers/spi/spi_gpio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Is this what was intended? diff --git a/drivers/spi/spi_gpio.c b/drivers/spi/spi_gpio.c index e24a63

[spi-devel-general] [PATCH] spi: Should error status be negative?

2009-11-11 Thread Roel Kluin
Return a negative error value instead of a positive Signed-off-by: Roel Kluin --- drivers/spi/spi_stmp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) is this maybe required? diff --git a/drivers/spi/spi_stmp.c b/drivers/spi/spi_stmp.c index d871dc2..2552bb3 100644 --- a/drivers

[spi-devel-general] [PATCH] spi: size of a pointer to determine the size of the pointed-to type

2009-06-08 Thread Roel Kluin
Do not take the size of a pointer to determine the size of the pointed-to type Signed-off-by: Roel Kluin --- This wasn't tested, please review. diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index f4573a9..a32ccb4 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/driver

[spi-devel-general] [PATCH] spi_bfin5xx: flush() returns -1 when no stop and clear stat was found

2009-06-03 Thread Roel Kluin
urns -1. Signed-off-by: Roel Kluin --- diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index f014cc2..ada9b54 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -169,8 +169,10 @@ static int bfin_spi_flush(struct driver_data *drv_data)

[spi-devel-general] [PATCH] spi_bfin5xx: limit reaches -1

2009-04-16 Thread Roel Kluin
bfin_spi_flush() returns limit, which reaches -1 upon timeout. but in function bfin_spi_pump_transfers() it is compared with 0. Signed-off-by: Roel Kluin --- diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index f014cc2..6545b0c 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b

Re: [spi-devel-general] [PATCH] spi: limit reaches -1, tested 0

2009-02-08 Thread Roel Kluin
Mariusz Ceier wrote: > Roel Kluin writes in first post: >> -while ((read(drv_data) == 0) && limit--); >> +while ((read(drv_data) == 0) && --limit); > > Roel Kluin writes in last post: >> -

Re: [spi-devel-general] pxa2xx_spi: spi_bfin5xx: limit reaches -1 rather than 0

2009-02-08 Thread roel kluin
2009/2/8 David Brownell : > On Sunday 08 February 2009, Roel Kluin wrote: >> vi drivers/spi/pxa2xx_spi.c +919 >> vi drivers/spi/spi_bfin5xx.c +645 >> >> if (flush(drv_data) == 0) { >> dev_err(&drv_data->pdev-&

Re: [spi-devel-general] [PATCH] spi: limit reaches -1, tested 0

2009-02-08 Thread Roel Kluin
of an empty statement. Ok, >8---8<- With a postfix decrement limit will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin --- diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c

[spi-devel-general] [PATCH v2] pxa2xx_spi: spi_bfin5xx: limit reaches -1 rather than 0

2009-02-08 Thread Roel Kluin
rs/spi/pxa2xx_spi.c:511: if (wait_dma_channel_stop(drv_data->rx_channel) == 0) But with a postfix decrement limit reaches -1 rather than 0. Signed-off-by: Roel Kluin --- Sorry, I didn't catch two the first time drivers/spi/pxa2xx_spi.c |6 +++--- drivers/spi/spi_bfin5xx.c |2 +- 2 files

[spi-devel-general] pxa2xx_spi: spi_bfin5xx: limit reaches -1 rather than 0

2009-02-08 Thread Roel Kluin
return; } But with a postfix decrement limit reaches -1 rather than 0. Signed-off-by: Roel Kluin --- drivers/spi/pxa2xx_spi.c |2 +- drivers/spi/spi_bfin5xx.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa

[spi-devel-general] [PATCH] spi: limit reaches -1, tested 0

2009-02-08 Thread Roel Kluin
With a postfix decrement limit will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin --- diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 269a55e..a4652f1 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -779,7 +779,7 @@ static

[spi-devel-general] [PATCH] spi: limit reaches -1, tested 0

2009-01-31 Thread Roel Kluin
With a postfix decrement limit will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin --- diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 269a55e..a4652f1 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -779,7 +779,7 @@ static

[spi-devel-general] [PATCH] spi documentation: __initdata on struct

2008-10-14 Thread roel kluin
use __initdata for data, not __init Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary index 8bae2f0..0f5122e 100644 --- a/Documentation/spi/spi-summary +++ b/Documentation/spi/spi-summary @@ -215,7 +215,7 @@ So for e

[spi-devel-general] [PATCH 2/2 v2] xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe()

2008-04-24 Thread Roel Kluin
Joe Perches wrote: > On Wed, 2008-04-23 at 22:55 +0200, Roel Kluin wrote: >> -xspi->irq = platform_get_irq(dev, 0); >> -if (xspi->irq < 0) { >> -ret = -ENXIO; >> +ret = platform_get_irq(dev, 0); >> +

[spi-devel-general] [PATCH 2/2] xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe()

2008-04-23 Thread Roel Kluin
similarly, --- xilinx_spi->irq is unsigned, so the test fails Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index cf6aef3..613db82 100644 --- a/drivers/spi/xilinx_spi.c +++ b/drivers/spi/xilinx_spi.c @@ -353,11 +353,12

[spi-devel-general] [PATCH 1/2] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

2008-04-23 Thread Roel Kluin
mpc83xx_spi->irq is unsigned, so the test fails Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index be15a62..033fd51 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -454,12 +454,12 @@ s

[spi-devel-general] [PATCH] mcp23s08: check read_regs() retval

2008-04-16 Thread Roel Kluin
The return value of mcp23s08_read_regs() can only be evaluated when signed Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> --- diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c index bb60e8c..0eef8b8 100644 --- a/drivers/gpio/mcp23s08.c +++ b/drivers/gpio/mcp23s08.c @@ -168,7