diff mbox series

[1/1] bcache: remove dupplicated declaration from btree.h

Message ID 20200325013057.114340-2-colyli@suse.de (mailing list archive)
State New, archived
Headers show
Series bcache: 2nd wave patch for Linux v5.7-rc1 | expand

Commit Message

Coly Li March 25, 2020, 1:30 a.m. UTC
Commit ab544165dc2d ("bcache: move macro btree() and btree_root()
into btree.h") makes two duplicated declaration into btree.h,
	typedef int (btree_map_keys_fn)();
	int bch_btree_map_keys();

The kbuild test robot <lkp@intel.com> detects and reports this
problem and this patch fixes it by removing the duplicated ones.

Fixes: ab544165dc2d ("bcache: move macro btree() and btree_root() into btree.h")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Coly Li <colyli@suse.de>
---
 drivers/md/bcache/btree.h | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

Jens Axboe March 25, 2020, 1:57 a.m. UTC | #1
On 3/24/20 7:30 PM, Coly Li wrote:
> Commit ab544165dc2d ("bcache: move macro btree() and btree_root()
> into btree.h") makes two duplicated declaration into btree.h,
> 	typedef int (btree_map_keys_fn)();
> 	int bch_btree_map_keys();
> 
> The kbuild test robot <lkp@intel.com> detects and reports this
> problem and this patch fixes it by removing the duplicated ones.
> 
> Fixes: ab544165dc2d ("bcache: move macro btree() and btree_root() into btree.h")

Applied, but I fixed up the commit sha, not sure where yours is from?
Coly Li March 25, 2020, 2:32 a.m. UTC | #2
On 2020/3/25 9:57 上午, Jens Axboe wrote:
> On 3/24/20 7:30 PM, Coly Li wrote:
>> Commit ab544165dc2d ("bcache: move macro btree() and btree_root()
>> into btree.h") makes two duplicated declaration into btree.h,
>> 	typedef int (btree_map_keys_fn)();
>> 	int bch_btree_map_keys();
>>
>> The kbuild test robot <lkp@intel.com> detects and reports this
>> problem and this patch fixes it by removing the duplicated ones.
>>
>> Fixes: ab544165dc2d ("bcache: move macro btree() and btree_root() into btree.h")
> 
> Applied, but I fixed up the commit sha, not sure where yours is from?
> 

I should use the sha from your tree, not mine. I just realize with your
SOB the sha number should change. Sorry for the inconvenience, and I
will notice such condition next time.

BTW, you still find such issue by your own eyes, without any extra tool?

Thanks.
Jens Axboe March 25, 2020, 2:42 a.m. UTC | #3
On 3/24/20 8:32 PM, Coly Li wrote:
> On 2020/3/25 9:57 上午, Jens Axboe wrote:
>> On 3/24/20 7:30 PM, Coly Li wrote:
>>> Commit ab544165dc2d ("bcache: move macro btree() and btree_root()
>>> into btree.h") makes two duplicated declaration into btree.h,
>>> 	typedef int (btree_map_keys_fn)();
>>> 	int bch_btree_map_keys();
>>>
>>> The kbuild test robot <lkp@intel.com> detects and reports this
>>> problem and this patch fixes it by removing the duplicated ones.
>>>
>>> Fixes: ab544165dc2d ("bcache: move macro btree() and btree_root() into btree.h")
>>
>> Applied, but I fixed up the commit sha, not sure where yours is from?
>>
> 
> I should use the sha from your tree, not mine. I just realize with your
> SOB the sha number should change. Sorry for the inconvenience, and I
> will notice such condition next time.
> 
> BTW, you still find such issue by your own eyes, without any extra tool?

Manual inspection, to try and avoid cases where the sha is either too
short, or just plain wrong.
diff mbox series

Patch

diff --git a/drivers/md/bcache/btree.h b/drivers/md/bcache/btree.h
index 7c884f278da8..257969980c49 100644
--- a/drivers/md/bcache/btree.h
+++ b/drivers/md/bcache/btree.h
@@ -282,13 +282,6 @@  void bch_initial_gc_finish(struct cache_set *c);
 void bch_moving_gc(struct cache_set *c);
 int bch_btree_check(struct cache_set *c);
 void bch_initial_mark_key(struct cache_set *c, int level, struct bkey *k);
-typedef int (btree_map_keys_fn)(struct btree_op *op, struct btree *b,
-				struct bkey *k);
-int bch_btree_map_keys_recurse(struct btree *b, struct btree_op *op,
-			       struct bkey *from, btree_map_keys_fn *fn,
-			       int flags);
-int bch_btree_map_keys(struct btree_op *op, struct cache_set *c,
-		       struct bkey *from, btree_map_keys_fn *fn, int flags);
 
 static inline void wake_up_gc(struct cache_set *c)
 {
@@ -402,6 +395,9 @@  typedef int (btree_map_keys_fn)(struct btree_op *op, struct btree *b,
 				struct bkey *k);
 int bch_btree_map_keys(struct btree_op *op, struct cache_set *c,
 		       struct bkey *from, btree_map_keys_fn *fn, int flags);
+int bch_btree_map_keys_recurse(struct btree *b, struct btree_op *op,
+			       struct bkey *from, btree_map_keys_fn *fn,
+			       int flags);
 
 typedef bool (keybuf_pred_fn)(struct keybuf *buf, struct bkey *k);