* [PATCH] zram: fix unused 'zram_wb_devops' warning
@ 2022-06-08 7:25 Kefeng Wang
2022-07-12 14:17 ` Kefeng Wang
2022-07-12 14:33 ` Sergey Senozhatsky
0 siblings, 2 replies; 3+ messages in thread
From: Kefeng Wang @ 2022-06-08 7:25 UTC (permalink / raw)
To: Minchan Kim, Nitin Gupta, Sergey Senozhatsky, Jens Axboe,
linux-kernel
Cc: linux-block, Kefeng Wang
drivers/block/zram/zram_drv.c:55:45: warning: 'zram_wb_devops' defined but not used [-Wunused-const-variable=]
Fix the above warning if CONFIG_ZRAM_WRITEBACK not enabled.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
drivers/block/zram/zram_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 39cd1397ed3b..fff5eb4d3f20 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -52,7 +52,9 @@ static unsigned int num_devices = 1;
static size_t huge_class_size;
static const struct block_device_operations zram_devops;
+#ifdef CONFIG_ZRAM_WRITEBACK
static const struct block_device_operations zram_wb_devops;
+#endif
static void zram_free_page(struct zram *zram, size_t index);
static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] zram: fix unused 'zram_wb_devops' warning
2022-06-08 7:25 [PATCH] zram: fix unused 'zram_wb_devops' warning Kefeng Wang
@ 2022-07-12 14:17 ` Kefeng Wang
2022-07-12 14:33 ` Sergey Senozhatsky
1 sibling, 0 replies; 3+ messages in thread
From: Kefeng Wang @ 2022-07-12 14:17 UTC (permalink / raw)
To: Minchan Kim, Nitin Gupta, Sergey Senozhatsky, Jens Axboe,
linux-kernel
Cc: linux-block, Linux MM, Andrew Morton
+mm, kindly ping...
On 2022/6/8 15:25, Kefeng Wang wrote:
> drivers/block/zram/zram_drv.c:55:45: warning: 'zram_wb_devops' defined but not used [-Wunused-const-variable=]
>
> Fix the above warning if CONFIG_ZRAM_WRITEBACK not enabled.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/block/zram/zram_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 39cd1397ed3b..fff5eb4d3f20 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -52,7 +52,9 @@ static unsigned int num_devices = 1;
> static size_t huge_class_size;
>
> static const struct block_device_operations zram_devops;
> +#ifdef CONFIG_ZRAM_WRITEBACK
> static const struct block_device_operations zram_wb_devops;
> +#endif
>
> static void zram_free_page(struct zram *zram, size_t index);
> static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] zram: fix unused 'zram_wb_devops' warning
2022-06-08 7:25 [PATCH] zram: fix unused 'zram_wb_devops' warning Kefeng Wang
2022-07-12 14:17 ` Kefeng Wang
@ 2022-07-12 14:33 ` Sergey Senozhatsky
1 sibling, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2022-07-12 14:33 UTC (permalink / raw)
To: Kefeng Wang, Andrew Morton
Cc: Minchan Kim, Nitin Gupta, Sergey Senozhatsky, Jens Axboe,
linux-kernel, linux-block
+ Andrew
Message ID: 20220608072534.68850-1-wangkefeng.wang@huawei.com
On (22/06/08 15:25), Kefeng Wang wrote:
> drivers/block/zram/zram_drv.c:55:45: warning: 'zram_wb_devops' defined but not used [-Wunused-const-variable=]
>
> Fix the above warning if CONFIG_ZRAM_WRITEBACK not enabled.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/block/zram/zram_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 39cd1397ed3b..fff5eb4d3f20 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -52,7 +52,9 @@ static unsigned int num_devices = 1;
> static size_t huge_class_size;
>
> static const struct block_device_operations zram_devops;
> +#ifdef CONFIG_ZRAM_WRITEBACK
> static const struct block_device_operations zram_wb_devops;
> +#endif
>
> static void zram_free_page(struct zram *zram, size_t index);
> static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-12 14:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 7:25 [PATCH] zram: fix unused 'zram_wb_devops' warning Kefeng Wang
2022-07-12 14:17 ` Kefeng Wang
2022-07-12 14:33 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).