lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220215191609.tyudvewu4vu6o7td@ti.com>
Date:   Wed, 16 Feb 2022 00:46:09 +0530
From:   Pratyush Yadav <p.yadav@...com>
To:     <Tudor.Ambarus@...rochip.com>
CC:     <michael@...le.cc>, <linux-mtd@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <miquel.raynal@...tlin.com>,
        <richard@....at>, <vigneshr@...com>
Subject: Re: [PATCH v1 08/14] mtd: spi-nor: micron-st: convert USE_FSR to a
 manufacturer flag

On 10/02/22 03:37AM, Tudor.Ambarus@...rochip.com wrote:
> 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
> > 
> > Now that all functions using that flag are local to the micron module,
> > we can convert the flag to a manufacturer one.
> > 
> > Signed-off-by: Michael Walle <michael@...le.cc>
> > ---
> >  drivers/mtd/spi-nor/core.c      |  3 --
> >  drivers/mtd/spi-nor/core.h      |  3 --
> >  drivers/mtd/spi-nor/micron-st.c | 92 +++++++++++++++++++++------------
> >  3 files changed, 59 insertions(+), 39 deletions(-)
> > 
> > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> > index e9d9880149d2..be65aaa954ca 100644
> > --- a/drivers/mtd/spi-nor/core.c
> > +++ b/drivers/mtd/spi-nor/core.c
> > @@ -2499,9 +2499,6 @@ static void spi_nor_init_flags(struct spi_nor *nor)
> > 
> >         if (flags & USE_CLSR)
> >                 nor->flags |= SNOR_F_USE_CLSR;
> > -
> > -       if (flags & USE_FSR)
> > -               nor->flags |= SNOR_F_USE_FSR;
> >  }
> > 
> >  /**
> > diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
> > index fabc01ae9a81..a02bf54289fb 100644
> > --- a/drivers/mtd/spi-nor/core.h
> > +++ b/drivers/mtd/spi-nor/core.h
> > @@ -12,7 +12,6 @@
> >  #define SPI_NOR_MAX_ID_LEN     6
> > 
> >  enum spi_nor_option_flags {
> > -       SNOR_F_USE_FSR          = BIT(0),
> >         SNOR_F_HAS_SR_TB        = BIT(1),
> >         SNOR_F_NO_OP_CHIP_ERASE = BIT(2),
> >         SNOR_F_USE_CLSR         = BIT(4),
> > @@ -349,7 +348,6 @@ struct spi_nor_fixups {
> >   *   NO_CHIP_ERASE:           chip does not support chip erase.
> >   *   SPI_NOR_NO_FR:           can't do fastread.
> >   *   USE_CLSR:                use CLSR command.
> > - *   USE_FSR:                 use flag status register
> >   *
> >   * @no_sfdp_flags:  flags that indicate support that can be discovered via SFDP.
> >   *                  Used when SFDP tables are not defined in the flash. These
> > @@ -401,7 +399,6 @@ struct flash_info {
> >  #define NO_CHIP_ERASE                  BIT(7)
> >  #define SPI_NOR_NO_FR                  BIT(8)
> >  #define USE_CLSR                       BIT(9)
> > -#define USE_FSR                                BIT(10)
> > 
> >         u8 no_sfdp_flags;
> >  #define SPI_NOR_SKIP_SFDP              BIT(0)
> > diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
> > index c66580e8aa00..33531c101ccb 100644
> > --- a/drivers/mtd/spi-nor/micron-st.c
> > +++ b/drivers/mtd/spi-nor/micron-st.c
> > @@ -8,6 +8,8 @@
> > 
> >  #include "core.h"
> > 
> > +#define USE_FSR                BIT(0)
> 
> please add a description and inform the reader that this is a manufacturer specific
> flash_info flag.

+1

> Reviewed-by: Tudor Ambarus <tudor.ambarus@...rochip.com>

Reviewed-by: Pratyush Yadav <p.yadav@...com>


-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