Re: [PATCH v2 23/35] mtd: spi-nor: Get rid of nor->page_size

Michael Walle
2021-10-22T12:02:50Z

Am 2021-07-27 06:52, schrieb Tudor Ambarus:
> nor->page_size duplicated what nor->params->page_size indicates
> for no good reason. page_size is a flash parameter of fixed value
> and it is better suited to be found in nor->params->page_size.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>

..

> /* Flash in Power of 2 mode */
> - nor->page_size = (nor->page_size == 264) ? 256 : 512;
> - nor->mtd.writebufsize = nor->page_size;
> - nor->mtd.size = 8 * nor->page_size * nor->info->n_sectors;
> - nor->mtd.erasesize = 8 * nor->page_size;
> + page_size = (nor->params->page_size == 264) ? 256 : 512;

weird stuff.

Reviewed-by: Michael Walle <michael@walle.cc>