diff mbox series

[07/14] bcache: remove useless bucket_pages()

Message ID 20200815041043.45116-8-colyli@suse.de (mailing list archive)
State New, archived
Headers show
Series bcache: remove multiple caches code framework | expand

Commit Message

Coly Li Aug. 15, 2020, 4:10 a.m. UTC
It seems alloc_bucket_pages() is the only user of bucket_pages().
Considering alloc_bucket_pages() is removed from bcache code, it is safe
to remove the useless macro bucket_pages() now.

Signed-off-by: Coly Li <colyli@suse.de>
---
 drivers/md/bcache/bcache.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Hannes Reinecke Aug. 17, 2020, 6:18 a.m. UTC | #1
On 8/15/20 6:10 AM, Coly Li wrote:
> It seems alloc_bucket_pages() is the only user of bucket_pages().
> Considering alloc_bucket_pages() is removed from bcache code, it is safe
> to remove the useless macro bucket_pages() now.
> 
> Signed-off-by: Coly Li <colyli@suse.de>
> ---
>   drivers/md/bcache/bcache.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h
> index 29bec61cafbb..48a2585b6bbb 100644
> --- a/drivers/md/bcache/bcache.h
> +++ b/drivers/md/bcache/bcache.h
> @@ -757,7 +757,6 @@ struct bbio {
>   #define btree_default_blocks(c)						\
>   	((unsigned int) ((PAGE_SECTORS * (c)->btree_pages) >> (c)->block_bits))
>   
> -#define bucket_pages(c)		((c)->sb.bucket_size / PAGE_SECTORS)
>   #define bucket_bytes(c)		((c)->sb.bucket_size << 9)
>   #define block_bytes(ca)		((ca)->sb.block_size << 9)
>   
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h
index 29bec61cafbb..48a2585b6bbb 100644
--- a/drivers/md/bcache/bcache.h
+++ b/drivers/md/bcache/bcache.h
@@ -757,7 +757,6 @@  struct bbio {
 #define btree_default_blocks(c)						\
 	((unsigned int) ((PAGE_SECTORS * (c)->btree_pages) >> (c)->block_bits))
 
-#define bucket_pages(c)		((c)->sb.bucket_size / PAGE_SECTORS)
 #define bucket_bytes(c)		((c)->sb.bucket_size << 9)
 #define block_bytes(ca)		((ca)->sb.block_size << 9)