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: <d3903d95-d76f-b9cd-b927-d175afab31a7@microchip.com>
Date:   Mon, 18 Jul 2022 16:58:09 +0000
From:   <Tudor.Ambarus@...rochip.com>
To:     <sudip.mukherjee@...ive.com>, <p.yadav@...com>, <michael@...le.cc>,
        <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>
CC:     <greentime.hu@...ive.com>, <jude.onyenegecha@...ive.com>,
        <william.salmon@...ive.com>, <adnan.chowdhury@...ive.com>,
        <ben.dooks@...ive.com>, <linux-mtd@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] mtd: spi-nor: extend no_sfdp_flags to use u16

On 7/12/22 19:38, Sudip Mukherjee wrote:
> [You don't often get email from sudip.mukherjee@...ive.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Currently no_sfdp_flags is u8 and all the bits have been used. Extend
> it to use u16 so that we can add more support.
> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@...ive.com>
> ---
>  drivers/mtd/spi-nor/core.c | 2 +-
>  drivers/mtd/spi-nor/core.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index ce5d69317d46c..e5f7691c5bd40 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2335,7 +2335,7 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor)
>  {
>         struct spi_nor_flash_parameter *params = nor->params;
>         struct spi_nor_erase_map *map = &params->erase_map;
> -       const u8 no_sfdp_flags = nor->info->no_sfdp_flags;
> +       const u16 no_sfdp_flags = nor->info->no_sfdp_flags;
>         u8 i, erase_mask;
> 
>         if (no_sfdp_flags & SPI_NOR_DUAL_READ) {
> diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
> index 61886868cd022..58fbedc94080f 100644
> --- a/drivers/mtd/spi-nor/core.h
> +++ b/drivers/mtd/spi-nor/core.h
> @@ -501,7 +501,7 @@ struct flash_info {
>  #define NO_CHIP_ERASE                  BIT(7)
>  #define SPI_NOR_NO_FR                  BIT(8)
> 
> -       u8 no_sfdp_flags;
> +       u16 no_sfdp_flags;

>  #define SPI_NOR_SKIP_SFDP              BIT(0)
>  #define SECT_4K                                BIT(1)
>  #define SPI_NOR_DUAL_READ              BIT(3)
> --
> 2.30.2
> 

you can extend this when introducing a new flag, if needed.
No need for a dedicated patch just for this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