Re: [PATCH 1/2] Staging: comedi: introduce outl_1564_* and inl_1564_* helper functions in hwdrv_apci1564.c

2014-03-01 Thread Chase Southwood
On Saturday, March 1, 2014 6:18 PM, Chase Southwood chase.southw...@yahoo.com wrote: Hi Dan, [snip] I like this idea.  Just to clarify though, basically all of the macros would change to something like  #define APCI1564_DIGITAL_IP 0x4 #define APCI1564_DIGITAL_IP_INTERRUPT_MODE1 (0x4 + 0x4

Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-03-01 Thread Chase Southwood
On Friday, February 28, 2014 11:49 PM, Chase Southwood chase.southw...@yahoo.com wrote: On Friday, February 28, 2014 11:26 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-02-28 07:35, Chase Southwood wrote: [snip] In the case of s626_send_dac(), it doesn't seem to be used in any critical

Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 11:26 AM, Ian Abbott wrote: >>On 2014-02-28 07:35, Chase Southwood wrote: >> Smatch located a handful of while loops testing readl calls in s626.c. >> Since these while loops depend on readl succeeding, it's safer to make >> su

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 4:31 PM, Greg KH >wrote: >>On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: >> >> This patch introduces a simple helper function, outl_1564_timer(), to >> allow several lines which violate the character limit to be sh

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 3:42 AM, Dan Carpenter >wrote: >>On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: >> This patch introduces a simple helper function, outl_1564_timer(), to >> allow several lines which violate the character limit to be

