From: Samuel Holland <samuel@sholland.org>
To: u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>,
Andre Przywara <andre.przywara@arm.com>
Cc: Samuel Holland <samuel@sholland.org>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Hans de Goede <hdegoede@redhat.com>,
Lukasz Majewski <lukma@denx.de>,
Michael Trimarchi <michael@amarulasolutions.com>,
Sean Anderson <seanga2@gmail.com>, Simon Glass <sjg@chromium.org>
Subject: [PATCH 3/6] mtd: nand: sunxi: Remove an unnecessary check
Date: Wed, 13 Jul 2022 22:15:23 -0500 [thread overview]
Message-ID: <20220714031526.33697-4-samuel@sholland.org> (raw)
In-Reply-To: <20220714031526.33697-1-samuel@sholland.org>
Each chip is required to have a unique CS number ("reg" property) in the
range 0-7, so there is no need to separately count the number of chips.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
drivers/mtd/nand/raw/sunxi_nand.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index c378f08f6805..0f10edfdb208 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -1766,16 +1766,6 @@ static int sunxi_nand_chips_init(int node, struct sunxi_nfc *nfc)
int nand_node;
int ret, i = 0;
- for (nand_node = fdt_first_subnode(blob, node); nand_node >= 0;
- nand_node = fdt_next_subnode(blob, nand_node))
- i++;
-
- if (i > 8) {
- dev_err(nfc->dev, "too many NAND chips: %d (max = 8)\n", i);
- return -EINVAL;
- }
-
- i = 0;
for (nand_node = fdt_first_subnode(blob, node); nand_node >= 0;
nand_node = fdt_next_subnode(blob, nand_node)) {
ret = sunxi_nand_chip_init(nand_node, nfc, i++);
--
2.35.1
next prev parent reply other threads:[~2022-07-14 3:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 3:15 [PATCH 0/6] mtd: nand: sunxi: Convert to devicetree and the driver model Samuel Holland
2022-07-14 3:15 ` [PATCH 1/6] clk: sunxi: Add NAND clocks and resets Samuel Holland
2022-07-15 9:25 ` Jagan Teki
2022-07-18 16:10 ` Andre Przywara
2022-07-18 23:50 ` Samuel Holland
2022-07-14 3:15 ` [PATCH 2/6] pinctrl: sunxi: Add NAND pinmuxes Samuel Holland
2022-07-15 9:26 ` Jagan Teki
2022-07-18 16:20 ` Andre Przywara
2022-07-18 17:26 ` Michael Nazzareno Trimarchi
2022-07-19 2:04 ` Samuel Holland
2022-07-14 3:15 ` Samuel Holland [this message]
2022-07-17 14:01 ` [PATCH 3/6] mtd: nand: sunxi: Remove an unnecessary check Michael Nazzareno Trimarchi
2022-07-14 3:15 ` [PATCH 4/6] mtd: nand: sunxi: Convert from fdtdec to ofnode Samuel Holland
2022-07-14 3:15 ` [PATCH 5/6] mtd: nand: sunxi: Convert to the driver model Samuel Holland
2022-07-17 14:10 ` Michael Nazzareno Trimarchi
2022-07-14 3:15 ` [PATCH 6/6] mtd: nand: sunxi: Pass the device to the init function Samuel Holland
2022-07-14 5:38 ` [PATCH 0/6] mtd: nand: sunxi: Convert to devicetree and the driver model Michael Nazzareno Trimarchi
2022-07-14 6:47 ` Icenowy Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220714031526.33697-4-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=andre.przywara@arm.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=hdegoede@redhat.com \
--cc=jagan@amarulasolutions.com \
--cc=lukma@denx.de \
--cc=michael@amarulasolutions.com \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).