mtd: rawnand: nandsim: Add NS_PAGE_BYTE_SHIFT macro to replace the repeat pattern
authorRinHizakura <s921975628@gmail.com>
Sat, 25 Dec 2021 10:07:13 +0000 (18:07 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 23 Jan 2022 15:37:05 +0000 (16:37 +0100)
commit109cf81fb573c1b685282a35e427e76f35870628
tree9bf9e64c2c52dc446a76594df395fb88c98869d2
parentdb52b445793d8e4ffe9b53ff749a55470b900984
mtd: rawnand: nandsim: Add NS_PAGE_BYTE_SHIFT macro to replace the repeat pattern

The (ns->regs.column + ns->regs.off) pattern repeats a lot which
represents the byte shift in next page to access. We can replace it
with a macro to improve the readability.

Signed-off-by: RinHizakura <s921975628@gmail.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20211225100713.119089-1-s921975628@gmail.com
drivers/mtd/nand/raw/nandsim.c