mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
mtd: nandsim: simplify NS_RAW_OFFSET()
Simplify the definision of NS_RAW_OFFSET() by using (ns)->geom.pgszoob which holds the sum of page size and OOB size. 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>
This commit is contained in:
parent
f03a572928
commit
3b8b8fa1ed
1 changed files with 1 additions and 1 deletions
|
@ -205,7 +205,7 @@ MODULE_PARM_DESC(bch, "Enable BCH ecc and set how many bits should "
|
|||
|
||||
/* Calculate the page offset in flash RAM image by (row, column) address */
|
||||
#define NS_RAW_OFFSET(ns) \
|
||||
(((ns)->regs.row << (ns)->geom.pgshift) + ((ns)->regs.row * (ns)->geom.oobsz) + (ns)->regs.column)
|
||||
(((ns)->regs.row * (ns)->geom.pgszoob) + (ns)->regs.column)
|
||||
|
||||
/* Calculate the OOB offset in flash RAM image by (row, column) address */
|
||||
#define NS_RAW_OFFSET_OOB(ns) (NS_RAW_OFFSET(ns) + ns->geom.pgsz)
|
||||
|
|
Loading…
Reference in a new issue