diff mbox series

[1/2] mtd: spi-nor: Fix comment of spi_nor_find_best_erase_type()

Message ID 20190124112014.20167-2-alexander.sverdlin@nokia.com
State Changes Requested
Delegated to: Ambarus Tudor
Headers show
Series spi-nor: Drop uniform erase | expand

Commit Message

Alexander A Sverdlin Jan. 24, 2019, 11:21 a.m. UTC
Erase types are sorted *smallest* type first, refer to
spi_nor_sort_erase_mask().

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tudor Ambarus March 19, 2019, 4:29 p.m. UTC | #1
On 01/24/2019 01:21 PM, Sverdlin, Alexander (Nokia - DE/Ulm) wrote:
> Erase types are sorted *smallest* type first, refer to
> spi_nor_sort_erase_mask().
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>

Please fix your author name to match your S-o-b tag. See
https://lkml.org/lkml/2019/2/8/556 for a workaround.

I'll add my R-b after this change.

I didn't forget about patch 2/2, I just want to check the upper mtd layers.

Thanks,
ta
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 6e13bbd1aaa5..c3598f0571cc 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -739,7 +739,7 @@ spi_nor_find_best_erase_type(const struct spi_nor_erase_map *map,
>  	u8 erase_mask = region->offset & SNOR_ERASE_TYPE_MASK;
>  
>  	/*
> -	 * Erase types are ordered by size, with the biggest erase type at
> +	 * Erase types are ordered by size, with the smallest erase type at
>  	 * index 0.
>  	 */
>  	for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {
>
Alexander A Sverdlin March 19, 2019, 4:57 p.m. UTC | #2
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>

A series which initially started as n25q128a13 erase time regression
analysis but ended up in removing uniform erase completely.

It has been tested on the following name/ID combinations:

n25q128a13:
JEDEC ID 20 ba 18 10 00 00
JEDEC ID 20 ba 18 10 40 00
JEDEC ID 20 ba 18 10 44 00

n25q128a11:
JEDEC ID 20 bb 18 10 44 00

s25fl129p1:
JEDEC ID 01 20 18 4d 01 81

Alexander Sverdlin (2):
  mtd: spi-nor: Fix comment of spi_nor_find_best_erase_type()
  mtd: spi-nor: Always use biggest erase size

 drivers/mtd/spi-nor/spi-nor.c | 48 ++++++-----------------------------
 1 file changed, 8 insertions(+), 40 deletions(-)
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 6e13bbd1aaa5..c3598f0571cc 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -739,7 +739,7 @@  spi_nor_find_best_erase_type(const struct spi_nor_erase_map *map,
 	u8 erase_mask = region->offset & SNOR_ERASE_TYPE_MASK;
 
 	/*
-	 * Erase types are ordered by size, with the biggest erase type at
+	 * Erase types are ordered by size, with the smallest erase type at
 	 * index 0.
 	 */
 	for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {