2020-07-24 08:39:01

by Pavel Machek

[permalink] [raw]
Subject: [PATCH] mtd: rawnand: oxnas: cleanup/simplify code

Simplify oxnas_nand_probe.

Signed-off-by: Pavel Machek (CIP) <[email protected]>

diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c
index 8d0d76ad319d..f44947043e5a 100644
--- a/drivers/mtd/nand/raw/oxnas_nand.c
+++ b/drivers/mtd/nand/raw/oxnas_nand.c
@@ -144,8 +144,7 @@ static int oxnas_nand_probe(struct platform_device *pdev)
if (err)
goto err_cleanup_nand;

- oxnas->chips[oxnas->nchips] = chip;
- ++oxnas->nchips;
+ oxnas->chips[oxnas->nchips++] = chip;
}

/* Exit if no chips found */

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Attachments:
(No filename) (697.00 B)
signature.asc (188.00 B)
Digital signature
Download all attachments

2020-07-24 10:03:19

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] mtd: rawnand: oxnas: cleanup/simplify code

On 24/07/2020 10:38, Pavel Machek wrote:
> Simplify oxnas_nand_probe.
>
> Signed-off-by: Pavel Machek (CIP) <[email protected]>
>
> diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c
> index 8d0d76ad319d..f44947043e5a 100644
> --- a/drivers/mtd/nand/raw/oxnas_nand.c
> +++ b/drivers/mtd/nand/raw/oxnas_nand.c
> @@ -144,8 +144,7 @@ static int oxnas_nand_probe(struct platform_device *pdev)
> if (err)
> goto err_cleanup_nand;
>
> - oxnas->chips[oxnas->nchips] = chip;
> - ++oxnas->nchips;
> + oxnas->chips[oxnas->nchips++] = chip;
> }
>
> /* Exit if no chips found */
>

Acked-by: Neil Armstrong <[email protected]>


Attachments:
signature.asc (849.00 B)
OpenPGP digital signature

2020-09-07 07:23:26

by Miquel Raynal

[permalink] [raw]
Subject: Re: [PATCH] mtd: rawnand: oxnas: cleanup/simplify code

On Fri, 2020-07-24 at 08:38:25 UTC, Pavel Machek wrote:
> Simplify oxnas_nand_probe.
>
> Signed-off-by: Pavel Machek (CIP) <[email protected]>
> Acked-by: Neil Armstrong <[email protected]>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel