diff mbox

[05/16] bcache: Remove an unused variable

Message ID 20180315150814.9412-6-bart.vanassche@wdc.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bart Van Assche March 15, 2018, 3:08 p.m. UTC
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
---
 drivers/md/bcache/extents.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Coly Li March 15, 2018, 3:51 p.m. UTC | #1
On 15/03/2018 11:08 PM, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>

Hi Bart,

I suggest to add at least one line commit log, thanks in advance for it :-)

Coly Li

> ---
>  drivers/md/bcache/extents.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c
> index f9d391711595..c334e6666461 100644
> --- a/drivers/md/bcache/extents.c
> +++ b/drivers/md/bcache/extents.c
> @@ -534,7 +534,6 @@ static bool bch_extent_bad_expensive(struct btree *b, const struct bkey *k,
>  static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
>  {
>  	struct btree *b = container_of(bk, struct btree, keys);
> -	struct bucket *g;
>  	unsigned i, stale;
>  
>  	if (!KEY_PTRS(k) ||
> @@ -549,7 +548,6 @@ static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
>  		return false;
>  
>  	for (i = 0; i < KEY_PTRS(k); i++) {
> -		g = PTR_BUCKET(b->c, k, i);
>  		stale = ptr_stale(b->c, k, i);
>  
>  		btree_bug_on(stale > 96, b,
>
Coly Li March 15, 2018, 4:11 p.m. UTC | #2
On 15/03/2018 11:08 PM, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>

Hi Bart,

Could you please to add at least one line commit log ? Thanks in advance
for this :-)

Coly Li

> ---
>  drivers/md/bcache/extents.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c
> index f9d391711595..c334e6666461 100644
> --- a/drivers/md/bcache/extents.c
> +++ b/drivers/md/bcache/extents.c
> @@ -534,7 +534,6 @@ static bool bch_extent_bad_expensive(struct btree *b, const struct bkey *k,
>  static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
>  {
>  	struct btree *b = container_of(bk, struct btree, keys);
> -	struct bucket *g;
>  	unsigned i, stale;
>  
>  	if (!KEY_PTRS(k) ||
> @@ -549,7 +548,6 @@ static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
>  		return false;
>  
>  	for (i = 0; i < KEY_PTRS(k); i++) {
> -		g = PTR_BUCKET(b->c, k, i);
>  		stale = ptr_stale(b->c, k, i);
>  
>  		btree_bug_on(stale > 96, b,
>
Christoph Hellwig March 15, 2018, 4:13 p.m. UTC | #3
On Fri, Mar 16, 2018 at 12:11:16AM +0800, Coly Li wrote:
> On 15/03/2018 11:08 PM, Bart Van Assche wrote:
> > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> 
> Hi Bart,
> 
> Could you please to add at least one line commit log ? Thanks in advance
> for this :-)

Hi subject line perfectly describes the patch, so why?
Coly Li March 15, 2018, 4:43 p.m. UTC | #4
On 16/03/2018 12:13 AM, Christoph Hellwig wrote:
> On Fri, Mar 16, 2018 at 12:11:16AM +0800, Coly Li wrote:
>> On 15/03/2018 11:08 PM, Bart Van Assche wrote:
>>> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
>>
>> Hi Bart,
>>
>> Could you please to add at least one line commit log ? Thanks in advance
>> for this :-)
> 
> Hi subject line perfectly describes the patch, so why?
> 
Hi Christoph,

We are trying to avoid patches with empty commit log for bcache patches.
A patch without commit log works, but just like the fixes to remove
smatch/sparse warning, adding commit log is preferred.

Thanks.

Coly Li
Michael Lyle March 16, 2018, 6:52 p.m. UTC | #5
On 03/15/2018 08:08 AM, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>

LGTM, applying.  (I don't see a problem with empty body).
diff mbox

Patch

diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c
index f9d391711595..c334e6666461 100644
--- a/drivers/md/bcache/extents.c
+++ b/drivers/md/bcache/extents.c
@@ -534,7 +534,6 @@  static bool bch_extent_bad_expensive(struct btree *b, const struct bkey *k,
 static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
 {
 	struct btree *b = container_of(bk, struct btree, keys);
-	struct bucket *g;
 	unsigned i, stale;
 
 	if (!KEY_PTRS(k) ||
@@ -549,7 +548,6 @@  static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
 		return false;
 
 	for (i = 0; i < KEY_PTRS(k); i++) {
-		g = PTR_BUCKET(b->c, k, i);
 		stale = ptr_stale(b->c, k, i);
 
 		btree_bug_on(stale > 96, b,