linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: coding style fixup
@ 2014-10-07  9:11 Igor Bogomazov
  2014-10-08 22:57 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Igor Bogomazov @ 2014-10-07  9:11 UTC (permalink / raw)
  To: devel; +Cc: linux-kernel, trivial

checkpatch.pk tiny fix
get rid of 2 warnings and 2 errors for hal/fw.c
    
Signed-off-by: Igor Bogomazov <ygrex@ygrex.ru>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: navin patidar <navin.patidar@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
---
linux-next 3.17.0

diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
index 17b7f37..c4293df 100644
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
 			break;
 	} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
 
-	if (counter >= POLLING_READY_TIMEOUT_COUNT) {
+	if (counter >= POLLING_READY_TIMEOUT_COUNT)
 		goto exit;
-	}
 
 	value32 = usb_read32(adapt, REG_MCUFWDL);
 	value32 |= MCUFWDL_RDY;
@@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
 	u32 fwsize;
 	int err;
 
-	if (request_firmware(&fw, fw_name, device)){
+	if (request_firmware(&fw, fw_name, device)) {
 		dev_err(device, "Firmware %s not available\n", fw_name);
 		return -ENOENT;
 	}
 
 	if (fw->size > FW_8188E_SIZE) {
-		dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
+		dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
 			 FW_8188E_SIZE);
 		return -1;
 	}
@@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
 		rtl88e_firmware_selfreset(adapt);
 	}
 	_rtl88e_enable_fw_download(adapt, true);
-	usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
+	usb_write8(adapt, REG_MCUFWDL,
+		usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
 	_rtl88e_write_fw(adapt, pfwdata, fwsize);
 	_rtl88e_enable_fw_download(adapt, false);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8188eu: coding style fixup
  2014-10-07  9:11 [PATCH] staging: rtl8188eu: coding style fixup Igor Bogomazov
@ 2014-10-08 22:57 ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2014-10-08 22:57 UTC (permalink / raw)
  To: Igor Bogomazov; +Cc: devel, trivial, linux-kernel

On Tue, Oct 07, 2014 at 01:11:42PM +0400, Igor Bogomazov wrote:
> checkpatch.pk tiny fix
> get rid of 2 warnings and 2 errors for hal/fw.c
>     
> Signed-off-by: Igor Bogomazov <ygrex@ygrex.ru>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: navin patidar <navin.patidar@gmail.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> linux-next 3.17.0

I think someone else already did this before you sent it in, as this
doesn't apply to my tree, sorry :(

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8188eu: coding style fixup
  2014-10-10  7:09 Igor Bogomazov
@ 2014-10-10  8:46 ` Sudip Mukherjee
  0 siblings, 0 replies; 8+ messages in thread
From: Sudip Mukherjee @ 2014-10-10  8:46 UTC (permalink / raw)
  To: Igor Bogomazov
  Cc: devel, trivial, linux-kernel, Stephen Rothwell, navin patidar,
	Greg Kroah-Hartman

On Fri, Oct 10, 2014 at 11:09:20AM +0400, Igor Bogomazov wrote:
> checkpatch.pl tiny fix
> get rid of 2 warnings and 2 errors for hal/fw.c:
> 
> WARNING: braces {} are not necessary for single statement blocks
> WARNING: line over 80 characters
> ERROR: space required before the open brace '{'
> ERROR: space required after that ',' (ctx:VxV)
you should usually do only one type of fix in a patch.

> 
> Signed-off-by: Igor Bogomazov <ygrex@ygrex.ru>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: navin patidar <navin.patidar@gmail.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> for linux-next 3.17.0
> 
> this is an updated version of the patch I've sent yesterday, that one
> did not provide a clear description
> 
> diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
> --- a/drivers/staging/rtl8188eu/hal/fw.c
> +++ b/drivers/staging/rtl8188eu/hal/fw.c
> @@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
>  			break;
>  	} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
>  
> -	if (counter >= POLLING_READY_TIMEOUT_COUNT) {
> +	if (counter >= POLLING_READY_TIMEOUT_COUNT)
>  		goto exit;
> -	}
>  
>  	value32 = usb_read32(adapt, REG_MCUFWDL);
>  	value32 |= MCUFWDL_RDY;
> @@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
>  	u32 fwsize;
>  	int err;
>  
> -	if (request_firmware(&fw, fw_name, device)){
> +	if (request_firmware(&fw, fw_name, device)) {
>  		dev_err(device, "Firmware %s not available\n", fw_name);
>  		return -ENOENT;
>  	}
>  
>  	if (fw->size > FW_8188E_SIZE) {
> -		dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
> +		dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
>  			 FW_8188E_SIZE);

align this with the open parenthesis

>  		return -1;
>  	}
> @@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
>  		rtl88e_firmware_selfreset(adapt);
>  	}
>  	_rtl88e_enable_fw_download(adapt, true);
> -	usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
> +	usb_write8(adapt, REG_MCUFWDL,
> +		usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
same here also. 
check your patch with --strict option of checkpatch

thanks
sudip

>  	_rtl88e_write_fw(adapt, pfwdata, fwsize);
>  	_rtl88e_enable_fw_download(adapt, false);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] staging: rtl8188eu: coding style fixup
@ 2014-10-10  7:09 Igor Bogomazov
  2014-10-10  8:46 ` Sudip Mukherjee
  0 siblings, 1 reply; 8+ messages in thread
From: Igor Bogomazov @ 2014-10-10  7:09 UTC (permalink / raw)
  To: devel
  Cc: trivial, linux-kernel, Stephen Rothwell, navin patidar,
	Greg Kroah-Hartman

checkpatch.pl tiny fix
get rid of 2 warnings and 2 errors for hal/fw.c:

WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
ERROR: space required before the open brace '{'
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Igor Bogomazov <ygrex@ygrex.ru>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: navin patidar <navin.patidar@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
---
for linux-next 3.17.0

this is an updated version of the patch I've sent yesterday, that one
did not provide a clear description

diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
 			break;
 	} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
 
