[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1874445287.7454806.1415535792984.JavaMail.zimbra@redhat.com>
Date: Sun, 9 Nov 2014 07:23:12 -0500 (EST)
From: Rodrigo Freire <rfreire@...hat.com>
To: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Jörn Engel <joern@...fs.org>,
Felix Fietkau <nbd@...nwrt.org>, dwmw2@...radead.org,
Herton Krzesinski <hkrzesin@...hat.com>,
Brian Norris <computersforpeace@...il.com>
Subject: [PATCH v3 3/3] mtd: block2mtd: Removes PAGE_MASK as a index to
partition size
From: Felix Fietkau <nbd@...nwrt.org>
mtd: block2mtd: Removes PAGE_MASK as a index to partition size
PAGE_MASK is no longer needed with the new term.
This patch keeps the device size aligned with the erase_size.
Signed-off-by: Felix Fietkau <nbd@...nwrt.org>
Signed-off-by: Rodrigo Freire <rfreire@...hat.com>
Signed-off-by: Herton Krzesinski <herton@...hat.com>
---
V3: Separated on a single patch
--- a/drivers/mtd/devices/block2mtd.c 2014-11-07 17:40:58.688747820 -0200
+++ b/drivers/mtd/devices/block2mtd.c 2014-11-07 17:41:28.054750893 -0200
@@ -291,8 +291,7 @@ static struct block2mtd_dev *add_device(
goto err_destroy_mutex;
dev->mtd.name = name;
-
- dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
+ dev->mtd.size = dev->blkdev->bd_inode->i_size & ~(erase_size - 1);
dev->mtd.erasesize = erase_size;
dev->mtd.writesize = 1;
dev->mtd.writebufsize = PAGE_SIZE;
---
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists