]> git.baikalelectronics.ru Git - kernel.git/commit
zram: only make zram_wb_devops for CONFIG_ZRAM_WRITEBACK
authorJens Axboe <axboe@kernel.dk>
Fri, 26 Nov 2021 16:57:32 +0000 (09:57 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 26 Nov 2021 16:57:32 +0000 (09:57 -0700)
commit6ec0d1d669edc0ebcba2c6d94d94cf1c668d1e53
treef93b94f3c73bbb46a5bd56416402dc355d05d724
parent8d4526aa89edd0f3ef9c72f27979866a9284a88d
zram: only make zram_wb_devops for CONFIG_ZRAM_WRITEBACK

If writeback isn't configured, then we get the following warning when
compiling zram:

drivers/block/zram/zram_drv.c:1824:45: warning: unused variable 'zram_wb_devops' [-Wunused-const-variable]

Make sure we only define the block_device_operations if that option is
enabled.

Link: https://lore.kernel.org/lkml/202111261614.gCJMqcyh-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/zram/zram_drv.c