@@ -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);
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(-)