-	if (counter >= POLLING_READY_TIMEOUT_COUNT) {
+	if (counter >= POLLING_READY_TIMEOUT_COUNT)
 		goto exit;
-	}
 
 	value32 = usb_read32(adapt, REG_MCUFWDL);
 	value32 |= MCUFWDL_RDY;
@@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
 	u32 fwsize;
 	int err;
 
-	if (request_firmware(&fw, fw_name, device)){
+	if (request_firmware(&fw, fw_name, device)) {
 		dev_err(device, "Firmware %s not available\n", fw_name);
 		return -ENOENT;
 	}
 
 	if (fw->size > FW_8188E_SIZE) {
-		dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
+		dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
 			 FW_8188E_SIZE);
 		return -1;
 	}
@@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
 		rtl88e_firmware_selfreset(adapt);
 	}
 	_rtl88e_enable_fw_download(adapt, true);
-	usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
+	usb_write8(adapt, REG_MCUFWDL,
+		usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
 	_rtl88e_write_fw(adapt, pfwdata, fwsize);
 	_rtl88e_enable_fw_download(adapt, false);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8188eu: coding style fixup
  2014-10-09  6:30 Igor Bogomazov
  2014-10-09  6:32 ` Denis Kirjanov
@ 2014-10-09 15:16 ` Greg KH
  1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2014-10-09 15:16 UTC (permalink / raw)
  To: Igor Bogomazov; +Cc: devel, trivial, linux-kernel

On Thu, Oct 09, 2014 at 10:30:06AM +0400, Igor Bogomazov wrote:
> checkpatch.pl tiny fix
> get rid of 2 warnings and 2 errors for hal/fw.c

What warnings?  What errors?  Be specific please.

>     

Trailing whitespace :(

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8188eu: coding style fixup
  2014-10-09  6:32 ` Denis Kirjanov
@ 2014-10-09  6:38   ` Igor Bogomazov
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Bogomazov @ 2014-10-09  6:38 UTC (permalink / raw)
  To: Denis Kirjanov
  Cc: devel, trivial, linux-kernel, Stephen Rothwell, navin patidar,
	Greg Kroah-Hartman

you are right, would be wise to do that, added

On Thu, 9 Oct 2014 10:32:37 +0400
Denis Kirjanov <kirjanov@gmail.com> wrote:

> But you haven't CCed people in the CC list
> 
> On 10/9/14, Igor Bogomazov <ygrex@ygrex.ru> wrote:
> > checkpatch.pl tiny fix
> > get rid of 2 warnings and 2 errors for hal/fw.c
> >
> > Signed-off-by: Igor Bogomazov <ygrex@ygrex.ru>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: navin patidar <navin.patidar@gmail.com>
> > Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> > for linux-next 3.17.0
> >
> > this is an updated version of the patch I've sent two days ago, that one
> > did not apply cleanly
> >
> > diff --git a/drivers/staging/rtl8188eu/hal/fw.c
> > b/drivers/staging/rtl8188eu/hal/fw.c
> > --- a/drivers/staging/rtl8188eu/hal/fw.c
> > +++ b/drivers/staging/rtl8188eu/hal/fw.c
> > @@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
> >  			break;
> >  	} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
> >
> > -	if (counter >= POLLING_READY_TIMEOUT_COUNT) {
> > +	if (counter >= POLLING_READY_TIMEOUT_COUNT)
> >  		goto exit;
> > -	}
> >
> >  	value32 = usb_read32(adapt, REG_MCUFWDL);
> >  	value32 |= MCUFWDL_RDY;
> > @@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
> >  	u32 fwsize;
> >  	int err;
> >
> > -	if (request_firmware(&fw, fw_name, device)){
> > +	if (request_firmware(&fw, fw_name, device)) {
> >  		dev_err(device, "Firmware %s not available\n", fw_name);
> >  		return -ENOENT;
> >  	}
> >
> >  	if (fw->size > FW_8188E_SIZE) {
> > -		dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
> > +		dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
> >  			 FW_8188E_SIZE);
> >  		return -1;
> >  	}
> > @@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
> >  		rtl88e_firmware_selfreset(adapt);
> >  	}
> >  	_rtl88e_enable_fw_download(adapt, true);
> > -	usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) |
> > FWDL_ChkSum_rpt);
> > +	usb_write8(adapt, REG_MCUFWDL,
> > +		usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
> >  	_rtl88e_write_fw(adapt, pfwdata, fwsize);
> >  	_rtl88e_enable_fw_download(adapt, false);
> >
> > _______________________________________________
> > devel mailing list
> > devel@linuxdriverproject.org
> > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
> >

-- 
Sincerely yours,

Igor Bogomazov
Saint-Petersburg, Russia


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8188eu: coding style fixup
  2014-10-09  6:30 Igor Bogomazov
@ 2014-10-09  6:32 ` Denis Kirjanov
  2014-10-09  6:38   ` Igor Bogomazov
  2014-10-09 15:16 ` Greg KH
  1 sibling, 1 reply; 8+ messages in thread
From: Denis Kirjanov @ 2014-10-09  6:32 UTC (permalink / raw)
  To: Igor Bogomazov; +Cc: devel, trivial, linux-kernel

But you haven't CCed people in the CC list

On 10/9/14, Igor Bogomazov <ygrex@ygrex.ru> wrote:
> checkpatch.pl tiny fix
> get rid of 2 warnings and 2 errors for hal/fw.c
>
> Signed-off-by: Igor Bogomazov <ygrex@ygrex.ru>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: navin patidar <navin.patidar@gmail.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> for linux-next 3.17.0
>
> this is an updated version of the patch I've sent two days ago, that one
> did not apply cleanly
>
> diff --git a/drivers/staging/rtl8188eu/hal/fw.c
> b/drivers/staging/rtl8188eu/hal/fw.c
> --- a/drivers/staging/rtl8188eu/hal/fw.c
> +++ b/drivers/staging/rtl8188eu/hal/fw.c
> @@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
>  			break;
>  	} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
>
> -	if (counter >= POLLING_READY_TIMEOUT_COUNT) {
> +	if (counter >= POLLING_READY_TIMEOUT_COUNT)
>  		goto exit;
> -	}
>
>  	value32 = usb_read32(adapt, REG_MCUFWDL);
>  	value32 |= MCUFWDL_RDY;
> @@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
>  	u32 fwsize;
>  	int err;
>
> -	if (request_firmware(&fw, fw_name, device)){
> +	if (request_firmware(&fw, fw_name, device)) {
>  		dev_err(device, "Firmware %s not available\n", fw_name);
>  		return -ENOENT;
>  	}
>
>  	if (fw->size > FW_8188E_SIZE) {
> -		dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
> +		dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
>  			 FW_8188E_SIZE);
>  		return -1;
>  	}
> @@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
>  		rtl88e_firmware_selfreset(adapt);
>  	}
>  	_rtl88e_enable_fw_download(adapt, true);
> -	usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) |
> FWDL_ChkSum_rpt);
> +	usb_write8(adapt, REG_MCUFWDL,
> +		usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
>  	_rtl88e_write_fw(adapt, pfwdata, fwsize);
>  	_rtl88e_enable_fw_download(adapt, false);
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
>


-- 
Regards,
Denis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] staging: rtl8188eu: coding style fixup
@ 2014-10-09  6:30 Igor Bogomazov
  2014-10-09  6:32 ` Denis Kirjanov
  2014-10-09 15:16 ` Greg KH
  0 siblings, 2 replies; 8+ messages in thread
From: Igor Bogomazov @ 2014-10-09  6:30 UTC (permalink / raw)
  To: devel; +Cc: linux-kernel, trivial

checkpatch.pl tiny fix
get rid of 2 warnings and 2 errors for hal/fw.c
    
Signed-off-by: Igor Bogomazov <ygrex@ygrex.ru>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: navin patidar <navin.patidar@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
---
for linux-next 3.17.0

this is an updated version of the patch I've sent two days ago, that one
did not apply cleanly

diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
 			break;
 	} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
 
-	if (counter >= POLLING_READY_TIMEOUT_COUNT) {
+	if (counter >= POLLING_READY_TIMEOUT_COUNT)
 		goto exit;
-	}
 
 	value32 = usb_read32(adapt, REG_MCUFWDL);
 	value32 |= MCUFWDL_RDY;
@@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
 	u32 fwsize;
 	int err;
 
-	if (request_firmware(&fw, fw_name, device)){
+	if (request_firmware(&fw, fw_name, device)) {
 		dev_err(device, "Firmware %s not available\n", fw_name);
 		return -ENOENT;
 	}
 
 	if (fw->size > FW_8188E_SIZE) {
-		dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
+		dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
 			 FW_8188E_SIZE);
 		return -1;
 	}
@@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
 		rtl88e_firmware_selfreset(adapt);
 	}
 	_rtl88e_enable_fw_download(adapt, true);
-	usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
+	usb_write8(adapt, REG_MCUFWDL,
+		usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
 	_rtl88e_write_fw(adapt, pfwdata, fwsize);
 	_rtl88e_enable_fw_download(adapt, false);


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-10  8:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07  9:11 [PATCH] staging: rtl8188eu: coding style fixup Igor Bogomazov
2014-10-08 22:57 ` Greg KH
2014-10-09  6:30 Igor Bogomazov
2014-10-09  6:32 ` Denis Kirjanov
2014-10-09  6:38   ` Igor Bogomazov
2014-10-09 15:16 ` Greg KH
2014-10-10  7:09 Igor Bogomazov
2014-10-10  8:46 ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).