Skip to contentSkip to conversation

spi: armada100_spi: Remove unnecessary NULL test for dout and din

PATCH In review Axel Lin 5 participants 6 messages Jun 11, 2013 – Jun 13, 2013 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: armada100_spi: Remove unnecessary NULL test for dout and din

---
 drivers/spi/armada100_spi.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/spi/armada100_spi.c +2 -9
index afdbe05..b237c7c 100644
@@ -182,15 +182,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
 		goto done;
 	}
 
-	if (dout)
-		pss->tx = dout;
-	else
-		pss->tx = NULL;
-
-	if (din)
-		pss->rx = din;
-	else
-		pss->rx = NULL;
+	pss->tx = dout;
+	pss->rx = din;
 
 	if (flags & SPI_XFER_BEGIN) {
 		spi_cs_activate(slave);
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 spi: armada100_spi: Remove unnecessary NULL test for dout and din

Quoted 2 lines · Axel Lin
Quoted 33 lines
---
 drivers/spi/armada100_spi.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/spi/armada100_spi.c +2 -9
index afdbe05..b237c7c 100644
@@ -182,15 +182,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int
 bitlen, const void *dout,
                goto done;
        }
 
-       if (dout)
-               pss->tx = dout;
-       else
-               pss->tx = NULL;
-
-       if (din)
-               pss->rx = din;
-       else
-               pss->rx = NULL;
+       pss->tx = dout;
+       pss->rx = din;
 
        if (flags & SPI_XFER_BEGIN) {
                spi_cs_activate(slave);

--
1.8.1.2

#3 lore raw

PATCH 1/1 spi: armada100_spi: Remove unnecessary NULL test for dout and din

Quoted 10 lines · ----- "Marek Vasut

Dear Simon Glass,

Quoted 1 line

On Tue, Jun 11, 2013 at 6:57 AM, Axel Lin <[email protected]>

Quoted 3 lines · wrote:
Quoted 1 line

Regards,
Ajay Bhargav

---------------------------------------------------------------------------------------------
Notice:
This message has been scanned by Trend Micro Mail Security scanner and is believed to be clean
---------------------------------------------------------------------------------------------

#4 lore raw

PATCH 1/1 spi: armada100_spi: Remove unnecessary NULL test for dout and din

Quoted 15 lines · Ajay Bhargav
Quoted 10 lines · ----- "Marek Vasut

Dear Simon Glass,

Quoted 1 line

On Tue, Jun 11, 2013 at 6:57 AM, Axel Lin <[email protected]>

Quoted 3 lines · wrote:
Quoted 1 line
Quoted 8 lines

Regards,
Ajay Bhargav

---------------------------------------------------------------------------------------------
Notice:
This message has been scanned by Trend Micro Mail Security scanner and is believed to be clean
---------------------------------------------------------------------------------------------

--
Thanks,
Jagan.

#5 lore raw
In reply to Axel Lin
Quoted 22 lines · Axel Lin

---
drivers/spi/armada100_spi.c | 11 ++---------

  1 file changed, 2 insertions(+), 9 deletions(-)
drivers/spi/armada100_spi.c +0 -4
index afdbe05..b237c7c 100644
@@ -182,15 +182,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
  		goto done;
  	}
 
-	if (dout)
-		pss->tx = dout;
-	else
-		pss->tx = NULL;

drivers/spi/armada100_spi.c int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, · line 189

Quoted 10 lines
drivers/spi/armada100_spi.c +2 -5
-
-	if (din)
-		pss->rx = din;
-	else
-		pss->rx = NULL;
+	pss->tx = dout;
+	pss->rx = din;
 
  	if (flags & SPI_XFER_BEGIN) {
  		spi_cs_activate(slave);

Applied to u-boot-spi/master

--
Thanks,
Jagan.