aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2013-07-27 22:21:58 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-05 16:06:02 -0400
commit2f3b07a7fcaac760cfefec6af123d52b2ea7c71e (patch)
tree9ec996f3ac27a044003c2020ae3812dfa98d1d3c
parent8e716a8b581a4700932a52ee89e981fa3339e0ff (diff)
mtd: nandsim: remove unused ns->geom.oobshift
ns->geom.oobshift holds bits number in OOB size, but OOB size is not always power of two. So it is useless and it actually isn't used in this driver except for just printing the value at module loading. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/nand/nandsim.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index ce90990cdce2..9e04de043aa3 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -336,7 +336,6 @@ struct nandsim {
336 uint pgsec; /* number of pages per sector */ 336 uint pgsec; /* number of pages per sector */
337 uint secshift; /* bits number in sector size */ 337 uint secshift; /* bits number in sector size */
338 uint pgshift; /* bits number in page size */ 338 uint pgshift; /* bits number in page size */
339 uint oobshift; /* bits number in OOB size */
340 uint pgaddrbytes; /* bytes per page address */ 339 uint pgaddrbytes; /* bytes per page address */
341 uint secaddrbytes; /* bytes per sector address */ 340 uint secaddrbytes; /* bytes per sector address */
342 uint idbytes; /* the number ID bytes that this chip outputs */ 341 uint idbytes; /* the number ID bytes that this chip outputs */
@@ -689,7 +688,6 @@ static int init_nandsim(struct mtd_info *mtd)
689 ns->geom.totszoob = ns->geom.totsz + (uint64_t)ns->geom.pgnum * ns->geom.oobsz; 688 ns->geom.totszoob = ns->geom.totsz + (uint64_t)ns->geom.pgnum * ns->geom.oobsz;
690 ns->geom.secshift = ffs(ns->geom.secsz) - 1; 689 ns->geom.secshift = ffs(ns->geom.secsz) - 1;
691 ns->geom.pgshift = chip->page_shift; 690 ns->geom.pgshift = chip->page_shift;
692 ns->geom.oobshift = ffs(ns->geom.oobsz) - 1;
693 ns->geom.pgsec = ns->geom.secsz / ns->geom.pgsz; 691 ns->geom.pgsec = ns->geom.secsz / ns->geom.pgsz;
694 ns->geom.secszoob = ns->geom.secsz + ns->geom.oobsz * ns->geom.pgsec; 692 ns->geom.secszoob = ns->geom.secsz + ns->geom.oobsz * ns->geom.pgsec;
695 ns->options = 0; 693 ns->options = 0;
@@ -773,7 +771,7 @@ static int init_nandsim(struct mtd_info *mtd)
773 printk("bus width: %u\n", ns->busw); 771 printk("bus width: %u\n", ns->busw);
774 printk("bits in sector size: %u\n", ns->geom.secshift); 772 printk("bits in sector size: %u\n", ns->geom.secshift);
775 printk("bits in page size: %u\n", ns->geom.pgshift); 773 printk("bits in page size: %u\n", ns->geom.pgshift);
776 printk("bits in OOB size: %u\n", ns->geom.oobshift); 774 printk("bits in OOB size: %u\n", ffs(ns->geom.oobsz) - 1);
777 printk("flash size with OOB: %llu KiB\n", 775 printk("flash size with OOB: %llu KiB\n",
778 (unsigned long long)ns->geom.totszoob >> 10); 776 (unsigned long long)ns->geom.totszoob >> 10);
779 printk("page address bytes: %u\n", ns->geom.pgaddrbytes); 777 printk("page address bytes: %u\n", ns->geom.pgaddrbytes);