Staging: i2o: Convert comment from C99 style to C89 style
PATCH 1/1 Staging: i2o: Convert comment from C99 style to C89 style
C99 style comment // should not be used as per coding guidelines. Usage of C99 style comment // was resulting in checkpatch.pl error. Hence replaced it with block comment /* */
Signed-off-by Vatika Harlalka <[email protected]>
--- drivers/staging/i2o/debug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/i2o/debug.c +6 -6
@@ -22,17 +22,17 @@ void i2o_report_status(const char *severity, const char *str,u16 detailed_status = msg[4 ] &0xFFFF ;if (cmd ==I2O_CMD_UTIL_EVT_REGISTER ) -return ;// No status in this reply +return ;/* No status in this reply */ printk ("%s%s: " , severity, str); -if (cmd <0x1F )// Utility cmd +if (cmd <0x1F )/* Utility cmd */ i2o_report_util_cmd (cmd); -else if (cmd >=0xA0 && cmd <=0xEF )// Executive cmd +else if (cmd >=0xA0 && cmd <=0xEF )/* Executive cmd */ i2o_report_exec_cmd (cmd);else -printk ("Cmd = %0#2x, " , cmd);// Other cmds +printk ("Cmd = %0#2x, " , cmd);/* Other cmds */ if (msg[0 ] &MSG_FAIL ) {i2o_report_fail_status (req_status, msg);
@@ -156,14 +156,14 @@ static void i2o_report_common_dsc(u16 detailed_status) {static char *COMMON_DSC [] = {"SUCCESS" , -"0x01" ,// not used +"0x01" ,/* not used */ "BAD_KEY" ,"TCL_ERROR" ,"REPLY_BUFFER_FULL" ,"NO_SUCH_PAGE" ,"INSUFFICIENT_RESOURCE_SOFT" ,"INSUFFICIENT_RESOURCE_HARD" , -"0x08" ,// not used +"0x08" ,/* not used */ "CHAIN_BUFFER_TOO_LARGE" ,"UNSUPPORTED_FUNCTION" ,"DEVICE_LOCKED" ,
Signature · 1 line
1.9.1
Quoted 3 lines · Vatika Harlalka
C99 style comment // should not be used as per coding guidelines. Usage of C99 style comment // was resulting in checkpatch.pl error. Hence replaced it with block comment /* */
The commit message is a bit too verbose, as compared to the information it provides. In this case, probably just the first line is good enough.
In general, try to avoid mentioning checkpatch in your commit message. Explain what you are doing and why.
julia
Quoted 59 lines
Signed-off-by Vatika Harlalka <[email protected]>--- drivers/staging/i2o/debug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/staging/i2o/debug.c +6
-6@@ -22,17 +22,17 @@ void i2o_report_status(const char *severity, const char *str,u16 detailed_status = msg[4 ] &0xFFFF ;if (cmd ==I2O_CMD_UTIL_EVT_REGISTER ) -return ;// No status in this reply +return ;/* No status in this reply */ printk ("%s%s: " , severity, str); -if (cmd <0x1F )// Utility cmd +if (cmd <0x1F )/* Utility cmd */ i2o_report_util_cmd (cmd); -else if (cmd >=0xA0 && cmd <=0xEF )// Executive cmd +else if (cmd >=0xA0 && cmd <=0xEF )/* Executive cmd */ i2o_report_exec_cmd (cmd);else -printk ("Cmd = %0#2x, " , cmd);// Other cmds +printk ("Cmd = %0#2x, " , cmd);/* Other cmds */ if (msg[0 ] &MSG_FAIL ) {i2o_report_fail_status (req_status, msg);@@ -156,14 +156,14 @@ static void i2o_report_common_dsc(u16 detailed_status) {static char *COMMON_DSC [] = {"SUCCESS" , -"0x01" ,// not used +"0x01" ,/* not used */ "BAD_KEY" ,"TCL_ERROR" ,"REPLY_BUFFER_FULL" ,"NO_SUCH_PAGE" ,"INSUFFICIENT_RESOURCE_SOFT" ,"INSUFFICIENT_RESOURCE_HARD" , -"0x08" ,// not used +"0x08" ,/* not used */ "CHAIN_BUFFER_TOO_LARGE" ,"UNSUPPORTED_FUNCTION" ,"DEVICE_LOCKED" ,Signature · 8 lines
1.9.1 -- 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/20150218192100.GA18100%40gmail.com. For more options, visit https://groups.google.com/d/optout.