[PATCH 2/2 v2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c

2014-02-28 Thread Chase Southwood
A handful of variables here were being initialized to 0 upon declaration, however they are always then set to another value before their first use, so initialization here is useless and we can remove it. Signed-off-by: Chase Southwood --- 2: no content change; redone and resent after PATCH 1/2

[PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened. A handful of other lines that are too long are appropriately split as well. Cc: Dan Carpenter Signed-off-by: Chase Southwood --- 2: introduced

Re: [PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 1:57 AM, Dan Carpenter >wrote: >>On Fri, Feb 28, 2014 at 10:52:32AM +0300, Dan Carpenter wrote: >>> On Fri, Feb 28, 2014 at 01:31:20AM -0600, Chase Southwood wrote: >> > hwdrv_apci1564.c had numerous lines over the column limi

Re: [PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
On Friday, February 28, 2014 1:57 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Feb 28, 2014 at 10:52:32AM +0300, Dan Carpenter wrote: On Fri, Feb 28, 2014 at 01:31:20AM -0600, Chase Southwood wrote: hwdrv_apci1564.c had numerous lines over the column limit.  This patch splits

[PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened. A handful of other lines that are too long are appropriately split as well. Cc: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Chase Southwood

[PATCH 2/2 v2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c

2014-02-28 Thread Chase Southwood
A handful of variables here were being initialized to 0 upon declaration, however they are always then set to another value before their first use, so initialization here is useless and we can remove it. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- 2: no content change; redone

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
On Friday, February 28, 2014 3:42 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
On Friday, February 28, 2014 4:31 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened

Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-02-28 Thread Chase Southwood
On Friday, February 28, 2014 11:26 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-02-28 07:35, Chase Southwood wrote: Smatch located a handful of while loops testing readl calls in s626.c. Since these while loops depend on readl succeeding, it's safer to make sure they time out eventually

[PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-02-27 Thread Chase Southwood
Smatch located a handful of while loops testing readl calls in s626.c. Since these while loops depend on readl succeeding, it's safer to make sure they time out eventually. Signed-off-by: Chase Southwood --- Ian and/or Hartley, I'd love your comments on this. It seems to me that we want

[PATCH 2/2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c

2014-02-27 Thread Chase Southwood
A handful of variables here were being initialized to 0 upon declaration, however they are always then set to another value before their first use, so initialization here is useless and we can remove it. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564

[PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters

2014-02-27 Thread Chase Southwood
hwdrv_apci1564.c had numerous lines over the column limit. This patch splits all such lines to bring them in compliance with coding style. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 50 -- 1 file changed, 36 insertions(+), 14

[PATCH] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci035.c

2014-02-27 Thread Chase Southwood
Nearly every variable in hwdrv_apci035.c is initialized to 0 when it is declared, and then set to some other value before ever being used. As such, we can remove all of these initializations. They are accomplishing nothing. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data

[PATCH] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci035.c

2014-02-27 Thread Chase Southwood
Nearly every variable in hwdrv_apci035.c is initialized to 0 when it is declared, and then set to some other value before ever being used. As such, we can remove all of these initializations. They are accomplishing nothing. Signed-off-by: Chase Southwood chase.southw...@yahoo.com

[PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters

2014-02-27 Thread Chase Southwood
hwdrv_apci1564.c had numerous lines over the column limit. This patch splits all such lines to bring them in compliance with coding style. Signed-off-by: Chase Southwood chase.south...@yahoo.com --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 50 -- 1 file changed

[PATCH 2/2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c

2014-02-27 Thread Chase Southwood
A handful of variables here were being initialized to 0 upon declaration, however they are always then set to another value before their first use, so initialization here is useless and we can remove it. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers

[PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-02-27 Thread Chase Southwood
Smatch located a handful of while loops testing readl calls in s626.c. Since these while loops depend on readl succeeding, it's safer to make sure they time out eventually. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- Ian and/or Hartley, I'd love your comments on this. It seems

Re: [PATCH] Staging: comedi: addi-data: clean-up variable use in hwdrv_apci035.c

2014-02-25 Thread Chase Southwood
>On Tuesday, February 25, 2014 3:56 AM, Ian Abbott wrote: >>On 2014-02-25 08:15, Chase Southwood wrote: >> The static variable ui_Command is as of right now being cleared to a >> value of zero between everytime that it writes to a port and then takes a >> new val

[PATCH] Staging: comedi: addi-data: clean-up variable use in hwdrv_apci035.c

2014-02-25 Thread Chase Southwood
The static variable ui_Command is as of right now being cleared to a value of zero between everytime that it writes to a port and then takes a new value from a port. Seems like this zeroing is unnecessary, so we can just remove these lines. Signed-off-by: Chase Southwood --- This sort of thing

[PATCH] Staging: comedi: addi-data: clean-up variable use in hwdrv_apci035.c

2014-02-25 Thread Chase Southwood
The static variable ui_Command is as of right now being cleared to a value of zero between everytime that it writes to a port and then takes a new value from a port. Seems like this zeroing is unnecessary, so we can just remove these lines. Signed-off-by: Chase Southwood chase.southw

Re: [PATCH] Staging: comedi: addi-data: clean-up variable use in hwdrv_apci035.c

2014-02-25 Thread Chase Southwood
On Tuesday, February 25, 2014 3:56 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-02-25 08:15, Chase Southwood wrote: The static variable ui_Command is as of right now being cleared to a value of zero between everytime that it writes to a port and then takes a new value from a port.  Seems

[PATCH 3/3 v2] Staging: comedi: addi-data: fix a couple of lines that are too long

2014-02-24 Thread Chase Southwood
There are a couple of cases where a comment being on the same line as a statement is causing the line to be over 80 characters long. This is an easy fix, move these comments to the previous line. Signed-off-by: Chase Southwood --- 2: Some changes to PATCH 2/3 v2 occurred in the immediate

[PATCH 2/3 v2] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-24 Thread Chase Southwood
There were some conditional blocks that had an unnecessary level of indentation in them. We can remove this to improve code clarity. Signed-off-by: Chase Southwood --- 2: Moved "else if" up to the same line as closing brace of "if". Left braces on single li

Re: [PATCH 2/3] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-24 Thread Chase Southwood
>On Monday, February 24, 2014 8:13 AM, Ian Abbott wrote: >>On 2014-02-22 03:21, Chase Southwood wrote: >> There were some conditional blocks that had an unneccesary level of >> indentation in them.  We can remove this to improve code clarity. >> >&g

Re: [PATCH 2/3] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-24 Thread Chase Southwood
On Monday, February 24, 2014 8:13 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-02-22 03:21, Chase Southwood wrote: There were some conditional blocks that had an unneccesary level of indentation in them.  We can remove this to improve code clarity. Signed-off-by: Chase Southwood

[PATCH 2/3 v2] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-24 Thread Chase Southwood
There were some conditional blocks that had an unnecessary level of indentation in them. We can remove this to improve code clarity. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- 2: Moved else if up to the same line as closing brace of if. Left braces on single line else

[PATCH 3/3 v2] Staging: comedi: addi-data: fix a couple of lines that are too long

2014-02-24 Thread Chase Southwood
There are a couple of cases where a comment being on the same line as a statement is causing the line to be over 80 characters long. This is an easy fix, move these comments to the previous line. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- 2: Some changes to PATCH 2/3 v2

[PATCH 3/3] Staging: comedi: addi-data: fix a couple of lines that are too long

2014-02-21 Thread Chase Southwood
There are a couple of cases where a comment being on the same line as a statement is causing the line to be over 80 characters long. This is an easy fix; move these comments to the previous line. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 11

[PATCH 2/3] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-21 Thread Chase Southwood
There were some conditional blocks that had an unneccesary level of indentation in them. We can remove this to improve code clarity. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci035.c | 31 ++ 1 file changed, 14 insertions(+), 17 deletions

[PATCH 1/3] Staging: comedi: addi-data: comment cleanup in hwdrv_apci035.c

2014-02-21 Thread Chase Southwood
This patch further cleans up the comments in hwdrv_apci035.c, converting them to kernel style and removing some commented conditional statements that are unused. Signed-off-by: Chase Southwood --- I decided to return to the first driver I touched. I found some more things that could be cleaned

[PATCH 1/3] Staging: comedi: addi-data: comment cleanup in hwdrv_apci035.c

2014-02-21 Thread Chase Southwood
This patch further cleans up the comments in hwdrv_apci035.c, converting them to kernel style and removing some commented conditional statements that are unused. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- I decided to return to the first driver I touched. I found some more

[PATCH 2/3] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-21 Thread Chase Southwood
There were some conditional blocks that had an unneccesary level of indentation in them. We can remove this to improve code clarity. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- .../comedi/drivers/addi-data/hwdrv_apci035.c | 31 ++ 1 file changed, 14

[PATCH 3/3] Staging: comedi: addi-data: fix a couple of lines that are too long

2014-02-21 Thread Chase Southwood
There are a couple of cases where a comment being on the same line as a statement is causing the line to be over 80 characters long. This is an easy fix; move these comments to the previous line. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/addi

[PATCH 4/4] Staging: comedi: addi-data: don't initialize a static variable to 0

2014-02-18 Thread Chase Southwood
In hwdrv_apci1564.c, one static variable is zero initialized. This is unneeded and redundant, so we remove the initialization. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/4] Staging: comedi: addi-data: replace printk() with dev_err() in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
There were a small handful of printk() calls in hwdrv_apci1564.c. It is generally better to use dev_err() for error messages instead, so I switched all the printk() calls out, as well as cleaned up the error strings. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data

[PATCH 1/4] Staging: comedi: addi-data: cleanup comments in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
for comments. Signed-off-by: Chase Southwood --- Moving onto a new addi-data driver. Generally mostly the same issues though. .../comedi/drivers/addi-data/hwdrv_apci1564.c | 93 +- 1 file changed, 38 insertions(+), 55 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi

[PATCH 2/4] Staging: comedi: addi-data: cleanup brace usage in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
hwdrv_apci1564.c had many single statments wrapped in braces, so we can delete these. Also, some else statements were improperly placed, fix these too. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 58 -- 1 file changed, 22

Re: [PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-18 Thread Chase Southwood
>On Tuesday, February 18, 2014 5:00 AM, Dan Carpenter > wrote: >>On Mon, Feb 17, 2014 at 12:45:07PM -0800, Chase Southwood wrote: >>>On Monday, February 17, 2014 7:16 AM, Ian Abbott wrote: >>>> >>>>On 2014-02-16 08:40, Chase Southwood wrote: &

Re: [PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-18 Thread Chase Southwood
On Tuesday, February 18, 2014 5:00 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Mon, Feb 17, 2014 at 12:45:07PM -0800, Chase Southwood wrote: On Monday, February 17, 2014 7:16 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-02-16 08:40, Chase Southwood wrote: This patch

[PATCH 2/4] Staging: comedi: addi-data: cleanup brace usage in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
hwdrv_apci1564.c had many single statments wrapped in braces, so we can delete these. Also, some else statements were improperly placed, fix these too. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 58 -- 1

[PATCH 1/4] Staging: comedi: addi-data: cleanup comments in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
for comments. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- Moving onto a new addi-data driver. Generally mostly the same issues though. .../comedi/drivers/addi-data/hwdrv_apci1564.c | 93 +- 1 file changed, 38 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH 3/4] Staging: comedi: addi-data: replace printk() with dev_err() in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
There were a small handful of printk() calls in hwdrv_apci1564.c. It is generally better to use dev_err() for error messages instead, so I switched all the printk() calls out, as well as cleaned up the error strings. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging

[PATCH 4/4] Staging: comedi: addi-data: don't initialize a static variable to 0

2014-02-18 Thread Chase Southwood
In hwdrv_apci1564.c, one static variable is zero initialized. This is unneeded and redundant, so we remove the initialization. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 3/4 v2] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-17 Thread Chase Southwood
This patch for hwdrv_apci035.c changes a printk() call to a dev_err() call since this is generally preferred. It also removes a newline from the start of the error message. Signed-off-by: Chase Southwood --- 2: Removed leading newline, per Ian's request. drivers/staging/comedi/drivers/addi

Re: [PATCH 3/4] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-17 Thread Chase Southwood
>On Monday, February 17, 2014 7:18 AM, Ian Abbott wrote: >>On 2014-02-16 08:41, Chase Southwood wrote: >> >> This patch for hwdrv_apci035.c changes a printk() call to a dev_err call >> since this is generally preferred. >> >> Signed-off-by: Chase Southw

Re: [PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-17 Thread Chase Southwood
>On Monday, February 17, 2014 7:16 AM, Ian Abbott wrote: >>On 2014-02-16 08:40, Chase Southwood wrote: >> This patch for hwdrv_apci035 removes some unneeded braces, and moves some >> improperly placed braces to the correct position, as found by checkpatch. >> It a

Re: [PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-17 Thread Chase Southwood
On Monday, February 17, 2014 7:16 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-02-16 08:40, Chase Southwood wrote: This patch for hwdrv_apci035 removes some unneeded braces, and moves some improperly placed braces to the correct position, as found by checkpatch. It also removes a commented

Re: [PATCH 3/4] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-17 Thread Chase Southwood
On Monday, February 17, 2014 7:18 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-02-16 08:41, Chase Southwood wrote: This patch for hwdrv_apci035.c changes a printk() call to a dev_err call since this is generally preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com

[PATCH 3/4 v2] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-17 Thread Chase Southwood
This patch for hwdrv_apci035.c changes a printk() call to a dev_err() call since this is generally preferred. It also removes a newline from the start of the error message. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- 2: Removed leading newline, per Ian's request. drivers

[PATCH 3/4] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-16 Thread Chase Southwood
This patch for hwdrv_apci035.c changes a printk() call to a dev_err call since this is generally preferred. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi

[PATCH 4/4] Staging: comedi: addi-data: do not initialize statics to 0 in hwdrv_apci035.c

2014-02-16 Thread Chase Southwood
This patch for hwdrv_apci035.c removes a zero initialization from two static variables. Static variables are initialized to zero by default, so doing so explicitly is not necessary. Signed-off-by: Chase Southwood --- I purposely made this patch the last in the series, because while

[PATCH 2/4] Staging: comedi: addi-data: cleanup comments in hwdrv_apci035.c

2014-02-16 Thread Chase Southwood
This patch for hwdrv_apci035.c aligns comment blocks and makes indentation of comments consistent. Removed all "spaces before tabs" in comment indentation as well. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci035.c | 140 ++--- 1 fi

[PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-16 Thread Chase Southwood
it, so it is just added clutter and so we can delete it to clean up further. Signed-off-by: Chase Southwood --- So I decided to venture into addi-data today and found that most of the files in there are very messy from a style standpoint. This is the first (of probably a few) patchsets to try

[PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-16 Thread Chase Southwood
it, so it is just added clutter and so we can delete it to clean up further. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- So I decided to venture into addi-data today and found that most of the files in there are very messy from a style standpoint. This is the first (of probably

[PATCH 2/4] Staging: comedi: addi-data: cleanup comments in hwdrv_apci035.c

2014-02-16 Thread Chase Southwood
This patch for hwdrv_apci035.c aligns comment blocks and makes indentation of comments consistent. Removed all spaces before tabs in comment indentation as well. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- .../comedi/drivers/addi-data/hwdrv_apci035.c | 140

[PATCH 4/4] Staging: comedi: addi-data: do not initialize statics to 0 in hwdrv_apci035.c

2014-02-16 Thread Chase Southwood
This patch for hwdrv_apci035.c removes a zero initialization from two static variables. Static variables are initialized to zero by default, so doing so explicitly is not necessary. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- I purposely made this patch the last in the series

[PATCH 3/4] Staging: comedi: addi-data: convert printk() to dev_err()

2014-02-16 Thread Chase Southwood
This patch for hwdrv_apci035.c changes a printk() call to a dev_err call since this is generally preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()

2014-02-14 Thread Chase Southwood
Since simple_strtoul() has been deprecated, replace it with kstrtouint(). Also, since return code checking for this new function is enforced, add a check to ensure that the conversion has succeeded. Signed-off-by: Chase Southwood --- drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 3

[PATCH] Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()

2014-02-14 Thread Chase Southwood
Since simple_strtoul() has been deprecated, replace it with kstrtouint(). Also, since return code checking for this new function is enforced, add a check to ensure that the conversion has succeeded. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/kcomedilib

[PATCH v2] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-13 Thread Chase Southwood
e mask otherwise, so all the io_bits are modified for port 2. This ensures that mask is always initialized by the time it is used. Signed-off-by: Chase Southwood --- 2: Addressed all of the comments provided by Hartley regarding correct structure of this patch. Hopefully everything looks better! d

[PATCH v2] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-13 Thread Chase Southwood
, so all the io_bits are modified for port 2. This ensures that mask is always initialized by the time it is used. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- 2: Addressed all of the comments provided by Hartley regarding correct structure of this patch. Hopefully everything

[PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-12 Thread Chase Southwood
data[0] != INSN_CONFIG_DIO_QUERY), return an error, but in every other case, initialize mask and then proceed. Found by a static checker. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff

[PATCH] Staging: comedi: Correct a few printf format codes

2014-02-12 Thread Chase Southwood
with %i, change these to %u, and one was an int formatted with %u, we want to format this with %d. Signed-off-by: Chase Southwood --- drivers/staging/comedi/comedi_fops.c | 8 drivers/staging/comedi/drivers/comedi_bond.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions

[PATCH] Staging: comedi: Correct a few printf format codes

2014-02-12 Thread Chase Southwood
with %i, change these to %u, and one was an int formatted with %u, we want to format this with %d. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/comedi_fops.c | 8 drivers/staging/comedi/drivers/comedi_bond.c | 4 ++-- 2 files changed, 6

[PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-12 Thread Chase Southwood
] != INSN_CONFIG_DIO_QUERY), return an error, but in every other case, initialize mask and then proceed. Found by a static checker. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 12 +--- 1 file changed, 5 insertions(+), 7

[PATCH] Staging: comedi: fix memory leak in comedi_bond.c

2014-02-07 Thread Chase Southwood
We allocate bdev and then krealloc the devs pointer in order to add bdev at the end of the devpriv->devs array list. But if for some reason this krealloc fails, we need to free bdev before returning an error otherwise this memory is leaked. Signed-off-by: Chase Southwood --- drivers/stag

[PATCH] Staging: comedi: fix memory leak in comedi_bond.c

2014-02-07 Thread Chase Southwood
We allocate bdev and then krealloc the devs pointer in order to add bdev at the end of the devpriv-devs array list. But if for some reason this krealloc fails, we need to free bdev before returning an error otherwise this memory is leaked. Signed-off-by: Chase Southwood chase.southw...@yahoo.com

[PATCH v8] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-16 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- Okay, back to v2, basically. I fixed the checkpatch warning from v2, and added the error checking that was from v3, but otherwise it is the same. Of note, I have used

Re: [PATCH v7] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-16 Thread Chase Southwood
>On Thursday, January 16, 2014 5:31 AM, Ian Abbott wrote: >On 2014-01-15 19:22, Chase Southwood wrote: >> This patch for ni_mio_common.c changes out a while loop for a timeout, >> which is preferred. >> >> Signed-off-by: Chase Southwood >> --- >

Re: [PATCH v7] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-16 Thread Chase Southwood
On Thursday, January 16, 2014 5:31 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-01-15 19:22, Chase Southwood wrote: This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- Hartley, I

[PATCH v8] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-16 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- Okay, back to v2, basically. I fixed the checkpatch warning from v2, and added the error checking that was from v3, but otherwise

[PATCH v7] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-15 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- Hartley, I sincerely apologize for the obvious mistake, I thought I had built it but clearly I made a mistake somewhere, as your observation is exactly correct

[PATCH v6] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-15 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- 2: Changed from simple clean-up to swapping a timeout in for a while loop. 3: Removed extra counter variable, and added error checking. 4: No longer using counter

[PATCH v6] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-15 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- 2: Changed from simple clean-up to swapping a timeout in for a while loop. 3: Removed extra counter variable, and added error checking. 4

[PATCH v7] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-15 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- Hartley, I sincerely apologize for the obvious mistake, I thought I had built it but clearly I made a mistake somewhere, as your observation

[PATCH v5] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- All right, I think this guy's ready to go now! Thanks for all the help! Chase 2: Changed from simple clean-up to swapping a timeout in for a while loop. 3: Removed

[PATCH v4] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- OK, here's another go at it. Hopefully everything looks more correct this time. Greg, I've followed the pattern you gave me, and I really appreciate all of the tips

[PATCH v3] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch to ni_mio_common.c changes a simple while loop to a timeout, which is preferred. Signed-off-by: Chase Southwood --- I removed the extra counter variable this time. Greg, you mentioned that I could just look at the time that has expired to far, and exit and error out

[PATCH v2] Staging: comedi: convert while loop to timeout in ni_mio_common.c.

2014-01-14 Thread Chase Southwood
This patch to ni_mio_common.c changes a while loop to a timeout for loop, which is preferred. Signed-off-by: Chase Southwood --- I know Mr. Abbott mentioned that he wouldn't expect clean-up patches to have to deal with this sort of thing, but I thought I'd at least give the timeout thing

[PATCH v2] Staging: comedi: convert while loop to timeout in ni_mio_common.c.

2014-01-14 Thread Chase Southwood
This patch to ni_mio_common.c changes a while loop to a timeout for loop, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- I know Mr. Abbott mentioned that he wouldn't expect clean-up patches to have to deal with this sort of thing, but I thought I'd at least

[PATCH v3] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch to ni_mio_common.c changes a simple while loop to a timeout, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- I removed the extra counter variable this time. Greg, you mentioned that I could just look at the time that has expired to far, and exit

[PATCH v4] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- OK, here's another go at it. Hopefully everything looks more correct this time. Greg, I've followed the pattern you gave me, and I really

[PATCH v5] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- All right, I think this guy's ready to go now! Thanks for all the help! Chase 2: Changed from simple clean-up to swapping a timeout

[PATCH] Staging: comedi: remove unnecessary braces in pcl711.c

2014-01-13 Thread Chase Southwood
This patch for pcl711.c removes braces causing a checkpatch.pl warning. It also removes an empty else arm of an if-else statement. Signed-off-by: Chase Southwood --- I removed the "else" arm of this statement because it was empty, save for the "ignore" comment. If it

[PATCH] Staging: comedi: move trailing statement to next line in ni_mio_common.c

2014-01-13 Thread Chase Southwood
This patch for ni_mio_common.c silences a checkpatch error due to a trailing statement. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b

[PATCH] Staging: comedi: move trailing statement to next line in ni_mio_common.c

2014-01-13 Thread Chase Southwood
This patch for ni_mio_common.c silences a checkpatch error due to a trailing statement. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers

[PATCH] Staging: comedi: remove unnecessary braces in pcl711.c

2014-01-13 Thread Chase Southwood
This patch for pcl711.c removes braces causing a checkpatch.pl warning. It also removes an empty else arm of an if-else statement. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- I removed the else arm of this statement because it was empty, save for the ignore comment

Re: [PATCH 0/3] Staging: comedi: Checkpatch cleanups in ni_mio_common.c

2014-01-10 Thread Chase Southwood
Oops, left out some of my cover letter. Here is the amended patchset cover letter. On Fri, Jan 10, 2014 at 10:07 PM, Chase Southwood wrote: > > This patch series fixes several warnings reported by checkpatch.pl in > ni_mio_common.c of the comedi driver. > > Among the issues

[PATCH 0/3] Staging: comedi: Checkpatch cleanups in ni_mio_common.c

2014-01-10 Thread Chase Southwood
This patch series fixes several warnings reported by checkpatch.pl in ni_mio_common.c of the comedi driver. Among the issues fixed: *Many unnecessary braces have been removed. *Improper indentation has been corrected. *Extra whitespace before semicolons has been removed. *Extra whitespace after

[PATCH 1/3] Staging: comedi: fix numerous brace coding style issues in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c removes many unneccesary braces to fix checkpatch.pl warnings. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 124 + 1 file changed, 43 insertions(+), 81 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 3/3] Staging: comedi: fix extra whitespace style issues in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c removes extra whitespace causing checkpatch.pl warnings. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b

[PATCH 2/3] Staging: comedi: fix indentation coding style issue in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c fixes several indentation warnings from checkpatch.pl. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b

[PATCH 3/3] Staging: comedi: fix extra whitespace style issues in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c removes extra whitespace causing checkpatch.pl warnings. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/ni_mio_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 2/3] Staging: comedi: fix indentation coding style issue in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c fixes several indentation warnings from checkpatch.pl. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/ni_mio_common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 1/3] Staging: comedi: fix numerous brace coding style issues in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c removes many unneccesary braces to fix checkpatch.pl warnings. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- drivers/staging/comedi/drivers/ni_mio_common.c | 124 + 1 file changed, 43 insertions(+), 81 deletions(-) diff --git

<    1   2   3   4   5   >