From: Alexander Dahl <ada@thorsis.com>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Michael Trimarchi <michael@amarulasolutions.com>
Cc: Balamanikandan Gunasundar
<balamanikandan.gunasundar@microchip.com>,
Eugen Hristev <eugen.hristev@collabora.com>,
Mihai Sain <mihai.sain@microchip.com>,
Li Bin <bin.li@microchip.com>,
u-boot@lists.denx.de
Subject: [PATCH v2 1/6] mtd: nand: raw: Use macro nand_to_mtd() where appropriate
Date: Wed, 20 Mar 2024 10:02:09 +0100 [thread overview]
Message-ID: <20240320090214.40465-2-ada@thorsis.com> (raw)
In-Reply-To: <20240320090214.40465-1-ada@thorsis.com>
In every other place in this file the macro is used, make it consistent.
Fixes: 9d1806fadc24 ("mtd: nand: Get rid of mtd variable in function calls")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
---
Notes:
v1:
- initial patch version
v2:
- collected tags
drivers/mtd/nand/raw/nand_base.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index c40a0f23d7b..688d17ba3c2 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -4118,7 +4118,7 @@ static int nand_get_bits_per_cell(u8 cellinfo)
*/
void nand_decode_ext_id(struct nand_chip *chip)
{
- struct mtd_info *mtd = &chip->mtd;
+ struct mtd_info *mtd = nand_to_mtd(chip);
int extid;
/* The 3rd id byte holds MLC / multichip data */
chip->bits_per_cell = nand_get_bits_per_cell(chip->id.data[2]);
@@ -4185,7 +4185,7 @@ static int nand_manufacturer_init(struct nand_chip *chip)
*/
static void nand_decode_id(struct nand_chip *chip, struct nand_flash_dev *type)
{
- struct mtd_info *mtd = &chip->mtd;
+ struct mtd_info *mtd = nand_to_mtd(chip);
mtd->erasesize = type->erasesize;
mtd->writesize = type->pagesize;
@@ -4265,7 +4265,7 @@ static const struct nand_manufacturer *nand_get_manufacturer_desc(u8 id)
int nand_detect(struct nand_chip *chip, int *maf_id,
int *dev_id, struct nand_flash_dev *type)
{
- struct mtd_info *mtd = &chip->mtd;
+ struct mtd_info *mtd = nand_to_mtd(chip);
const struct nand_manufacturer *manufacturer_desc;
int busw, ret;
u8 *id_data = chip->id.data;
--
2.39.2
next prev parent reply other threads:[~2024-03-20 9:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 9:02 [PATCH v2 0/6] mtd: nand: raw: Collected improvements Alexander Dahl
2024-03-20 9:02 ` Alexander Dahl [this message]
2024-03-20 9:02 ` [PATCH v2 2/6] mtd: nand: raw: Port another option flag from Linux Alexander Dahl
2024-03-20 9:02 ` [PATCH v2 3/6] mtd: nand: raw: Fix (most) Kconfig indentation Alexander Dahl
2024-03-20 9:02 ` [PATCH v2 4/6] mtd: nand: raw: atmel: Introduce optional debug commands Alexander Dahl
2024-03-20 9:02 ` [PATCH v2 5/6] mtd: nand: raw: atmel: Fix comment in timings preparation Alexander Dahl
2024-03-20 12:25 ` Michael Nazzareno Trimarchi
2024-03-20 9:02 ` [PATCH v2 6/6] cmd: nand: Add new optional sub-command 'onfi' Alexander Dahl
2024-03-20 12:48 ` Mihai.Sain
2024-03-20 14:08 ` Mihai.Sain
2024-03-21 9:16 ` Michael Nazzareno Trimarchi
2024-03-22 10:02 ` Mihai.Sain
2024-03-22 11:46 ` Alexander Dahl
2024-03-22 11:54 ` Michael Nazzareno Trimarchi
2024-03-22 12:02 ` Alexander Dahl
2024-03-22 12:34 ` Michael Nazzareno Trimarchi
2024-04-14 13:41 ` [PATCH v2 0/6] mtd: nand: raw: Collected improvements Dario Binacchi
2024-04-15 6:13 ` Alexander Dahl
2024-04-15 6:32 ` Dario Binacchi
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=20240320090214.40465-2-ada@thorsis.com \
--to=ada@thorsis.com \
--cc=balamanikandan.gunasundar@microchip.com \
--cc=bin.li@microchip.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=eugen.hristev@collabora.com \
--cc=michael@amarulasolutions.com \
--cc=mihai.sain@microchip.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.