Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mtd: rawnand: oxnas: cleanup/simplify code
@ 2020-07-24  8:38 Pavel Machek
  2020-07-24 10:01 ` Neil Armstrong
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2020-07-24  8:38 UTC (permalink / raw)
  To: trivial, miquel.raynal, richard, vigneshr, narmstrong,
	nishkadg.linux, linux-mtd, linux-arm-kernel, linux-oxnas,
	linux-kernel

[-- Attachment #1.1: Type: text/plain, Size: 697 bytes --]

Simplify oxnas_nand_probe.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: rawnand: oxnas: cleanup/simplify code
  2020-07-24  8:38 [PATCH] mtd: rawnand: oxnas: cleanup/simplify code Pavel Machek
@ 2020-07-24 10:01 ` Neil Armstrong
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Armstrong @ 2020-07-24 10:01 UTC (permalink / raw)
  To: Pavel Machek, trivial, miquel.raynal, richard, vigneshr,
	nishkadg.linux, linux-mtd, linux-arm-kernel, linux-oxnas,
	linux-kernel

[-- Attachment #1.1.1: Type: text/plain, Size: 694 bytes --]

On 24/07/2020 10:38, Pavel Machek wrote:
> Simplify oxnas_nand_probe.
> 
> Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
> 
> 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 <narmstrong@baylibre.com>


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24  8:38 [PATCH] mtd: rawnand: oxnas: cleanup/simplify code Pavel Machek
2020-07-24 10:01 ` Neil Armstrong

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git