[U-Boot] [PATCH] This patch clears the errors found my running checkpatch.pl on file drivers/spi/fsl_espi.c

Chakra Divi cdivi at openedev.com
Sun Jun 14 19:33:51 CEST 2015


Signed-off-by: Chakra Divi <cdivi at openedev.com>
---
 drivers/spi/fsl_espi.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 375dc07..9d9a6e0 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -92,11 +92,12 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 		pm = spibrg / (max_hz * 16 * 2);
 		if (pm > 16) {
 			pm = 16;
-			debug("Requested speed is too low: %d Hz, %ld Hz "
-				"is used.\n", max_hz, spibrg / (32 * 16));
+			debug("Requested speed is too low: %d Hz, %ld Hz
+				is used.\n", max_hz, spibrg / (32 * 16));
 		}
-	} else
+	} else {
 		pm = spibrg / (max_hz * 2);
+	}
 	if (pm)
 		pm--;
 	fsl->pm = pm;
@@ -121,7 +122,7 @@ void spi_free_slave(struct spi_slave *slave)
 
 void spi_init(void)
 {
-
+	; /* Do nothing */
 }
 
 int spi_claim_bus(struct spi_slave *slave)
@@ -177,7 +178,7 @@ int spi_claim_bus(struct spi_slave *slave)
 
 void spi_release_bus(struct spi_slave *slave)
 {
-
+	; /* Do nothing */
 }
 
 static void fsl_espi_tx(struct fsl_spi_slave *fsl, const void *dout)
@@ -264,7 +265,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *data_out,
 	max_tran_len = fsl->max_transfer_length;
 	switch (flags) {
 	case SPI_XFER_BEGIN:
-		cmd_len = fsl->cmd_len = data_len;
+		fsl->cmd_len = data_len;
+		cmd_len = fsl->cmd_len;
 		memcpy(cmd_buf, data_out, cmd_len);
 		return 0;
 	case 0:
-- 
1.7.9.5



More information about the U-Boot mailing list