spi: fsl_espi.c: fix checkpatch.pl erorrs/warnings
PATCH 1/1 spi: fsl_espi.c: fix checkpatch.pl erorrs/warnings
This patch clears the errors found by running checkpatch.pl on file drivers/spi/fsl_espi.c
--- drivers/spi/fsl_espi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/spi/fsl_espi.c +8 -6
@@ -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 :
Signature · 1 line
1.7.9.5
PATCH 1/1 This patch clears the errors found my running checkpatch.pl on file drivers/spi/fsl_espi.c
--- drivers/spi/fsl_espi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/spi/fsl_espi.c +8 -6
@@ -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 :
Signature · 1 line
1.7.9.5
PATCH 1/1 spi: fsl_espi.c: fix checkpatch.pl erorrs/warnings
In reply to Chakra DiviQuoted 12 lines · Chakra Divi
This patch clears the errors found by running checkpatch.pl on file
drivers/spi/fsl_espi.cSigned-off-by Chakra Divi <[email protected]>--- drivers/spi/fsl_espi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)drivers/spi/fsl_espi.c +0
-0
drivers/spi/fsl_espi.c struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, · line 96
Quoted 7 lines
drivers/spi/fsl_espi.c +2
-2@@ -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));
This is wrong, fires compilation error - check it
Quoted 9 lines
drivers/spi/fsl_espi.c +2
-1} - }else + }else { pm = spibrg / (max_hz *2 ); + }if (pm) pm--; fsl->pm = pm;
drivers/spi/fsl_espi.c void spi_free_slave(struct spi_slave *slave) · line 125
Quoted 5 lines
drivers/spi/fsl_espi.c +1
-1@@ -121,7 +122,7 @@ void spi_free_slave(struct spi_slave *slave)void spi_init (void ) { - + ;/* Do nothing */
Adding comment is enough - ; may not require.
drivers/spi/fsl_espi.c int spi_claim_bus(struct spi_slave *slave) · line 181
Quoted 9 lines
drivers/spi/fsl_espi.c +1
-1}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 */
ditto.
Quoted 14 lines
drivers/spi/fsl_espi.c +2
-2}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 : --
Quoted 2 lines
1.7.9.5
thanks!
Signature · 1 line
Jagan | openedev.