diff mbox

[4/6] staging: wilc1000: fix line over 80 characters in wilc_spi_init()

Message ID 1518606615-14404-5-git-send-email-ajay.kathat@microchip.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Ajay Singh Feb. 14, 2018, 11:10 a.m. UTC
Modified wilc_spi_init() to fix the line over 80 char issues reported
by checkpatch.pl script.
To overcome the checkpatch.pl reported issue modified debug logs and
comments used in wilc_spi_init().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_spi.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

Comments

Greg KH Feb. 16, 2018, 2:30 p.m. UTC | #1
On Wed, Feb 14, 2018 at 04:40:13PM +0530, Ajay Singh wrote:
> Modified wilc_spi_init() to fix the line over 80 char issues reported
> by checkpatch.pl script.
> To overcome the checkpatch.pl reported issue modified debug logs and
> comments used in wilc_spi_init().
> 
> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
> ---
>  drivers/staging/wilc1000/wilc_spi.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
> index 30a9a61..fddc0db 100644
> --- a/drivers/staging/wilc1000/wilc_spi.c
> +++ b/drivers/staging/wilc1000/wilc_spi.c
> @@ -835,7 +835,6 @@ static int wilc_spi_init(struct wilc *wilc, bool resume)
>  	struct spi_device *spi = to_spi_device(wilc->dev);
>  	u32 reg;
>  	u32 chipid;
> -
>  	static int isinit;

You also deleted this line :(
Ajay Singh Feb. 19, 2018, 6:37 a.m. UTC | #2
On Fri, 16 Feb 2018 15:30:22 +0100
Greg KH <gregkh@linuxfoundation.org> wrote:

> > diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
> > index 30a9a61..fddc0db 100644
> > --- a/drivers/staging/wilc1000/wilc_spi.c
> > +++ b/drivers/staging/wilc1000/wilc_spi.c
> > @@ -835,7 +835,6 @@ static int wilc_spi_init(struct wilc *wilc, bool resume)
> >  	struct spi_device *spi = to_spi_device(wilc->dev);
> >  	u32 reg;
> >  	u32 chipid;
> > -
> >  	static int isinit;  
> 
> You also deleted this line :(

The blank line was not necessary between the variable's declaration. I
should have done these changes in separate patch.
I will take care to have these type of changes either in a separate patch
or include the change details in description.
diff mbox

Patch

diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
index 30a9a61..fddc0db 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -835,7 +835,6 @@  static int wilc_spi_init(struct wilc *wilc, bool resume)
 	struct spi_device *spi = to_spi_device(wilc->dev);
 	u32 reg;
 	u32 chipid;
-
 	static int isinit;
 
 	if (isinit) {
@@ -864,20 +863,25 @@  static int wilc_spi_init(struct wilc *wilc, bool resume)
 		 * is removed but chip isn't reset
 		 */
 		g_spi.crc_off = 1;
-		dev_err(&spi->dev, "Failed internal read protocol with CRC on, retrying with CRC off...\n");
+		dev_err(&spi->dev,
+			"Failed read with CRC on, retrying with CRC off\n");
 		if (!spi_internal_read(wilc, WILC_SPI_PROTOCOL_OFFSET, &reg)) {
-			/* Reaad failed with both CRC on and off, something went bad */
-			dev_err(&spi->dev,
-				"Failed internal read protocol...\n");
+			/*
+			 * Read failed with both CRC on and off,
+			 * something went bad
+			 */
+			dev_err(&spi->dev, "Failed internal read protocol\n");
 			return 0;
 		}
 	}
-	if (g_spi.crc_off == 0)	{
+	if (g_spi.crc_off == 0) {
 		reg &= ~0xc; /* disable crc checking */
 		reg &= ~0x70;
 		reg |= (0x5 << 4);
 		if (!spi_internal_write(wilc, WILC_SPI_PROTOCOL_OFFSET, reg)) {
-			dev_err(&spi->dev, "[wilc spi %d]: Failed internal write protocol reg...\n", __LINE__);
+			dev_err(&spi->dev,
+				"[wilc spi %d]: Failed internal write reg\n",
+				__LINE__);
 			return 0;
 		}
 		g_spi.crc_off = 1;