2022-02-28 12:31:45

by Tudor Ambarus

[permalink] [raw]
Subject: [PATCH v2 1/8] mtd: spi-nor: Rename method, s/spi_nor_match_id/spi_nor_match_name

The method is matching a flash_info entry by searching by name. Rename
the method for better clarity.

Signed-off-by: Tudor Ambarus <[email protected]>
---
drivers/mtd/spi-nor/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 9014008e60b3..f3c359d03163 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2876,8 +2876,8 @@ void spi_nor_restore(struct spi_nor *nor)
}
EXPORT_SYMBOL_GPL(spi_nor_restore);

-static const struct flash_info *spi_nor_match_id(struct spi_nor *nor,
- const char *name)
+static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,
+ const char *name)
{
unsigned int i, j;

@@ -2899,7 +2899,7 @@ static const struct flash_info *spi_nor_get_flash_info(struct spi_nor *nor,
const struct flash_info *info = NULL;

if (name)
- info = spi_nor_match_id(nor, name);
+ info = spi_nor_match_name(nor, name);
/* Try to auto-detect if chip name wasn't specified or not found */
if (!info)
info = spi_nor_read_id(nor);
--
2.25.1


2022-03-21 22:51:45

by Pratyush Yadav

[permalink] [raw]
Subject: Re: [PATCH v2 1/8] mtd: spi-nor: Rename method, s/spi_nor_match_id/spi_nor_match_name

On 28/02/22 01:17PM, Tudor Ambarus wrote:
> The method is matching a flash_info entry by searching by name. Rename
> the method for better clarity.
>
> Signed-off-by: Tudor Ambarus <[email protected]>

Reviewed-by: Pratyush Yadav <[email protected]>

--
Regards,
Pratyush Yadav
Texas Instruments Inc.

2022-03-21 23:41:33

by Michael Walle

[permalink] [raw]
Subject: Re: [PATCH v2 1/8] mtd: spi-nor: Rename method, s/spi_nor_match_id/spi_nor_match_name

Am 2022-02-28 12:17, schrieb Tudor Ambarus:
> The method is matching a flash_info entry by searching by name. Rename
> the method for better clarity.
>
> Signed-off-by: Tudor Ambarus <[email protected]>

Reviewed-by: Michael Walle <[email protected]>

> ---
> drivers/mtd/spi-nor/core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 9014008e60b3..f3c359d03163 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2876,8 +2876,8 @@ void spi_nor_restore(struct spi_nor *nor)
> }
> EXPORT_SYMBOL_GPL(spi_nor_restore);
>
> -static const struct flash_info *spi_nor_match_id(struct spi_nor *nor,
> - const char *name)
> +static const struct flash_info *spi_nor_match_name(struct spi_nor
> *nor,
> + const char *name)
> {
> unsigned int i, j;
>
> @@ -2899,7 +2899,7 @@ static const struct flash_info
> *spi_nor_get_flash_info(struct spi_nor *nor,
> const struct flash_info *info = NULL;
>
> if (name)
> - info = spi_nor_match_id(nor, name);
> + info = spi_nor_match_name(nor, name);
> /* Try to auto-detect if chip name wasn't specified or not found */
> if (!info)
> info = spi_nor_read_id(nor);

--
-michael