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: <20200110092152.64d05705@collabora.com>
Date:   Fri, 10 Jan 2020 09:21:52 +0100
From:   Boris Brezillon <boris.brezillon@...labora.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Chuanhong Guo <gch981213@...il.com>, linux-mtd@...ts.infradead.org,
        Boris Brezillon <bbrezillon@...nel.org>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mtd: nand: spi: rework detect procedure for
 different read id op

On Fri, 10 Jan 2020 09:10:24 +0100
Miquel Raynal <miquel.raynal@...tlin.com> wrote:

> Hi Boris,
> 
> Boris Brezillon <boris.brezillon@...labora.com> wrote on Fri, 10 Jan
> 2020 09:04:22 +0100:
> 
> > On Fri, 10 Jan 2020 15:34:28 +0800
> > Chuanhong Guo <gch981213@...il.com> wrote:
> >   
> > > Hi!
> > > 
> > > On Fri, Jan 10, 2020 at 2:59 PM Boris Brezillon
> > > <boris.brezillon@...labora.com> wrote:    
> > > > [...]      
> > > > > +     ret = spinand_read_id_op(spinand, 1, 0, id);
> > > > > +     if (ret)
> > > > > +             return ret;
> > > > > +     ret = spinand_manufacturer_match(spinand,
> > > > > +                                      SPINAND_READID_METHOD_OPCODE_ADDR);
> > > > > +     if (!ret)
> > > > > +             return 0;
> > > > > +
> > > > > +     ret = spinand_read_id_op(spinand, 0, 1, id);      
> > > >
> > > > Hm, we should probably do only one of each read_id and iterate over all
> > > > manufacturers/chips each time instead of doing 3 read_ids per
> > > > manufacturer.      
> > > 
> > > This actually do the former instead of the latter. Maybe the function
> > > names are a bit
> > > misleading. spinand_manufacturer_match iterates over all manufacturers
> > > in one call,
> > > and spinand_manufacturer_detect is called once in spinand_detect.
> > > Do you have suggestions on function naming?    
> > 
> > Maybe you can just inline the content of this function in
> > spinand_detect().  
> 
> Actually I found that part clear enough, I would keep it as is, out of
> the spinand_detect() function as long as there is no actual reason to
> merge them?

Hm, I kind of disagree. The current name makes it sound like the
function detects the manufacturer or does a per-manufacturer id
detection, which is not the case. How about spinand_id_based_detect() or
spinand_readid_detect()?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