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] [day] [month] [year] [list]
Message-ID: <20200222215148.GH2031@latitude>
Date:   Sat, 22 Feb 2020 22:51:48 +0100
From:   Jonathan Neuschäfer <j.neuschaefer@....net>
To:     Tudor.Ambarus@...rochip.com
Cc:     j.neuschaefer@....net, linux-mtd@...ts.infradead.org,
        miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: Simplify loop in spi_nor_read_id()

On Fri, Feb 21, 2020 at 04:50:37PM +0000, Tudor.Ambarus@...rochip.com wrote:
> > > >         const struct flash_info *info;
> 
> how about getting rid of this local variable? Use in the function something 
> like:
> 
>                 if (spi_nor_ids[i].id_len &&
>                     !memcmp(spi_nor_ids[i].id, id, spi_nor_ids[i].id_len)
>                     return &spi_nor_ids[i];

Looks alright. I'll do it.


Jonathan

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