Skip to content

Commit 13c1c74

Browse files
Kefeng Wangakpm00
authored andcommitted
zram: fix unused 'zram_wb_devops' warning
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. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kefeng Wang <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 0d8bc0b commit 13c1c74

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/block/zram/zram_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ static unsigned int num_devices = 1;
5252
static size_t huge_class_size;
5353

5454
static const struct block_device_operations zram_devops;
55+
#ifdef CONFIG_ZRAM_WRITEBACK
5556
static const struct block_device_operations zram_wb_devops;
57+
#endif
5658

5759
static void zram_free_page(struct zram *zram, size_t index);
5860
static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,

0 commit comments

Comments
 (0)