Re: [PATCH 2/3] mtd: rawnand: nandsim: Merge repeat codes in ns_switch_state

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:06:48
> Betreff: [PATCH 2/3] mtd: rawnand: nandsim: Merge repeat codes in ns_switch_state

> From: RinHizakura <s921975628@xxxxxxxxx>
>
> The moving block of codes is shared between both 'if' and 'else' condition,
> we can move it out to reduce the duplication.
>
> Signed-off-by: RinHizakura <s921975628@xxxxxxxxx>
> ---
> drivers/mtd/nand/raw/nandsim.c | 19 ++++++-------------
> 1 file changed, 6 insertions(+), 13 deletions(-)

Reviewed-by: Richard Weinberger <richard@xxxxxx>

Thanks,
//richard