Commit 2ccbec05 authored by Nitin Gupta's avatar Nitin Gupta Committed by Greg Kroah-Hartman

zram: Fix sparse warnings

Fixes sparse warning:
zram_drv.c:666:6: warning: symbol 'zram_slot_free_notify' was not
declared. Should it be static?

Also, max_zpage_size is now size_t just to be consistent with data-type
of other variables maintaining sizes of various kinds.
Signed-off-by: default avatarNitin Gupta <ngupta@vflare.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 25d7315a
...@@ -697,7 +697,8 @@ int zram_init_device(struct zram *zram) ...@@ -697,7 +697,8 @@ int zram_init_device(struct zram *zram)
return ret; return ret;
} }
void zram_slot_free_notify(struct block_device *bdev, unsigned long index) static void zram_slot_free_notify(struct block_device *bdev,
unsigned long index)
{ {
struct zram *zram; struct zram *zram;
......
...@@ -47,7 +47,7 @@ static const unsigned default_disksize_perc_ram = 25; ...@@ -47,7 +47,7 @@ static const unsigned default_disksize_perc_ram = 25;
* Pages that compress to size greater than this are stored * Pages that compress to size greater than this are stored
* uncompressed in memory. * uncompressed in memory.
*/ */
static const unsigned max_zpage_size = PAGE_SIZE / 4 * 3; static const size_t max_zpage_size = PAGE_SIZE / 4 * 3;
/* /*
* NOTE: max_zpage_size must be less than or equal to: * NOTE: max_zpage_size must be less than or equal to:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment