Skip to contentSkip to conversation

zram: trivial cleanup and `struct table' rename

PATCH New Sergey Senozhatsky 1 participant 3 messages Jun 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 71bc4ad..75d604d 100644
@@ -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
#2 lore raw

PATCH 2/2 zram: remove unused SECTOR_SIZE define

In reply to Sergey Senozhatsky

Drop 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
index 75d604d..cf1bedb 100644
@@ -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