2022-02-02 17:39:14

by Michael Walle

[permalink] [raw]
Subject: [PATCH v1 14/14] mtd: spi-nor: renumber flags

As we have deleted some flag, lets renumber them so there are no holes.

Signed-off-by: Michael Walle <[email protected]>
---
drivers/mtd/spi-nor/core.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 2130a96e2044..b7fd760e3b47 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -12,20 +12,20 @@
#define SPI_NOR_MAX_ID_LEN 6

enum spi_nor_option_flags {
- SNOR_F_HAS_SR_TB = BIT(1),
- SNOR_F_NO_OP_CHIP_ERASE = BIT(2),
- SNOR_F_BROKEN_RESET = BIT(5),
- SNOR_F_4B_OPCODES = BIT(6),
- SNOR_F_HAS_4BAIT = BIT(7),
- SNOR_F_HAS_LOCK = BIT(8),
- SNOR_F_HAS_16BIT_SR = BIT(9),
- SNOR_F_NO_READ_CR = BIT(10),
- SNOR_F_HAS_SR_TB_BIT6 = BIT(11),
- SNOR_F_HAS_4BIT_BP = BIT(12),
- SNOR_F_HAS_SR_BP3_BIT6 = BIT(13),
- SNOR_F_IO_MODE_EN_VOLATILE = BIT(14),
- SNOR_F_SOFT_RESET = BIT(15),
- SNOR_F_SWP_IS_VOLATILE = BIT(16),
+ SNOR_F_HAS_SR_TB = BIT(0),
+ SNOR_F_NO_OP_CHIP_ERASE = BIT(1),
+ SNOR_F_BROKEN_RESET = BIT(2),
+ SNOR_F_4B_OPCODES = BIT(3),
+ SNOR_F_HAS_4BAIT = BIT(4),
+ SNOR_F_HAS_LOCK = BIT(5),
+ SNOR_F_HAS_16BIT_SR = BIT(6),
+ SNOR_F_NO_READ_CR = BIT(7),
+ SNOR_F_HAS_SR_TB_BIT6 = BIT(8),
+ SNOR_F_HAS_4BIT_BP = BIT(9),
+ SNOR_F_HAS_SR_BP3_BIT6 = BIT(10),
+ SNOR_F_IO_MODE_EN_VOLATILE = BIT(11),
+ SNOR_F_SOFT_RESET = BIT(12),
+ SNOR_F_SWP_IS_VOLATILE = BIT(13),
};

struct spi_nor_read_command {
--
2.30.2


2022-02-10 03:47:37

by Tudor Ambarus

[permalink] [raw]
Subject: Re: [PATCH v1 14/14] mtd: spi-nor: renumber flags

On 2/2/22 16:58, Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> As we have deleted some flag, lets renumber them so there are no holes.
>
> Signed-off-by: Michael Walle <[email protected]>

Reviewed-by: Tudor Ambarus <[email protected]>

> ---
> drivers/mtd/spi-nor/core.h | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
> index 2130a96e2044..b7fd760e3b47 100644
> --- a/drivers/mtd/spi-nor/core.h
> +++ b/drivers/mtd/spi-nor/core.h
> @@ -12,20 +12,20 @@
> #define SPI_NOR_MAX_ID_LEN 6
>
> enum spi_nor_option_flags {
> - SNOR_F_HAS_SR_TB = BIT(1),
> - SNOR_F_NO_OP_CHIP_ERASE = BIT(2),
> - SNOR_F_BROKEN_RESET = BIT(5),
> - SNOR_F_4B_OPCODES = BIT(6),
> - SNOR_F_HAS_4BAIT = BIT(7),
> - SNOR_F_HAS_LOCK = BIT(8),
> - SNOR_F_HAS_16BIT_SR = BIT(9),
> - SNOR_F_NO_READ_CR = BIT(10),
> - SNOR_F_HAS_SR_TB_BIT6 = BIT(11),
> - SNOR_F_HAS_4BIT_BP = BIT(12),
> - SNOR_F_HAS_SR_BP3_BIT6 = BIT(13),
> - SNOR_F_IO_MODE_EN_VOLATILE = BIT(14),
> - SNOR_F_SOFT_RESET = BIT(15),
> - SNOR_F_SWP_IS_VOLATILE = BIT(16),
> + SNOR_F_HAS_SR_TB = BIT(0),
> + SNOR_F_NO_OP_CHIP_ERASE = BIT(1),
> + SNOR_F_BROKEN_RESET = BIT(2),
> + SNOR_F_4B_OPCODES = BIT(3),
> + SNOR_F_HAS_4BAIT = BIT(4),
> + SNOR_F_HAS_LOCK = BIT(5),
> + SNOR_F_HAS_16BIT_SR = BIT(6),
> + SNOR_F_NO_READ_CR = BIT(7),
> + SNOR_F_HAS_SR_TB_BIT6 = BIT(8),
> + SNOR_F_HAS_4BIT_BP = BIT(9),
> + SNOR_F_HAS_SR_BP3_BIT6 = BIT(10),
> + SNOR_F_IO_MODE_EN_VOLATILE = BIT(11),
> + SNOR_F_SOFT_RESET = BIT(12),
> + SNOR_F_SWP_IS_VOLATILE = BIT(13),
> };
>
> struct spi_nor_read_command {
> --
> 2.30.2
>