public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chakra Divi <cdivi@openedev.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] spi: fsl_espi.c: fix checkpatch.pl erorrs/warnings
Date: Sun, 14 Jun 2015 23:03:50 +0530	[thread overview]
Message-ID: <1434303231-5130-1-git-send-email-cdivi@openedev.com> (raw)

This patch clears the errors found by running checkpatch.pl on file drivers/spi/fsl_espi.c

Signed-off-by: Chakra Divi <cdivi@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

             reply	other threads:[~2015-06-14 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-14 17:33 Chakra Divi [this message]
2015-06-14 17:33 ` [U-Boot] [PATCH] This patch clears the errors found my running checkpatch.pl on file drivers/spi/fsl_espi.c Chakra Divi
2015-06-16 11:00 ` [U-Boot] [PATCH] spi: fsl_espi.c: fix checkpatch.pl erorrs/warnings Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434303231-5130-1-git-send-email-cdivi@openedev.com \
    --to=cdivi@openedev.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox