diff mbox

[5/6] SQUASHME: pmem: Remove SECTOR_SHIFT

Message ID 551AA0E9.8090306@plexistor.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boaz Harrosh March 31, 2015, 1:28 p.m. UTC
Remove SECTOR_SHIFT. It is defined in 6 other places
in the Kernel. I do not like a new one. 9 is used through
out, including block core. I do not like pmem to blasphemy
more than needed.

Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
---
 drivers/block/pmem.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c
index 209a410..508c9a8 100644
--- a/drivers/block/pmem.c
+++ b/drivers/block/pmem.c
@@ -25,10 +25,6 @@ 
 #include <linux/moduleparam.h>
 #include <linux/slab.h>
 
-#define SECTOR_SHIFT		9
-#define PAGE_SECTORS_SHIFT	(PAGE_SHIFT - SECTOR_SHIFT)
-#define PAGE_SECTORS		(1 << PAGE_SECTORS_SHIFT)
-
 #define PMEM_MINORS		16
 
 struct pmem_device {
@@ -227,7 +223,7 @@  static int pmem_probe(struct platform_device *pdev)
 	disk->flags		= GENHD_FL_EXT_DEVT;
 	sprintf(disk->disk_name, "pmem%d", idx);
 	disk->driverfs_dev = &pdev->dev;
-	set_capacity(disk, pmem->size >> SECTOR_SHIFT);
+	set_capacity(disk, pmem->size >> 9);
 	pmem->pmem_disk = disk;
 
 	add_disk(disk);