Skip to contentSkip to conversation

Drivers: staging: lustre: lustre: lov: lov_pool: Fixed a coding style warning

PATCH Superseded Rakhi Sharma 2 participants 4 messages Feb 10, 2016 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Drivers: staging: lustre: lustre: lov: lov_pool: Fixed a coding style warning

Fixed a warning.
WARNING: void function return statements are not generally useful.

---
 drivers/staging/lustre/lustre/lov/lov_pool.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/lustre/lustre/lov/lov_pool.c +0 -1
index bba37bf..34e0919 100644
@@ -247,7 +247,6 @@ static void pool_proc_stop(struct seq_file *s, void *v)
 		lov_pool_putref(iter->pool);
 		kfree(iter);
 	}
-	return;
 }
 
 static int pool_proc_show(struct seq_file *s, void *v)
Signature · 1 line
1.9.1
#1 lore raw

The proper strategy to make the subject line is not to simply take the entire path of the file and put ": " in place of /. Unfortunately, there is no deterministic way of making the subject line. Instead, you have to see what other people have done, and hope that that is what the maintainers want.

To see what others have done, you can do the following, for the file that you have changed:

git log --oneline patch/file.c

In your case, most of the examples are actually

staging: lustre:

but that may be too generic. There are a few occurrences of

staging: lustre: lov:

That one seems better for your case. Please send a v2. Since this patch is part of a series, the v2 should contain v2s for all of the patches in the series, even the ones that don't change. Indicate clearly what changes are made and where changes are not made.

julia

Quoted 30 lines · Rakhi Sharma

Fixed a warning.
WARNING: void function return statements are not generally useful.

---
 drivers/staging/lustre/lustre/lov/lov_pool.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/lustre/lustre/lov/lov_pool.c +0 -1
index bba37bf..34e0919 100644
@@ -247,7 +247,6 @@ static void pool_proc_stop(struct seq_file *s, void *v)
 		lov_pool_putref(iter->pool);
 		kfree(iter);
 	}
-	return;
 }
 
 static int pool_proc_show(struct seq_file *s, void *v)
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/1455064774-22091-1-git-send-email-rakhish1994%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
#2 lore raw
Quoted 17 lines · Julia Lawall

The proper strategy to make the subject line is not to simply take the entire path of the file and put ": " in place of /. Unfortunately, there is no deterministic way of making the subject line. Instead, you have to see what other people have done, and hope that that is what the maintainers want.

To see what others have done, you can do the following, for the file that you have changed:

git log --oneline patch/file.c

In your case, most of the examples are actually

staging: lustre:

but that may be too generic. There are a few occurrences of

Quoted 9 lines

staging: lustre: lov:

That one seems better for your case. Please send a v2. Since this patch is part of a series, the v2 should contain v2s for all of the patches in the series, even the ones that don't change. Indicate clearly what changes are made and where changes are not made.

julia

Thanks Julia,
I will send v2, with the changes you have pointed out.

Rakhi

Quoted 40 lines · Rakhi Sharma

Review

Quoted 10 lines

Fixed a warning.
WARNING: void function return statements are not generally useful.

---
 drivers/staging/lustre/lustre/lov/lov_pool.c | 1 -
 1 file changed, 1 deletion(-)
(quoted diff) +0 -0

b/drivers/staging/lustre/lustre/lov/lov_pool.c

drivers/staging/lustre/lustre/lov/lov_pool.c static void pool_proc_stop(struct seq_file *s, void

Quoted 4 lines

index bba37bf..34e0919 100644

drivers/staging/lustre/lustre/lov/lov_pool.c +0 -0
@@ -247,7 +247,6 @@ static void pool_proc_stop(struct seq_file *s, void

*v)

Quoted 10 lines
drivers/staging/lustre/lustre/lov/lov_pool.c +0 -2
              lov_pool_putref(iter->pool);
              kfree(iter);
      }
-     return;
 }
 
 static int pool_proc_show(struct seq_file *s, void *v)
--

1.9.1

Quoted 2 lines

--
You received this message because you are subscribed to the Google

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected].

Quoted 2 lines

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/1455064774-22091-1-git-send-email-rakhish1994%40gmail.com
.

Quoted 2 lines

For more options, visit https://groups.google.com/d/optout.

#3 lore raw
In reply to Rakhi Sharma
Quoted 2 lines · Rakhi Sharma

Fixed a warning.
WARNING: void function return statements are not generally useful.

Write your commit messages in the imperative (like this sentence). Also, it is better to say what you did, rather than just say fix. In your case it could be

"Remove unneeded return at the end of a void function.

This fixes the checkpatch warning: ..."

The subject line should also be more descriptive. A coding style warning could be anything.

julia

Quoted 22 lines
---
 drivers/staging/lustre/lustre/lov/lov_pool.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/lustre/lustre/lov/lov_pool.c +0 -1
index bba37bf..34e0919 100644
@@ -247,7 +247,6 @@ static void pool_proc_stop(struct seq_file *s, void *v)
 		lov_pool_putref(iter->pool);
 		kfree(iter);
 	}
-	return;
 }
 
 static int pool_proc_show(struct seq_file *s, void *v)
Signature · 1 line
1.9.1