Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/20220608072534.68850-1-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kefeng Wang and committed by
akpm
13c1c74a 0d8bc0b1

+2
+2
drivers/block/zram/zram_drv.c
··· 52 52 static size_t huge_class_size; 53 53 54 54 static const struct block_device_operations zram_devops; 55 + #ifdef CONFIG_ZRAM_WRITEBACK 55 56 static const struct block_device_operations zram_wb_devops; 57 + #endif 56 58 57 59 static void zram_free_page(struct zram *zram, size_t index); 58 60 static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,