All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtd520.c: Fix new line after dereference operator
@ 2018-02-16 22:16 Ishita Tripathi
  2018-02-16 23:01 ` [Outreachy kernel] " Gargi Sharma
  2018-02-17  7:31 ` Julia Lawall
  0 siblings, 2 replies; 4+ messages in thread
From: Ishita Tripathi @ 2018-02-16 22:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman, H Hartley Sweeten, Ian Abbott; +Cc: outreachy-kernel

Delete new line after the dereference operator (->).
According to https://kernelnewbies.org/CheckpatchTips, it is better to
have longer lines than break at this operator.

Signed-off-by: Ishita Tripathi <sakurakhadag@gmail.com>
---
 drivers/staging/comedi/drivers/rtd520.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
index bb400e0..47b7093 100644
--- a/drivers/staging/comedi/drivers/rtd520.c
+++ b/drivers/staging/comedi/drivers/rtd520.c
@@ -815,9 +815,8 @@ static int rtd_ai_cmdtest(struct comedi_device *dev,
 
 		if (cmd->scan_begin_src == TRIG_TIMER) {
 			arg = cmd->convert_arg * cmd->scan_end_arg;
-			err |= comedi_check_trigger_arg_min(&cmd->
-							    scan_begin_arg,
-							    arg);
+			err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg,
+					arg);
 		}
 	}
 
-- 
changes in v2:
-changed subject line
-improved description
2.7.4



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

* Re: [Outreachy kernel] [PATCH v2] staging: rtd520.c: Fix new line after dereference operator
  2018-02-16 22:16 [PATCH v2] staging: rtd520.c: Fix new line after dereference operator Ishita Tripathi
@ 2018-02-16 23:01 ` Gargi Sharma
  2018-02-17  7:31 ` Julia Lawall
  1 sibling, 0 replies; 4+ messages in thread
From: Gargi Sharma @ 2018-02-16 23:01 UTC (permalink / raw)
  To: Ishita Tripathi
  Cc: Greg Kroah-Hartman, H Hartley Sweeten, Ian Abbott, outreachy-kernel

On Fri, Feb 16, 2018 at 10:16 PM, Ishita Tripathi
<sakurakhadag@gmail.com> wrote:
>
> Delete new line after the dereference operator (->).
> According to https://kernelnewbies.org/CheckpatchTips, it is better to
> have longer lines than break at this operator.
>
> Signed-off-by: Ishita Tripathi <sakurakhadag@gmail.com>
> ---
>  drivers/staging/comedi/drivers/rtd520.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
> index bb400e0..47b7093 100644
> --- a/drivers/staging/comedi/drivers/rtd520.c
> +++ b/drivers/staging/comedi/drivers/rtd520.c
> @@ -815,9 +815,8 @@ static int rtd_ai_cmdtest(struct comedi_device *dev,
>
>                 if (cmd->scan_begin_src == TRIG_TIMER) {
>                         arg = cmd->convert_arg * cmd->scan_end_arg;
> -                       err |= comedi_check_trigger_arg_min(&cmd->
> -                                                           scan_begin_arg,
> -                                                           arg);
> +                       err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg,

This goes over the 80 character limit, and you would want to move
&cmd->scan_begin_arg to the
next line and lining it up with arg.

Thanks,
gargi

> +                                       arg);
>                 }
>         }
>
> --
> changes in v2:
> -changed subject line
> -improved description
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180216221603.GA77503%40ubuntu.
> For more options, visit https://groups.google.com/d/optout.


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

