zram: trivial cleanup and `struct table' rename
Subsystems (2)
cover zram: trivial cleanup and `struct table' rename
Hello,
Two trivial patches. One kill off unused define in zram header, the other one rename `struct table'.
P.S. These two patches are against ZRAM with Weijie Yang's "zram: remove global tb_lock with fine grain lock" being applied. If you decided to hold on with the patch in question I'll resend against base ZRAM.
Sergey Senozhatsky (2):
zram: rename struct table' to zram_table_entry'
zram: remove unused SECTOR_SIZE define
drivers/block/zram/zram_drv.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.0.0.421.g5428530
PATCH 1/2 zram: rename struct `table' to `zram_table_entry'
Andrew Morton has recently noted that struct table' actually represents table entry and, thus, should be renamed. Rename to zram_table_entry'.
--- drivers/block/zram/zram_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/zram/zram_drv.h +2 -2
@@ -74,7 +74,7 @@ enum zram_pageflags {/*-- Data structures */ /* Allocated for each disk page */ -struct table { +struct zram_table_entry {unsigned long handle;unsigned long value; };
@@ -92,7 +92,7 @@ struct zram_stats { };struct zram_meta { -struct table *table; +struct zram_table_entry *table;struct zs_pool *mem_pool; };
Signature · 1 line
2.0.0.421.g5428530
PATCH 2/2 zram: remove unused SECTOR_SIZE define
In reply to Sergey SenozhatskyDrop SECTOR_SIZE define, because it's not used.
--- drivers/block/zram/zram_drv.h | 1 - 1 file changed, 1 deletion(-)
drivers/block/zram/zram_drv.h +0 -1
@@ -43,7 +43,6 @@ static const size_t max_zpage_size = PAGE_SIZE / 4 * 3;/*-- End of configurable params */ #define SECTOR_SHIFT 9 -#define SECTOR_SIZE (1 << SECTOR_SHIFT)#define SECTORS_PER_PAGE_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)#define SECTORS_PER_PAGE (1 << SECTORS_PER_PAGE_SHIFT)#define ZRAM_LOGICAL_BLOCK_SHIFT 12
Signature · 1 line
2.0.0.421.g5428530