[PATCH 3/3] mtd: rawnand: nandsim: Add NS_PAGE_BYTE_SHIFT macro to replace the repeat pattern

Richard Weinberger richard at nod.at
Sat Dec 25 13:17:28 PST 2021


----- Ursprüngliche Mail -----
> Von: s921975628 at gmail.com
> An: "richard" <richard at nod.at>, "Vignesh Raghavendra" <vigneshr at ti.com>, "Miquel Raynal" <miquel.raynal at bootlin.com>
> CC: "linux-mtd" <linux-mtd at lists.infradead.org>, "linux-kernel" <linux-kernel at vger.kernel.org>, "RinHizakura"
> <s921975628 at gmail.com>
> Gesendet: Samstag, 25. Dezember 2021 11:07:13
> Betreff: [PATCH 3/3] mtd: rawnand: nandsim: Add NS_PAGE_BYTE_SHIFT macro to replace the repeat pattern

> From: RinHizakura <s921975628 at gmail.com>
> 
> 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 at gmail.com>
> ---
> drivers/mtd/nand/raw/nandsim.c | 19 +++++++++++--------
> 1 file changed, 11 insertions(+), 8 deletions(-)

Reviewed-by: Richard Weinberger <richard at nod.at>

Thanks,
//richard



More information about the linux-mtd mailing list