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

From: Richard Weinberger
Date: Sat Dec 25 2021 - 16:55:56 EST


----- Ursprüngliche Mail -----
> Von: s921975628@xxxxxxxxx
> An: "richard" <richard@xxxxxx>, "Vignesh Raghavendra" <vigneshr@xxxxxx>, "Miquel Raynal" <miquel.raynal@xxxxxxxxxxx>
> CC: "linux-mtd" <linux-mtd@xxxxxxxxxxxxxxxxxxx>, "linux-kernel" <linux-kernel@xxxxxxxxxxxxxxx>, "RinHizakura"
> <s921975628@xxxxxxxxx>
> 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@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> ---
> drivers/mtd/nand/raw/nandsim.c | 19 +++++++++++--------
> 1 file changed, 11 insertions(+), 8 deletions(-)

Reviewed-by: Richard Weinberger <richard@xxxxxx>

Thanks,
//richard