Skip to contentSkip to conversation

staging: rtd520.c: Fix new line after dereference operator

PATCH In review Ishita Tripathi 4 participants 4 messages Feb 16, 2018 – Feb 19, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtd520.c: Fix new line after dereference operator

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.

---
 drivers/staging/comedi/drivers/rtd520.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/comedi/drivers/rtd520.c +2 -3
index bb400e0..47b7093 100644
@@ -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);
 		}
 	}
 
Signature · 4 lines
changes in v2:
-changed subject line
-improved description
2.7.4
#1 lore raw
Quoted 15 lines · Ishita Tripathi

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.

---
 drivers/staging/comedi/drivers/rtd520.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/comedi/drivers/rtd520.c +0 -0
index bb400e0..47b7093 100644

drivers/staging/comedi/drivers/rtd520.c static int rtd_ai_cmdtest(struct comedi_device *dev, · line 818

Quoted 7 lines
drivers/staging/comedi/drivers/rtd520.c +1 -3
@@ -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

Quoted 16 lines
drivers/staging/comedi/drivers/rtd520.c +1 -1
+                                       arg);
                }
        }
 
--

changes in v2:

drivers/staging/comedi/drivers/rtd520.c +0 -2
-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 [email protected]. To post to this group, send email to [email protected].
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.

#2 lore raw
In reply to Ishita Tripathi
Quoted 27 lines · Ishita Tripathi

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.

---
 drivers/staging/comedi/drivers/rtd520.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/comedi/drivers/rtd520.c +2 -4
index bb400e0..47b7093 100644
@@ -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:

drivers/staging/comedi/drivers/rtd520.c

Quoted 2 lines
drivers/staging/comedi/drivers/rtd520.c +0 -2
-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

Quoted 9 lines

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 [email protected]. To post to this group, send email to [email protected].
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.

#3 lore raw
Quoted 39 lines · Julia Lawall
Quoted 27 lines · Ishita Tripathi

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.

---
  drivers/staging/comedi/drivers/rtd520.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/comedi/drivers/rtd520.c +2 -4
index bb400e0..47b7093 100644
@@ -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:

drivers/staging/comedi/drivers/rtd520.c

Quoted 2 lines
drivers/staging/comedi/drivers/rtd520.c +0 -2
-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.

Quoted 1 line

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.

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-