mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Staging:comedi:Fix bug and coding style issue in usbdux.c This is a patch to the usbdux.c file that resolve 2 errors in coding and fix the warning about lengt of code lines Signed-off-by: Morgan Gatti <morgan.gatti@gmail.com>
       [not found] <patch usbdux>
@ 2010-05-11 21:55 ` Morgan Gatti
  2010-05-12  8:20   ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Morgan Gatti @ 2010-05-11 21:55 UTC (permalink / raw)
  To: gregkh, jkosina; +Cc: linux-kernel, Morgan Gatti

---
 drivers/staging/comedi/drivers/usbdux.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c
index 8942ae4..c39c36a 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -793,7 +793,7 @@ static int usbduxsub_stop(struct usbduxsub *usbduxsub)
 }
 
 static int usbduxsub_upload(struct usbduxsub *usbduxsub,
-			    uint8_t * local_transfer_buffer,
+			    uint8_t *local_transfer_buffer,
 			    unsigned int startAddr, unsigned int len)
 {
 	int errcode;
@@ -825,7 +825,7 @@ static int usbduxsub_upload(struct usbduxsub *usbduxsub,
 #define FIRMWARE_MAX_LEN 0x2000
 
 static int firmwareUpload(struct usbduxsub *usbduxsub,
-			  const u8 * firmwareBinary, int sizeFirmware)
+			  const u8 *firmwareBinary, int sizeFirmware)
 {
 	int ret;
 	uint8_t *fwBuf;
@@ -835,7 +835,7 @@ static int firmwareUpload(struct usbduxsub *usbduxsub,
 
 	if (sizeFirmware > FIRMWARE_MAX_LEN) {
 		dev_err(&usbduxsub->interface->dev,
-			"comedi_: usbdux firmware binary it too large for FX2.\n");
+		"comedi_: usbdux firmware binary it too large for FX2.\n");
 		return -ENOMEM;
 	}
 
@@ -1264,8 +1264,8 @@ static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 			    (this_usbduxsub->ai_interval) * 2;
 		}
 		this_usbduxsub->ai_timer = cmd->scan_begin_arg / (125000 *
-								  (this_usbduxsub->
-								   ai_interval));
+					  (this_usbduxsub->
+					   ai_interval));
 	} else {
 		/* interval always 1ms */
 		this_usbduxsub->ai_interval = 1;
-- 
1.7.0.4


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

* Re: [PATCH] Staging:comedi:Fix bug and coding style issue in usbdux.c This is a patch to the usbdux.c file that resolve 2 errors in coding and fix the warning about lengt of code lines Signed-off-by: Morgan Gatti <morgan.gatti@gmail.com>
  2010-05-11 21:55 ` [PATCH] Staging:comedi:Fix bug and coding style issue in usbdux.c This is a patch to the usbdux.c file that resolve 2 errors in coding and fix the warning about lengt of code lines Signed-off-by: Morgan Gatti <morgan.gatti@gmail.com> Morgan Gatti
@ 2010-05-12  8:20   ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2010-05-12  8:20 UTC (permalink / raw)
  To: Morgan Gatti; +Cc: gregkh, linux-kernel

On Tue, 11 May 2010, Morgan Gatti wrote:

> ---
>  drivers/staging/comedi/drivers/usbdux.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)

Morgan,

please look into fixing you patch submission tools -- the whole changelog, 
including your Signed-off-by: line, ended up in Subject:, which is 
probably not what you intended.

> diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c
> index 8942ae4..c39c36a 100644
> --- a/drivers/staging/comedi/drivers/usbdux.c
> +++ b/drivers/staging/comedi/drivers/usbdux.c
> @@ -793,7 +793,7 @@ static int usbduxsub_stop(struct usbduxsub *usbduxsub)
>  }
>  
>  static int usbduxsub_upload(struct usbduxsub *usbduxsub,
> -			    uint8_t * local_transfer_buffer,
> +			    uint8_t *local_transfer_buffer,
>  			    unsigned int startAddr, unsigned int len)
>  {
>  	int errcode;
> @@ -825,7 +825,7 @@ static int usbduxsub_upload(struct usbduxsub *usbduxsub,
>  #define FIRMWARE_MAX_LEN 0x2000
>  
>  static int firmwareUpload(struct usbduxsub *usbduxsub,
> -			  const u8 * firmwareBinary, int sizeFirmware)
> +			  const u8 *firmwareBinary, int sizeFirmware)

While you are performing the glorious task of fixing the coding style in 
this driver, maybe also converting it not to use CamelNamingConvention 
would be worthwile.

>  {
>  	int ret;
>  	uint8_t *fwBuf;
> @@ -835,7 +835,7 @@ static int firmwareUpload(struct usbduxsub *usbduxsub,
>  
>  	if (sizeFirmware > FIRMWARE_MAX_LEN) {
>  		dev_err(&usbduxsub->interface->dev,
> -			"comedi_: usbdux firmware binary it too large for FX2.\n");
> +		"comedi_: usbdux firmware binary it too large for FX2.\n");
>  		return -ENOMEM;
>  	}
>  
> @@ -1264,8 +1264,8 @@ static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
>  			    (this_usbduxsub->ai_interval) * 2;
>  		}
>  		this_usbduxsub->ai_timer = cmd->scan_begin_arg / (125000 *
> -								  (this_usbduxsub->
> -								   ai_interval));
> +					  (this_usbduxsub->
> +					   ai_interval));

Pasting this to one line would improve readability.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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

end of thread, other threads:[~2010-05-12  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <patch usbdux>
2010-05-11 21:55 ` [PATCH] Staging:comedi:Fix bug and coding style issue in usbdux.c This is a patch to the usbdux.c file that resolve 2 errors in coding and fix the warning about lengt of code lines Signed-off-by: Morgan Gatti <morgan.gatti@gmail.com> Morgan Gatti
2010-05-12  8:20   ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®