All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: i2o: Convert comment from C99 style to C89 style
@ 2015-02-18 19:21 Vatika Harlalka
  2015-02-18 20:06 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Vatika Harlalka @ 2015-02-18 19:21 UTC (permalink / raw)
  To: outreachy-kernel

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 <vatikaharlalka@gmail.com>
---
 drivers/staging/i2o/debug.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/i2o/debug.c b/drivers/staging/i2o/debug.c
index 3e959a4..c8d690c 100644
--- a/drivers/staging/i2o/debug.c
+++ b/drivers/staging/i2o/debug.c
@@ -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",
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Staging: i2o: Convert comment from C99 style to C89 style
  2015-02-18 19:21 [PATCH] Staging: i2o: Convert comment from C99 style to C89 style Vatika Harlalka
@ 2015-02-18 20:06 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2015-02-18 20:06 UTC (permalink / raw)
  To: Vatika Harlalka; +Cc: outreachy-kernel

On Thu, 19 Feb 2015, Vatika Harlalka wrote:

> 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


> 
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
>  drivers/staging/i2o/debug.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/i2o/debug.c b/drivers/staging/i2o/debug.c
> index 3e959a4..c8d690c 100644
> --- a/drivers/staging/i2o/debug.c
> +++ b/drivers/staging/i2o/debug.c
> @@ -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",
> -- 
> 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 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/20150218192100.GA18100%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


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

* [PATCH] Staging: i2o: Convert comment from C99 style to C89 style
@ 2015-02-17 22:22 Vatika Harlalka
  0 siblings, 0 replies; 3+ messages in thread
From: Vatika Harlalka @ 2015-02-17 22:22 UTC (permalink / raw)
  To: outreachy-kernel

This patch fixes checkpatch.pl error in debug.c
ERROR: do not use C99 // comments 

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/i2o/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/i2o/debug.c b/drivers/staging/i2o/debug.c
index 4f23e3f..534a9b6 100644
--- a/drivers/staging/i2o/debug.c
+++ b/drivers/staging/i2o/debug.c
@@ -22,7 +22,7 @@ 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);
 
-- 
1.9.1



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

end of thread, other threads:[~2015-02-18 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 19:21 [PATCH] Staging: i2o: Convert comment from C99 style to C89 style Vatika Harlalka
2015-02-18 20:06 ` [Outreachy kernel] " Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2015-02-17 22:22 Vatika Harlalka

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.