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
| ||
|
Date: Thu, 21 Jul 2022 09:52:48 +0000 From: Biju Das <biju.das.jz@...renesas.com> To: Michael Walle <michael@...le.cc> CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>, "miquel.raynal@...tlin.com" <miquel.raynal@...tlin.com>, "p.yadav@...com" <p.yadav@...com>, "richard@....at" <richard@....at>, "tudor.ambarus@...rochip.com" <tudor.ambarus@...rochip.com>, "vigneshr@...com" <vigneshr@...com> Subject: RE: [PATCH 5/6] mtd: spi-nor: add generic flash driver Hi Michael Walle, > Subject: Re: [PATCH 5/6] mtd: spi-nor: add generic flash driver > > Hi, > > >> + > >> + /* Fallback to a generic flash described only by its SFDP data. */ > >> + if (!info) { > >> + ret = spi_nor_check_sfdp_signature(nor); > >> + if (!ret) > >> + info = &spi_nor_generic_flash; > >> + } > > > > May be this can be combined as > > > > if (!info && (!spi_nor_check_sfdp_signature(nor))) > > info = &spi_nor_generic_flash; > > While this is the behavior, I don't like (1) calling functions in the > condition and (2) rely on the && and || semantics, i.e. > to just call the second part if the first is true/false. OK fine. I recently got a review comment from mainline for optimizing the number of lines. That is the reason for suggestion. Cheers, biju
Powered by blists - more mailing lists