* Re: [Outreachy kernel] [PATCH v2] staging: rtd520.c: Fix new line after dereference operator
  2018-02-16 22:16 [PATCH v2] staging: rtd520.c: Fix new line after dereference operator Ishita Tripathi
  2018-02-16 23:01 ` [Outreachy kernel] " Gargi Sharma
@ 2018-02-17  7:31 ` Julia Lawall
  2018-02-19 10:24   ` Ian Abbott
  1 sibling, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2018-02-17  7:31 UTC (permalink / raw)
  To: Ishita Tripathi
  Cc: Greg Kroah-Hartman, H Hartley Sweeten, Ian Abbott, outreachy-kernel



On Fri, 16 Feb 2018, Ishita Tripathi wrote:

> Delete new line after the dereference operator (->).
> According to https://kernelnewbies.org/CheckpatchTips, it is better to
> have longer lines than break at this operator.
>
> Signed-off-by: Ishita Tripathi <sakurakhadag@gmail.com>
> ---
>  drivers/staging/comedi/drivers/rtd520.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
> index bb400e0..47b7093 100644
> --- a/drivers/staging/comedi/drivers/rtd520.c
> +++ b/drivers/staging/comedi/drivers/rtd520.c
> @@ -815,9 +815,8 @@ static int rtd_ai_cmdtest(struct comedi_device *dev,
>
>  		if (cmd->scan_begin_src == TRIG_TIMER) {
>  			arg = cmd->convert_arg * cmd->scan_end_arg;
> -			err |= comedi_check_trigger_arg_min(&cmd->
> -							    scan_begin_arg,
> -							    arg);
> +			err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg,
> +					arg);
>  		}
>  	}
>
> --
> changes in v2:
> -changed subject line
> -improved description

Greg asked you not to move arg and I asked you to move the first line down
to the next line to line up with arg (and thus not exceed 80 characters).
These suggestions are contradictory, but you should do at least one of
them.

julia

> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180216221603.GA77503%40ubuntu.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] [PATCH v2] staging: rtd520.c: Fix new line after dereference operator
  2018-02-17  7:31 ` Julia Lawall
@ 2018-02-19 10:24   ` Ian Abbott
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Abbott @ 2018-02-19 10:24 UTC (permalink / raw)
  To: Julia Lawall, Ishita Tripathi
  Cc: Greg Kroah-Hartman, H Hartley Sweeten, outreachy-kernel

On 17/02/18 07:31, Julia Lawall wrote:
> 
> 
> On Fri, 16 Feb 2018, Ishita Tripathi wrote:
> 
>> Delete new line after the dereference operator (->).
>> According to https://kernelnewbies.org/CheckpatchTips, it is better to
>> have longer lines than break at this operator.
>>
>> Signed-off-by: Ishita Tripathi <sakurakhadag@gmail.com>
>> ---
>>   drivers/staging/comedi/drivers/rtd520.c | 5 ++---
>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
>> index bb400e0..47b7093 100644
>> --- a/drivers/staging/comedi/drivers/rtd520.c
>> +++ b/drivers/staging/comedi/drivers/rtd520.c
>> @@ -815,9 +815,8 @@ static int rtd_ai_cmdtest(struct comedi_device *dev,
>>
>>   		if (cmd->scan_begin_src == TRIG_TIMER) {
>>   			arg = cmd->convert_arg * cmd->scan_end_arg;
>> -			err |= comedi_check_trigger_arg_min(&cmd->
>> -							    scan_begin_arg,
>> -							    arg);
>> +			err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg,
>> +					arg);
>>   		}
>>   	}
>>
>> --
>> changes in v2:
>> -changed subject line
>> -improved description
> 
> Greg asked you not to move arg and I asked you to move the first line down
> to the next line to line up with arg (and thus not exceed 80 characters).
> These suggestions are contradictory, but you should do at least one of
> them.
> 
> julia

How about adding a line break between 'err |=' and 
'comedi_check_trigger_arg_min'?  That will avoid the line break after 
the dereference operator and still keep the line length within 80 
characters.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


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

end of thread, other threads:[~2018-02-19 10:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-16 22:16 [PATCH v2] staging: rtd520.c: Fix new line after dereference operator Ishita Tripathi
2018-02-16 23:01 ` [Outreachy kernel] " Gargi Sharma
2018-02-17  7:31 ` Julia Lawall
2018-02-19 10:24   ` Ian Abbott

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.