Message ID | 20240307091014.39796-2-ada@thorsis.com |
---|---|
State | Superseded |
Delegated to: | Dario Binacchi |
Headers | show |
Series | mtd: nand: raw: Collected improvements | expand |
On Thu, Mar 7, 2024 at 10:10 AM Alexander Dahl <ada@thorsis.com> wrote: > > 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> > --- > 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 > Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
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;
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> --- drivers/mtd/nand/raw/nand_base.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)