All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters
@ 2018-04-10 22:50 Gabriel Francisco Mandaji
  2018-04-11  5:07 ` Julia Lawall
  2018-04-11  9:18 ` Ian Abbott
  0 siblings, 2 replies; 5+ messages in thread
From: Gabriel Francisco Mandaji @ 2018-04-10 22:50 UTC (permalink / raw)
  To: gregkh; +Cc: devel, julia.lawall, linux-kernel, abbotti, lkcamp

Fix most checkpatch.pl issues of type:

CHECK: Alignment should match open parenthesis

Signed-off-by: Gabriel Francisco Mandaji <gfmandaji@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/drivers/cb_pcidas64.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
index fdd81c3..631a703 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -2268,14 +2268,14 @@ static inline unsigned int dma_transfer_size(struct comedi_device *dev)
 }
 
 static u32 ai_convert_counter_6xxx(const struct comedi_device *dev,
-					const struct comedi_cmd *cmd)
+				   const struct comedi_cmd *cmd)
 {
 	/* supposed to load counter with desired divisor minus 3 */
 	return cmd->convert_arg / TIMER_BASE - 3;
 }
 
 static u32 ai_scan_counter_6xxx(struct comedi_device *dev,
-				     struct comedi_cmd *cmd)
+				struct comedi_cmd *cmd)
 {
 	u32 count;
 
@@ -2296,7 +2296,7 @@ static u32 ai_scan_counter_6xxx(struct comedi_device *dev,
 }
 
 static u32 ai_convert_counter_4020(struct comedi_device *dev,
-					struct comedi_cmd *cmd)
+				   struct comedi_cmd *cmd)
 {
 	struct pcidas64_private *devpriv = dev->private;
 	unsigned int divisor;
-- 
1.9.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters
  2018-04-10 22:50 [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters Gabriel Francisco Mandaji
@ 2018-04-11  5:07 ` Julia Lawall
  2018-04-11  9:16   ` Ian Abbott
  2018-04-11  9:18 ` Ian Abbott
  1 sibling, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2018-04-11  5:07 UTC (permalink / raw)
  To: Gabriel Francisco Mandaji; +Cc: devel, gregkh, linux-kernel, abbotti, lkcamp



On Tue, 10 Apr 2018, Gabriel Francisco Mandaji wrote:

> Fix most checkpatch.pl issues of type:
>
> CHECK: Alignment should match open parenthesis
>
> Signed-off-by: Gabriel Francisco Mandaji <gfmandaji@gmail.com>
> ---
>  drivers/staging/comedi/drivers/cb_pcidas64.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
> index fdd81c3..631a703 100644
> --- a/drivers/staging/comedi/drivers/cb_pcidas64.c
> +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
> @@ -2268,14 +2268,14 @@ static inline unsigned int dma_transfer_size(struct comedi_device *dev)
>  }
>
>  static u32 ai_convert_counter_6xxx(const struct comedi_device *dev,
> -					const struct comedi_cmd *cmd)
> +				   const struct comedi_cmd *cmd)

Someone has made the effort to put const on these parameters, but not on
the other similar functions.  Perhaps this can be improved as well.

julia

>  {
>  	/* supposed to load counter with desired divisor minus 3 */
>  	return cmd->convert_arg / TIMER_BASE - 3;
>  }
>
>  static u32 ai_scan_counter_6xxx(struct comedi_device *dev,
> -				     struct comedi_cmd *cmd)
> +				struct comedi_cmd *cmd)
>  {
>  	u32 count;
>
> @@ -2296,7 +2296,7 @@ static u32 ai_scan_counter_6xxx(struct comedi_device *dev,
>  }
>
>  static u32 ai_convert_counter_4020(struct comedi_device *dev,
> -					struct comedi_cmd *cmd)
> +				   struct comedi_cmd *cmd)
>  {
>  	struct pcidas64_private *devpriv = dev->private;
>  	unsigned int divisor;
> --
> 1.9.1
>
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters
  2018-04-11  5:07 ` Julia Lawall
@ 2018-04-11  9:16   ` Ian Abbott
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Abbott @ 2018-04-11  9:16 UTC (permalink / raw)
  To: Julia Lawall, Gabriel Francisco Mandaji
  Cc: devel, gregkh, lkcamp, linux-kernel

On 11/04/18 06:07, Julia Lawall wrote:
> On Tue, 10 Apr 2018, Gabriel Francisco Mandaji wrote:
[snip]
>> diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
>> index fdd81c3..631a703 100644
>> --- a/drivers/staging/comedi/drivers/cb_pcidas64.c
>> +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
>> @@ -2268,14 +2268,14 @@ static inline unsigned int dma_transfer_size(struct comedi_device *dev)
>>   }
>>
>>   static u32 ai_convert_counter_6xxx(const struct comedi_device *dev,
>> -					const struct comedi_cmd *cmd)
>> +				   const struct comedi_cmd *cmd)
> 
> Someone has made the effort to put const on these parameters, but not on
> the other similar functions.  Perhaps this can be improved as well.

Perhaps, but that should be in a separate patch.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters
  2018-04-10 22:50 [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters Gabriel Francisco Mandaji
  2018-04-11  5:07 ` Julia Lawall
@ 2018-04-11  9:18 ` Ian Abbott
  2018-04-12 23:04   ` Gabriel Francisco Mandaji
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Abbott @ 2018-04-11  9:18 UTC (permalink / raw)
  To: Gabriel Francisco Mandaji, gregkh
  Cc: devel, lkcamp, linux-kernel, julia.lawall

On 10/04/18 23:50, Gabriel Francisco Mandaji wrote:
> Fix most checkpatch.pl issues of type:
> 
> CHECK: Alignment should match open parenthesis
> 
> Signed-off-by: Gabriel Francisco Mandaji <gfmandaji@gmail.com>
> ---
>   drivers/staging/comedi/drivers/cb_pcidas64.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
> index fdd81c3..631a703 100644
> --- a/drivers/staging/comedi/drivers/cb_pcidas64.c
> +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
> @@ -2268,14 +2268,14 @@ static inline unsigned int dma_transfer_size(struct comedi_device *dev)
>   }
>   
>   static u32 ai_convert_counter_6xxx(const struct comedi_device *dev,
> -					const struct comedi_cmd *cmd)
> +				   const struct comedi_cmd *cmd)
>   {
>   	/* supposed to load counter with desired divisor minus 3 */
>   	return cmd->convert_arg / TIMER_BASE - 3;
>   }
>   
>   static u32 ai_scan_counter_6xxx(struct comedi_device *dev,
> -				     struct comedi_cmd *cmd)
> +				struct comedi_cmd *cmd)
>   {
>   	u32 count;
>   
> @@ -2296,7 +2296,7 @@ static u32 ai_scan_counter_6xxx(struct comedi_device *dev,
>   }
>   
>   static u32 ai_convert_counter_4020(struct comedi_device *dev,
> -					struct comedi_cmd *cmd)
> +				   struct comedi_cmd *cmd)
>   {
>   	struct pcidas64_private *devpriv = dev->private;
>   	unsigned int divisor;
> 

Looks good, thanks.  I guess the remaining case of open parentheses 
alignment wasn't changed because that would exceed 80 columns.

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters
  2018-04-11  9:18 ` Ian Abbott
@ 2018-04-12 23:04   ` Gabriel Francisco Mandaji
  0 siblings, 0 replies; 5+ messages in thread
From: Gabriel Francisco Mandaji @ 2018-04-12 23:04 UTC (permalink / raw)
  To: Ian Abbott; +Cc: devel, gregkh, linux-kernel, julia.lawall, lkcamp

On Wed, Apr 11, 2018 at 10:18:38AM +0100, Ian Abbott wrote:
> On 10/04/18 23:50, Gabriel Francisco Mandaji wrote:
> >Fix most checkpatch.pl issues of type:
> >
> >CHECK: Alignment should match open parenthesis
> >---
> Looks good, thanks.  I guess the remaining case of open parentheses
> alignment wasn't changed because that would exceed 80 columns.

Exactly. I wasn't sure whether it would be OK to use a temporary variable
to store the longest parameter on that line (devpriv->ai_buffer[devpriv->ai_dma_index]),
so I ended up fixing only the straightforward occurrences.

Thanks!
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2018-04-12 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 22:50 [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters Gabriel Francisco Mandaji
2018-04-11  5:07 ` Julia Lawall
2018-04-11  9:16   ` Ian Abbott
2018-04-11  9:18 ` Ian Abbott
2018-04-12 23:04   ` Gabriel Francisco Mandaji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.