diff mbox series

[v5,26/32] mtd: spi-nor: micron-st: rename vendor specific functions and defines

Message ID 20220223134358.1914798-27-michael@walle.cc
State Accepted
Delegated to: Ambarus Tudor
Headers show
Series mtd: spi-nor: move vendor specific code into vendor modules | expand

Commit Message

Michael Walle Feb. 23, 2022, 1:43 p.m. UTC
Drop the generic spi_nor prefix for all the micron-st functions.

Signed-off-by: Michael Walle <michael@walle.cc>
Tested-by: Pratyush Yadav <p.yadav@ti.com> # on mt35xu512aba, s28hs512t
---
 drivers/mtd/spi-nor/micron-st.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Pratyush Yadav Feb. 23, 2022, 2:56 p.m. UTC | #1
On 23/02/22 02:43PM, Michael Walle wrote:
> Drop the generic spi_nor prefix for all the micron-st functions.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> Tested-by: Pratyush Yadav <p.yadav@ti.com> # on mt35xu512aba, s28hs512t

Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Tudor Ambarus Feb. 25, 2022, 2:03 p.m. UTC | #2
On 2/23/22 15:43, Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Drop the generic spi_nor prefix for all the micron-st functions.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> Tested-by: Pratyush Yadav <p.yadav@ti.com> # on mt35xu512aba, s28hs512t
> ---
>  drivers/mtd/spi-nor/micron-st.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
> index 1a7227594bf0..8a20475ce77a 100644
> --- a/drivers/mtd/spi-nor/micron-st.c
> +++ b/drivers/mtd/spi-nor/micron-st.c

you forgot to rename the macros, as you did for xilinx.
Michael Walle Feb. 25, 2022, 3:36 p.m. UTC | #3
Am 2022-02-25 15:03, schrieb Tudor.Ambarus@microchip.com:
> On 2/23/22 15:43, Michael Walle wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know 
>> the content is safe
>> 
>> Drop the generic spi_nor prefix for all the micron-st functions.
>> 
>> Signed-off-by: Michael Walle <michael@walle.cc>
>> Tested-by: Pratyush Yadav <p.yadav@ti.com> # on mt35xu512aba, 
>> s28hs512t
>> ---
>>  drivers/mtd/spi-nor/micron-st.c | 18 +++++++++---------
>>  1 file changed, 9 insertions(+), 9 deletions(-)
>> 
>> diff --git a/drivers/mtd/spi-nor/micron-st.c 
>> b/drivers/mtd/spi-nor/micron-st.c
>> index 1a7227594bf0..8a20475ce77a 100644
>> --- a/drivers/mtd/spi-nor/micron-st.c
>> +++ b/drivers/mtd/spi-nor/micron-st.c
> 
> you forgot to rename the macros, as you did for xilinx.

Sigh. Actually, I didn't rename the macros at all (except for xilinx,
but that was already way before the naming discussion). I couldn't
come up with a good name, so I just left it as they were.

TBH, what was just a clean-up for the ready function turned
into a gigantic patch series and it is very time consuming
(and frustrating) to respin it just for renaming. We shouldn't
aim at perfection for patches. Minor details can always be
fixed later.

-michael
Tudor Ambarus Feb. 25, 2022, 3:38 p.m. UTC | #4
On 2/25/22 17:36, Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Am 2022-02-25 15:03, schrieb Tudor.Ambarus@microchip.com:
>> On 2/23/22 15:43, Michael Walle wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know
>>> the content is safe
>>>
>>> Drop the generic spi_nor prefix for all the micron-st functions.
>>>
>>> Signed-off-by: Michael Walle <michael@walle.cc>
>>> Tested-by: Pratyush Yadav <p.yadav@ti.com> # on mt35xu512aba,
>>> s28hs512t
>>> ---
>>>  drivers/mtd/spi-nor/micron-st.c | 18 +++++++++---------
>>>  1 file changed, 9 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/mtd/spi-nor/micron-st.c
>>> b/drivers/mtd/spi-nor/micron-st.c
>>> index 1a7227594bf0..8a20475ce77a 100644
>>> --- a/drivers/mtd/spi-nor/micron-st.c
>>> +++ b/drivers/mtd/spi-nor/micron-st.c
>>
>> you forgot to rename the macros, as you did for xilinx.
> 
> Sigh. Actually, I didn't rename the macros at all (except for xilinx,
> but that was already way before the naming discussion). I couldn't
> come up with a good name, so I just left it as they were.
> 
> TBH, what was just a clean-up for the ready function turned
> into a gigantic patch series and it is very time consuming
> (and frustrating) to respin it just for renaming. We shouldn't
> aim at perfection for patches. Minor details can always be
> fixed later.
> 

