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 <b...@plexistor.com>
---
 drivers/block/pmem.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

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);
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to