Skip to contentSkip to conversation

Fix checkpatch issue

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix checkpatch issue

Deleted line break after dereference 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 · 1 line
2.7.4
#1 lore raw
Quoted 1 line · Ishita Tripathi

Deleted line break after dereference operator (->)

Your subject is a bit "odd" :)

Please look at other patches for this directory to see the proper prefix to use.

Quoted 12 lines
---
 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 819

Quoted 8 lines
drivers/staging/comedi/drivers/rtd520.c +2 -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,
+					arg);

No need to move the last line here, right? Please keep it as-is.

thanks,

greg k-h

#2 lore raw
In reply to Ishita Tripathi
Quoted 1 line · Ishita Tripathi

Deleted line break after dereference operator (->)

Thank you for your patch. There are some issues with various parts of it, however.

First, the "To" list looks strange. There should not be the --to: and the ; after the email of H Hartley Sweeten. Did these come from th get_maintainers script?

Next, the subject line should give some information about what files are affected. Run git log --oneline drivers/staging/comedi/drivers/rtd520.c to see what are the subject lines that others have used on this file.

Next, "Fix checkpatch issue" is not very descriptive. Find something short that described what you do. You can put that the issue was found using checkpatch at the end of the commit log message.

Next, the commit log message should be in the imperative, like you are ordering the patch to do something. So it would be "Delete" rather than "Deleted". Here you may also want to say why you made the change. I think the code is more readable without these strange linebreaks.

Finally, it could be better to just put &cmd->scan_begin_arg on the next line, lined up with arg, rather than going over the 80 character limit.

Please send a v2 patch. There are some hints about doing this in the tutorial.

julia

Quoted 33 lines
---
 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);
 		}
 	}
 
--

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/20180216204100.GA76452%40ubuntu.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw
In reply to Ishita Tripathi

Hi!
I'm very sorry about the horrible quality. I'll try better with v2. Thank you very much for the replies.
Ishita

Quoted 32 lines · Ishita Tripathi

Deleted line break after dereference 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 · 1 line
2.7.4