Ok. I'll queue the patch set and fix them all in a single patch.
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
index 1a7227594bf0..8a20475ce77a 100644
--- a/drivers/mtd/spi-nor/micron-st.c
+++ b/drivers/mtd/spi-nor/micron-st.c
@@ -309,7 +309,7 @@  static int micron_st_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable)
 }
 
 /**
- * spi_nor_read_fsr() - Read the Flag Status Register.
+ * micron_st_nor_read_fsr() - Read the Flag Status Register.
  * @nor:	pointer to 'struct spi_nor'
  * @fsr:	pointer to a DMA-able buffer where the value of the
  *              Flag Status Register will be written. Should be at least 2
@@ -317,7 +317,7 @@  static int micron_st_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable)
  *
  * Return: 0 on success, -errno otherwise.
  */
-static int spi_nor_read_fsr(struct spi_nor *nor, u8 *fsr)
+static int micron_st_nor_read_fsr(struct spi_nor *nor, u8 *fsr)
 {
 	int ret;
 
@@ -353,10 +353,10 @@  static int spi_nor_read_fsr(struct spi_nor *nor, u8 *fsr)
 }
 
 /**
- * spi_nor_clear_fsr() - Clear the Flag Status Register.
+ * micron_st_nor_clear_fsr() - Clear the Flag Status Register.
  * @nor:	pointer to 'struct spi_nor'.
  */
-static void spi_nor_clear_fsr(struct spi_nor *nor)
+static void micron_st_nor_clear_fsr(struct spi_nor *nor)
 {
 	int ret;
 
@@ -380,14 +380,14 @@  static void spi_nor_clear_fsr(struct spi_nor *nor)
 }
 
 /**
- * spi_nor_fsr_ready() - Query the Status Register as well as the Flag Status
+ * micron_st_nor_ready() - Query the Status Register as well as the Flag Status
  * Register to see if the flash is ready for new commands. If there are any
  * errors in the FSR clear them.
  * @nor:	pointer to 'struct spi_nor'.
  *
  * Return: 1 if ready, 0 if not ready, -errno on errors.
  */
-static int spi_nor_fsr_ready(struct spi_nor *nor)
+static int micron_st_nor_ready(struct spi_nor *nor)
 {
 	int sr_ready, ret;
 
@@ -395,7 +395,7 @@  static int spi_nor_fsr_ready(struct spi_nor *nor)
 	if (sr_ready < 0)
 		return sr_ready;
 
-	ret = spi_nor_read_fsr(nor, nor->bouncebuf);
+	ret = micron_st_nor_read_fsr(nor, nor->bouncebuf);
 	if (ret)
 		return ret;
 
@@ -409,7 +409,7 @@  static int spi_nor_fsr_ready(struct spi_nor *nor)
 			dev_err(nor->dev,
 				"Attempted to modify a protected sector.\n");
 
-		spi_nor_clear_fsr(nor);
+		micron_st_nor_clear_fsr(nor);
 
 		/*
 		 * WEL bit remains set to one when an erase or page program
@@ -438,7 +438,7 @@  static void micron_st_nor_default_init(struct spi_nor *nor)
 static void micron_st_nor_late_init(struct spi_nor *nor)
 {
 	if (nor->info->mfr_flags & USE_FSR)
-		nor->params->ready = spi_nor_fsr_ready;
+		nor->params->ready = micron_st_nor_ready;
 }
 
 static const struct spi_nor_fixups micron_st_nor_fixups = {